Skip to main content
Zed can call a custom model through two separate provider slots in settings.json: language_models.openai_compatible and language_models.anthropic_compatible. Both accept a custom api_url, so Zed is the cleanest place to show off both sides of Tokios — the OpenAI-compatible endpoint at https://api.tokios.com/v1 and the Anthropic-compatible endpoint at https://api.tokios.com. Pick either one, or configure both and switch per-assistant.

Prerequisites

Option A: OpenAI-compatible provider

1

Open Zed's settings.json

Open the command palette and run zed: open settings, or edit settings.json directly.
2

Add an openai_compatible entry

Add a language_models.openai_compatible block with the Tokios base URL, your deployment name, and your API key:
settings.json
Replace gemma-tunnel with the public deployment name you registered on the Models tab — not your Ollama/llama.cpp/vLLM/LM Studio local model id. Note that the key is deliberately absent here — see the next step.
3

Set your API key outside settings.json

Zed does not read the API key from settings.json. Supply your sk-tok-… key either way:
  • Through the UI — run agent: open settings from the command palette, find Tokios under LLM Providers, and paste the key. Zed stores it in your system keychain.
  • Through an environment variable — Zed derives the name from the provider id in settings.json, upper-snake-cased and suffixed with _API_KEY. The id Tokios above therefore reads TOKIOS_API_KEY.
A non-empty environment variable takes precedence over the keychain value, so unset it if you later switch to the UI flow.
4

Select the model in the assistant panel

Open Zed’s assistant panel and choose Tokios: gemma-tunnel (or your configured display_name) from the model picker.

Option B: Anthropic-compatible provider

1

Add an anthropic_compatible entry

In the same settings.json, add a language_models.anthropic_compatible block pointing at the Tokios Anthropic-compatible endpoint. Note there is no /v1 on this base URL:
settings.json
Replace gemma-tunnel with the public deployment name you registered on the Models tab — not your Ollama/llama.cpp/vLLM/LM Studio local model id.
2

Set your API key outside settings.json

Supply your sk-tok-… key the same way as Option A:
  • Through the UI — run agent: open settings from the command palette, find Tokios under LLM Providers in the Anthropic-compatible section, and paste the key. Zed stores it in your system keychain.
  • Through an environment variable — the same TOKIOS_API_KEY variable from Option A covers both provider slots, since the provider id is Tokios in both cases.
3

Select the model in the assistant panel

Open Zed’s assistant panel and choose Tokios (Anthropic): gemma-tunnel (or your configured display_name) from the model picker, alongside or instead of the OpenAI-compatible one.
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 version-controlled settings.json.
You can configure both providers at once and keep separate entries — one hitting https://api.tokios.com/v1 (OpenAI-compatible) and one hitting https://api.tokios.com (Anthropic-compatible) — then switch between them from the model picker to compare behavior against the same underlying deployment.

Why this works without a tunnel

Both Zed provider slots need a URL reachable from wherever Zed’s model requests originate. Tokios’s connector is outbound-only: it dials out from next to your model and never opens an inbound port, so https://api.tokios.com (or /v1) is a stable, authenticated URL you set once — no ngrok process to keep alive, no unauthenticated port sitting open on your LAN.

Troubleshooting

The API key Zed sent is missing, malformed, or has been revoked. Confirm the full sk-tok-… key is set with no extra whitespace, and check its status on the Keys tab.
The name value in available_models doesn’t match a registered deployment. Confirm it exactly matches the public name on the Models tab.
The connector for that deployment is offline or at its concurrency cap. Check the Connectors tab — it needs to show as Online.

Next steps

Quickstart

Pair the connector and register your first deployment from scratch.

Compatible clients

See base URL and key setup for other OpenAI- and Anthropic-compatible clients.