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

> Point SillyTavern's Chat Completion source at Tokios as a custom OpenAI-compatible endpoint so this power-user front-end can drive a model on your own hardware.

SillyTavern is the power-user / roleplay front-end for local models, with fine-grained control over prompts, sampling, and characters. Its **Chat Completion** backend can point at any custom OpenAI-compatible endpoint — set the source to **Custom (OpenAI-compatible)**, enter `https://api.tokios.com/v1` and your `sk-tok-…` key, and SillyTavern drives a model running on your own hardware.

## Prerequisites

> [card] [Connector paired](https://docs.tokios.com/setup/connector-install.md)
>
> Install and pair `tokios-connector` next to the model you want SillyTavern 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.

## Connect SillyTavern to Tokios

**1. Open API Connections**

Click the **plug** icon to open the **API Connections** panel.

**2. Choose Chat Completion → Custom (OpenAI-compatible)**

Set **API** to **Chat Completion**, then set **Chat Completion Source** to **Custom (OpenAI-compatible)**.

**3. Set the endpoint and key**

Fill in the custom-endpoint fields:

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

> [!NOTE]
>
> Use `https://api.tokios.com/v1`. SillyTavern adds `/chat/completions` itself, so **do not** append it. If a connection fails and you left `/v1` off, adding it is the first thing to try.

**4. Enter your deployment as the model and connect**

Enter the **public deployment name** you registered in the [Models](https://tokios.com/console/models) tab — for example, `gemma-tunnel` — as the model id, then click **Connect**. This is the value SillyTavern sends in the `model` field, not your backend'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.

## Power-user front-end, model on your hardware

SillyTavern gives you deep control over prompting and sampling; Tokios gives whatever model you're running a stable, authenticated endpoint. The connector next to your model dials out to Tokios, and SillyTavern — on the same machine or another one — calls `https://api.tokios.com/v1` with your `sk-tok-…` key. Your prompts and characters stay yours; only the connector's outbound tunnel touches Tokios.

## Troubleshooting

> [accordion] 401 error
>
> The API key SillyTavern 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 doesn't match a registered deployment, or the base URL is wrong. Confirm the model name matches the public name on the [Models](https://tokios.com/console/models) tab, that the base URL is `https://api.tokios.com/v1`, and that you did **not** append `/chat/completions`.

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

> [card] [API keys](https://docs.tokios.com/setup/api-keys.md)
>
> Create, scope, and rotate `sk-tok-…` keys for teammates and agents.


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