> ## 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 Continue with your own local model

> Point Continue's OpenAI-compatible apiBase at Tokios so chat, edit, and autocomplete can reach a local model running on Ollama, LM Studio, or vLLM.

Continue reads its model settings from a YAML config, where each model block sets `provider`, `model`, and `apiBase`. Point that `apiBase` at `https://api.tokios.com/v1` with an `sk-tok-…` key and your Tokios **deployment** name as the `model`, and Continue reaches your local model over one authenticated endpoint — no open port on your LAN required.

## Prerequisites

* A running Tokios connector paired with your local model — see [Connector install](https://docs.tokios.com/setup/connector-install.md)
* A registered model deployment name — see [Register a model](https://docs.tokios.com/setup/register-model.md)
* A Tokios API key (`sk-tok-…`) — see [API Keys](https://docs.tokios.com/setup/api-keys.md)
* Continue installed in your editor

## Configure Continue

**1. Open Continue's config file**

Continue reads a YAML config from your home directory:

```bash macOS / Linux theme={"theme":{"light":"github-light","dark":"css-variables"}}
~/.continue/config.yaml
```

```powershell Windows theme={"theme":{"light":"github-light","dark":"css-variables"}}
C:\Users\<you>\.continue\config.yaml
```

The directory is `.continue`, with a leading dot. Older Continue releases used `config.json` instead — if that's what you have, either migrate to YAML or translate the block below into the JSON schema your version expects.

**2. Add an OpenAI-compatible model block**

Add a model entry using an OpenAI-compatible `provider`, with `apiBase` pointed at Tokios and `model` set to your **public deployment name** — for example, `gemma-tunnel`:

```yaml theme={"theme":{"light":"github-light","dark":"css-variables"}}
models:
  - name: Tokios
    provider: openai
    model: gemma-tunnel
    apiBase: https://api.tokios.com/v1
    apiKey: sk-tok-YOUR_KEY
```

`model` is the deployment name you registered in the [Models](https://tokios.com/console/models) tab, not your Ollama, llama.cpp, vLLM, or LM Studio local model id. See [Continue's configuration docs](https://docs.continue.dev/customize/models) for the full set of config keys.

**3. Point chat, edit, and autocomplete at the same model**

Continue lets you assign different roles — chat, edit, autocomplete — to different models. Reference the same `Tokios` model block for each role you want served by your local model. Add the model to the `tabAutocompleteModel` and `chat` sections of your config:

```yaml theme={"theme":{"light":"github-light","dark":"css-variables"}}
chat:
  - name: Tokios
    provider: openai
    model: gemma-tunnel
    apiBase: https://api.tokios.com/v1
    apiKey: sk-tok-YOUR_KEY

tabAutocompleteModel:
  - name: Tokios
    provider: openai
    model: gemma-tunnel
    apiBase: https://api.tokios.com/v1
    apiKey: sk-tok-YOUR_KEY
```

Each section is an independent model list — the `models` block at the top registers the model, and the role sections assign it. See [Continue's configuration docs](https://docs.continue.dev/customize/models) for the full set of role-assignment keys.

> [!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 or checked-in config file.

## Don't bind Ollama to 0.0.0.0

Continue's documented way to reach an Ollama instance on another machine is to set `OLLAMA_HOST=0.0.0.0` on the machine running Ollama and point `apiBase` at that machine's raw LAN IP (for example `http://192.168.1.50:11434`). That makes Ollama listen on every network interface, and Ollama ships with no built-in authentication — anything on the network that can reach the port can list models and run inference with no credential.

Keep Ollama on `127.0.0.1` and run the Tokios connector next to it instead. The connector dials out to `https://api.tokios.com`; Ollama never opens an inbound port, and every request to it needs a valid `sk-tok-…` key:

* **No unauthenticated exposure** — nothing needs to reach your LAN or your machine's port directly.
* **Same `apiBase` from any network** — `https://api.tokios.com/v1` works whether Continue is on the same LAN or a different building entirely.
* **Scoped, revocable keys** — cut off a leaked key on the [Keys](https://tokios.com/console/keys) tab without touching Ollama or the connector.

## Troubleshooting

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

> [accordion] 403 error
>
> The key exists but isn't scoped to the deployment you referenced in `model`, or your account is suspended. Check the key's model patterns on the [Keys](https://tokios.com/console/keys) tab.

> [accordion] 404 error
>
> The `model` value in your config doesn't match a registered deployment. Confirm it 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.

> [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.

## Next steps

> [card] [Ollama remote access](https://docs.tokios.com/guides/ollama-remote-access.md)
>
> See the full case against binding Ollama to `0.0.0.0`, port forwarding, and tunnels — and the outbound-only alternative.

> [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.