> ## 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 Unsloth Studio from anywhere — safely

> Run a model in Unsloth Studio's no-code UI and reach it from other machines, agents, or teammates through one authenticated endpoint — no inbound ports.

[Unsloth Studio](https://unsloth.ai/docs/new/studio) is an open-source, **no-code web UI** for running, training, and exporting local models. When you run a model in Studio it serves an OpenAI-compatible API on your machine — by default at `http://127.0.0.1:8888`. That's local only. Keep Studio on your machine and run the Tokios connector next to it: the connector dials out to `https://api.tokios.com`, and your tools, teammates, or agents call one authenticated endpoint from anywhere.

> [!TIP]
>
> **Beginner-friendly.** Unsloth Studio is a point-and-click UI — pick a model, run it, and it's serving. Along with [Ollama](https://docs.tokios.com/guides/ollama-remote-access.md) and [LM Studio](https://docs.tokios.com/guides/lm-studio-remote-access.md), it's one of the easiest ways to get a local model behind a Tokios endpoint.

## The outbound-only way

**1. Run a model in Unsloth Studio**

Start Studio and load a model through its UI. Studio launches with:

```bash theme={"theme":{"light":"github-light","dark":"css-variables"}}
unsloth studio -H 0.0.0.0 -p 8888
```

Once a model is running, Studio exposes an OpenAI-compatible API on port `8888`. Leave it on your machine — you don't need to open it to your network.

**2. Pair the Tokios connector**

Sign in at [tokios.com/console](https://tokios.com/console), open the **Setup** tab, and click **Start pairing**. Tokios shows a one-time **claim code** like `TKS-XXXX-XXXX`, valid for about 15 minutes.

On the machine running Studio, run the install one-liner for your OS:

```powershell Windows theme={"theme":{"light":"github-light","dark":"css-variables"}}
irm https://tokios.com/downloads/install/windows | iex; tokios-install -Code 'TKS-XXXX-XXXX'
```

```bash macOS theme={"theme":{"light":"github-light","dark":"css-variables"}}
curl -fsSL https://tokios.com/downloads/install/macos | sh -s -- --code TKS-XXXX-XXXX
```

```bash Linux theme={"theme":{"light":"github-light","dark":"css-variables"}}
curl -fsSL https://tokios.com/downloads/install/linux | sh -s -- --code TKS-XXXX-XXXX
```

Already have `tokios-connector` installed? Pass the code directly instead:

```bash theme={"theme":{"light":"github-light","dark":"css-variables"}}
tokios-connector TKS-XXXX-XXXX
```

Back in the console, **approve** the device on the **Setup** or **Connectors** tab. The connector's token is delivered over the tunnel once approved — you never see it on screen or paste it into a file.

**3. Point the connector at Studio's /v1 API**

For the basic single-model path, enter Studio's OpenAI-compatible endpoint as the upstream: `http://127.0.0.1:8888/v1`. If you're serving several models through a `tokios-connector.json` config, set the upstream `BaseUrl` explicitly:

```json theme={"theme":{"light":"github-light","dark":"css-variables"}}
{
  "Upstream": {
    "BaseUrl": "http://127.0.0.1:8888/v1"
  }
}
```

See [Connector config](https://docs.tokios.com/reference/connector-config.md) for the full multi-model file format.

**4. Register a deployment**

In the [Models](https://tokios.com/console/models) tab, register the model and choose a **public name** — for example, `studio-tunnel`. That public name, not the model id inside Studio, is what clients send in the `model` field.

**5. Create an API key**

In the [Keys](https://tokios.com/console/keys) tab, click **Create key**. Optionally scope it to specific deployments with model-name patterns (comma-separated globs, `*` for all). Copy the `sk-tok-…` key now — it's shown only once.

## Use it from anywhere

Once you have a deployment name and an API key, any OpenAI- or Anthropic-compatible client can reach the model you're running in Studio — from another machine, a teammate's laptop, or a hosted agent.

```bash curl theme={"theme":{"light":"github-light","dark":"css-variables"}}
curl https://api.tokios.com/v1/chat/completions \
  -H "Authorization: Bearer sk-tok-YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "studio-tunnel",
    "stream": true,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

```python Python (OpenAI SDK) theme={"theme":{"light":"github-light","dark":"css-variables"}}
from openai import OpenAI

client = OpenAI(
    base_url="https://api.tokios.com/v1",
    api_key="sk-tok-YOUR_KEY",
)

response = client.chat.completions.create(
    model="studio-tunnel",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
)

for chunk in response:
    print(chunk.choices[0].delta.content or "", end="")
```

```bash Claude Code theme={"theme":{"light":"github-light","dark":"css-variables"}}
export ANTHROPIC_BASE_URL=https://api.tokios.com
export ANTHROPIC_API_KEY=sk-tok-YOUR_KEY
claude --model studio-tunnel
```

> [!TIP]
>
> The `model` field is always your registered **deployment** name (`studio-tunnel` above), never the model id inside Studio. Fine-tuned a model in Studio and exported it to `GGUF`? See [Serve a fine-tune](https://docs.tokios.com/guides/serve-your-fine-tune.md) for the same endpoint flow.

## FAQ

> [accordion] Does streaming work?
>
> Yes. Set `"stream": true` and Tokios returns standard server-sent events (SSE) in OpenAI or Anthropic format, depending on which API surface you called.

> [accordion] Can I use a model I trained in Studio?
>
> Yes. Run it in Studio the same way, or export it to `GGUF` and serve it through Ollama or llama.cpp — either way, register it as a Tokios deployment. See [Serve a fine-tune](https://docs.tokios.com/guides/serve-your-fine-tune.md).

> [accordion] Can I share access with teammates without exposing Studio directly?
>
> Yes. Create a separate `sk-tok-…` key per teammate in the [Keys](https://tokios.com/console/keys) tab, and scope each key to only the deployments they need. Revoking a key stops it from authenticating immediately, so you can cut off access without touching Studio or the connector.

## Your model never leaves your machine — your endpoint works everywhere

Unsloth Studio keeps running on your machine, with no inbound ports and nothing exposed to the network. The connector only dials out. Everything past that — auth, routing, streaming — is one endpoint you can call from any machine, teammate, or agent you choose to give a key to.

> [card] [Quickstart](https://docs.tokios.com/quickstart.md)
>
> Pair a connector and register your first model end to end.

> [card] [Serve a fine-tune](https://docs.tokios.com/guides/serve-your-fine-tune.md)
>
> Turn a model you trained into a private API endpoint.


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