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

# Connect Open WebUI to your local model through Tokios

> Add Tokios as an OpenAI connection in Open WebUI so a hosted or containerized UI can reach a model running on your own machine.

In Open WebUI, open **Admin Settings → Connections → OpenAI**, click **Add Connection**, and set the URL to `https://api.tokios.com/v1` with your `sk-tok-…` key as the API key. Open WebUI calls `/v1/models` to verify the connection and populate its model dropdown — Tokios implements that endpoint, so verification succeeds and your registered deployments show up right away.

## Prerequisites

Before you add the connection, have these ready:

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

> [card] [Model registered](https://docs.tokios.com/setup/register-model.md)
>
> Register a deployment (public name) for the model you want Open WebUI to see.

> [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 an OpenAI connection

**1. Open Connections settings**

In Open WebUI, go to **Admin Settings → Connections**. The exact menu path and labels may differ slightly by Open WebUI version — confirm against the version you're running.

**2. Add an OpenAI connection**

Under the **OpenAI** section, click **Add Connection** (sometimes shown as a **+** button).

**3. Enter the Tokios URL and key**

Set the connection fields:

* **URL**: `https://api.tokios.com/v1`
* **Key**: `sk-tok-YOUR_KEY`

```text theme={"theme":{"light":"github-light","dark":"css-variables"}}
URL: https://api.tokios.com/v1
Key: sk-tok-YOUR_KEY
```

Save the connection.

> [!WARNING]
>
> Never paste a real key into a shared or public Open WebUI instance's config where other admins or exported settings could expose it. Treat the `sk-tok-…` key like any other credential.

## Your models appear automatically

Open WebUI calls `GET /v1/models` against the URL you entered to verify the connection and to populate the model picker. Tokios implements `/v1/models`, returning the deployments your key is scoped to — so the connection verifies successfully and your deployment names (for example, `gemma-tunnel`) appear in Open WebUI's model dropdown without any manual entry.

This is worth calling out because it's not universal: some custom OpenAI-compatible endpoints skip `/v1/models` entirely, which makes Open WebUI's connection check fail or leaves the model list empty even though chat completions would otherwise work. Tokios avoids that failure mode by implementing `/v1/models` as a first-class part of its API surface.

Pick the deployment you want from the dropdown and start chatting — every request Open WebUI sends goes to `https://api.tokios.com/v1/chat/completions` with your key as the Bearer token, over the tunnel, to your local backend.

## Hosted UI, home model

The common shape this solves: you run Open WebUI on a VPS, a container host, or any machine that isn't the one running your model, and you want it to reach the model without exposing that model's port to the internet.

Because the Tokios connector only dials outward from the machine running your model, you don't need to:

* Bind your backend to `0.0.0.0` (for example `OLLAMA_HOST=0.0.0.0`) just so a remote Open WebUI can reach it.
* Juggle `host.docker.internal` or container networking tricks to bridge a containerized Open WebUI to a model on the host or on another box.
* Open an inbound port or set up a VPN between the two machines.

Open WebUI (wherever it's hosted) talks to `https://api.tokios.com/v1`, authenticated with your `sk-tok-…` key. Tokios routes the request over the tunnel to the connector running next to your model, which stays on localhost the whole time.

## Troubleshooting

> [accordion] Open WebUI shows "could not connect" or fails to verify the connection
>
> Check the URL includes `/v1` (`https://api.tokios.com/v1`, not the bare domain) and that the key starts with `sk-tok-`. A `401` means the key is missing or invalid; a `403` means the key isn't scoped to the model you're requesting. See [API endpoints](https://docs.tokios.com/reference/api-endpoints.md) for the full error list.

> [accordion] The connection verifies, but the model dropdown is empty
>
> Make sure you've registered at least one deployment on the [Models](https://tokios.com/console/models) tab, and that your key's model-pattern scope (set on the [Keys](https://tokios.com/console/keys) tab) includes it.

> [accordion] Connection verifies but chat requests fail
>
> Confirm the connector is online on the [Connectors](https://tokios.com/console) tab. A `503` response means the connector is offline or over its concurrency cap.

## Now put it to work everywhere else

Once Open WebUI is talking to your model through Tokios, the same deployment and key work from any other OpenAI- or Anthropic-compatible client — no extra setup per client.

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

> [card] [API keys](https://docs.tokios.com/setup/api-keys.md)
>
> Create separate scoped keys for teammates using the same Open WebUI instance.


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