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
- A running Tokios connector paired with your local model — see Connector install
- A registered model deployment name — see Register a model
- A Tokios API key (
sk-tok-…) — see API Keys - Zed installed
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 Replace
language_models.openai_compatible block with the Tokios base URL, your deployment name, and your API key:settings.json
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 A non-empty environment variable takes precedence over the keychain value, so unset it if you later switch to the UI flow.
settings.json. Supply your sk-tok-… key either way:- Through the UI — run
agent: open settingsfrom 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 idTokiosabove therefore readsTOKIOS_API_KEY.
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 Replace
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
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 settingsfrom 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_KEYvariable from Option A covers both provider slots, since the provider id isTokiosin 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.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, sohttps://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
401 error
401 error
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.404 error
404 error
The
name value in available_models doesn’t match a registered deployment. Confirm it exactly matches the public name on the Models tab.503 error
503 error
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.