> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokios.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Tokios exposes private local models through https://api.tokios.com using an outbound-only connector tunnel.
> Use 'connector' for the local tokios-connector process.
> Use 'deployment' for the public model name in the API model field.
> Use 'upstream model id' for the model served by Ollama, llama.cpp, vLLM, LM Studio, or another local backend.
> API keys use the prefix sk-tok-. Connector tokens use the prefix ct-tok-.

# Use Chatbox with your own local model

> Add Tokios as a custom OpenAI-compatible provider in Chatbox so the desktop app can reach a model running on your own hardware.

Chatbox is a cross-platform chat client with a desktop app and mobile apps. On desktop (and Android), you can add Tokios as a **custom OpenAI API compatible provider**. Point it at the bare host `https://api.tokios.com`, paste an `sk-tok-…` key, and use your Tokios **deployment** name as the model — Chatbox then talks to a model running on different hardware instead of a hosted provider.

> [!WARNING]
>
> This page covers Chatbox on **desktop and Android**. Chatbox on **iOS** has a known bug where custom OpenAI-compatible endpoints with a Bearer API key fail due to a CORS preflight issue in its WKWebView networking path ([chatboxai/chatbox#3516](https://github.com/chatboxai/chatbox/issues/3516)). If you're on an iPhone or iPad, see [Use a local model from your phone](https://docs.tokios.com/use-cases/local-model-on-your-phone.md) for apps that work there instead.

## Prerequisites

> [card] [Connector paired](https://docs.tokios.com/setup/connector-install.md)
>
> Install and pair `tokios-connector` next to the model you want Chatbox to reach.

> [card] [Model registered](https://docs.tokios.com/setup/register-model.md)
>
> Register a deployment (public name) for that model.

> [card] [API key created](https://docs.tokios.com/setup/api-keys.md)
>
> Create an `sk-tok-…` key, optionally scoped to that deployment.

> [card] [Supported backends](https://docs.tokios.com/setup/supported-backends.md)
>
> Confirm your local backend (Ollama, llama.cpp, vLLM, LM Studio) is running.

## Add Tokios as a custom provider in Chatbox

**1. Open Chatbox's model settings**

In Chatbox, open **Settings → Model**.

**2. Add a custom provider**

Click **Add Custom Provider** and choose **OpenAI API Compatible** as the API mode.

**3. Set the API host, path, and key**

Fill in the provider fields. Chatbox appends the completions path itself, so give it the bare host with no `/v1`:

```text theme={"theme":{"light":"github-light","dark":"css-variables"}}
API Host: https://api.tokios.com
API Path: (leave empty)
API Key: sk-tok-YOUR_KEY
```

> [!NOTE]
>
> This is the opposite of most OpenAI-compatible clients. Chatbox's own docs state the API path defaults to `/v1/chat/completions` and gets appended to the host you enter — if you paste `https://api.tokios.com/v1` here instead, Chatbox will call the wrong path.

**4. Add your deployment as a model**

Enter the **public deployment name** you registered in the [Models](https://tokios.com/console/models) tab — for example, `gemma-tunnel`. If Chatbox doesn't auto-list it, type the model name in manually. This is the value Chatbox sends in the `model` field; it is not Ollama's, llama.cpp's, vLLM's, or LM Studio's local model id.

> [!NOTE]
>
> Replace `gemma-tunnel` with the deployment name you registered, and `sk-tok-YOUR_KEY` with your own key. Never commit either into a shared config file.

## Same setup on Android

Chatbox's Android app uses the same **Add Custom Provider → OpenAI API Compatible** flow, with the same bare-host `https://api.tokios.com` value and no `/v1`. The iOS CORS issue above does not affect Android.

## Troubleshooting

> [accordion] 401 error
>
> The API key Chatbox sent is missing, malformed, or has been revoked. Confirm you pasted the full `sk-tok-…` key with no extra whitespace, and check its status on the [Keys](https://tokios.com/console/keys) tab.

> [accordion] 404 error
>
> The model value Chatbox sent doesn't match a registered deployment. Confirm the model name in Chatbox exactly matches the public name on the [Models](https://tokios.com/console/models) tab — not your Ollama/llama.cpp/vLLM/LM Studio local model id. This is also what happens if you added `/v1` to the API Host and Chatbox ended up calling the wrong path.

> [accordion] 503 error
>
> The connector for that deployment is offline or at its concurrency cap. Check the [Connectors](https://tokios.com/console/connectors) tab — the connector needs to show as **Online**, and the machine running it needs to still be up and reachable.

> [accordion] Requests fail on iOS but work on desktop
>
> This matches the known Chatbox iOS bug ([#3516](https://github.com/chatboxai/chatbox/issues/3516)) where custom OpenAI-compatible endpoints with a Bearer key fail a CORS preflight check. It is not a Tokios-side issue. Use Chatbox on desktop or Android, or see [Use a local model from your phone](https://docs.tokios.com/use-cases/local-model-on-your-phone.md) for iOS-friendly clients.

## Next steps

> [card] [Quickstart](https://docs.tokios.com/quickstart.md)
>
> Set up the connector, register a deployment, and create your first key.

> [card] [Compatible clients](https://docs.tokios.com/guides/compatible-clients.md)
>
> See base URL and key setup for other OpenAI- and Anthropic-compatible clients.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.