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

# Point NanoClaw at your own local model

> Point NanoClaw's Claude Agent SDK backend at Tokios's Anthropic-compatible endpoint so your containerized AI agent runs on a model on your own hardware.

NanoClaw is a lightweight, containerized personal AI agent — a smaller alternative to OpenClaw — that connects to WhatsApp, Telegram, Slack, Discord, and email, with memory and scheduled jobs. It runs on **Anthropic's Claude Agent SDK**, so it points at Tokios through the **Anthropic-compatible** surface: set `ANTHROPIC_BASE_URL` to `https://api.tokios.com` and NanoClaw's agent runs on a model on your own hardware.

> [!WARNING]
>
> NanoClaw uses the **Anthropic** API surface, so the base URL is the bare host `https://api.tokios.com` with **no `/v1`** — the same shape as [Claude Code](https://docs.tokios.com/guides/claude-code.md). This is the opposite of the OpenAI-style clients that need `/v1`.

## Prerequisites

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

## Point NanoClaw's backend at Tokios

**1. Open NanoClaw's .env**

Edit the `.env` file in your NanoClaw install.

**2. Set the Anthropic base URL and token**

Point the Claude Agent SDK backend at Tokios:

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

Your `sk-tok-…` key goes in `ANTHROPIC_AUTH_TOKEN` (the bearer token the SDK sends). No `/v1` on the base URL.

**3. Use your deployment as the model**

Set the agent's model to the **public deployment name** you registered in the [Models](https://tokios.com/console/models) tab — for example, `gemma-tunnel`. NanoClaw defaults to Claude model names; when it points at Tokios, the model it requests must be your deployment name. The exact per-agent-group model setting varies by NanoClaw version — check yours.

**4. Restart NanoClaw**

Restart NanoClaw (or its container) so it reloads the `.env`. Its agent now runs on your model through Tokios.

> [!NOTE]
>
> NanoClaw can also use OpenAI-compatible or local backends through optional skills (for example `/add-opencode` for OpenAI/OpenRouter, or `/add-ollama-provider`). For those paths, use the OpenAI base `https://api.tokios.com/v1` instead. Never commit a real `sk-tok-…` key into version control.

## A private agent on a private model

NanoClaw keeps its Claude agents in isolated containers on your own machine; Tokios gives whatever model you're running a stable, authenticated endpoint. The connector next to that model dials out to Tokios, and NanoClaw reaches it at `https://api.tokios.com` with your token — a self-hosted assistant on a self-hosted model, without an inbound port or VPN.

## Troubleshooting

> [accordion] 401 error
>
> The token NanoClaw sent is missing, malformed, or has been revoked. Confirm `ANTHROPIC_AUTH_TOKEN` holds 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 doesn't match a registered deployment, or a `/v1` slipped into the base URL. Confirm the model is your public deployment name from the [Models](https://tokios.com/console/models) tab, and that `ANTHROPIC_BASE_URL` is the bare `https://api.tokios.com` with no `/v1`.

> [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] [Use Claude Code](https://docs.tokios.com/guides/claude-code.md)
>
> The same Anthropic-compatible base URL and key pattern, for the Claude Code CLI.

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