IDE guide
Zed setup: add an OpenAI-compatible provider for the Agent Panel
Add our gateway to Zed via language_models.openai_compatible in settings.json, enter your key, pick Claude, GPT, Grok or DeepSeek in the Agent Panel and fix errors.
On this page
https://api.oneaiapikey.com/v1Zed is a fast, native code editor with a built-in Agent Panel. Besides its own hosted models, Zed lets you register any OpenAI-compatible service as a language model provider. Add our gateway once and you can drive Zed’s agent with Claude, GPT, Grok or DeepSeek using one key and one prepaid balance.
What you need
- A recent version of Zed (OpenAI-compatible providers are configured through
language_models.openai_compatible). - A funded account; top-ups start at $3: create an account.
- An API key from the API keys page (it begins with
sk-).
Step 1: open settings.json
Open the command palette and run zed: open settings file. (Plain zed: open settings opens the graphical Settings Editor instead, which is handy for most options but not for this block.) The file lives at ~/.config/zed/settings.json on macOS and Linux and at %APPDATA%\Zed\settings.json on Windows.
Step 2: add the provider
Merge the language_models block below into your settings. If you already have a language_models key, add the openai_compatible entry inside it rather than creating a second one.
{
"language_models": {
"openai_compatible": {
"Relaykit": {
"api_url": "https://api.oneaiapikey.com/v1",
"available_models": [
{
"name": "claude-sonnet-5",
"display_name": "Claude Sonnet 5",
// conservative context budget; raise it if you know the model's limit
"max_tokens": 200000,
"max_output_tokens": 32000,
"capabilities": {
"tools": true,
"images": true,
"parallel_tool_calls": false,
"prompt_cache_key": false,
"chat_completions": true
}
},
{
"name": "deepseek-v4-flash",
"display_name": "DeepSeek V4 Flash",
"max_tokens": 128000,
"max_output_tokens": 16000,
"capabilities": {
"tools": true,
"images": false,
"parallel_tool_calls": false,
"prompt_cache_key": false,
"chat_completions": true
}
}
]
}
}
}
}What the fields mean:
- The key inside
openai_compatible(hereRelaykit) is the provider name shown in Zed. api_urlincludes/v1.- Each entry in
available_modelsneeds anamethat matches a catalogue id exactly.display_nameis just the label in the picker. max_tokensis the context budget Zed plans around andmax_output_tokenscaps a single reply. The numbers above are conservative placeholders, so adjust them if you know a model’s real limits.capabilities.toolsmust betruefor agentic use, because the Agent Panel works through tool calls. Setimagestotrueonly for models that accept images.chat_completions: truekeeps Zed on the widely supported Chat Completions endpoint.
Settings files in Zed accept comments, so the // line in the example is fine.
Step 3: enter your API key
Open the Agent Panel, go to its settings view, find your provider under the LLM providers list, and paste your sk- key. Zed stores it in your system keychain rather than in settings.json.
Alternatively, set an environment variable before launching Zed. Zed derives the variable name from the provider name in uppercase, which for this config is RELAYKIT_API_KEY. The provider’s settings view shows the exact name it expects.
export RELAYKIT_API_KEY="sk-your-key-here"Recommended models
Add any of these to available_models. Rates are USD per 1M tokens:
| Model id | Good for | Input | Output |
|---|---|---|---|
claude-sonnet-5 | Daily coding, Code review, Writing | $2.20 | $11 |
claude-opus-5-5 | Agentic coding, Large refactors, Complex reasoning | $4.40 | $22 |
gpt-6.1-sol | Codex CLI, Tool calling, Long context | $2.20 | $11 |
grok-4.6 | Fast answers, Research, Chat | $2.20 | $6.60 |
deepseek-v4-flash | Budget coding, Sub-agents, Batch jobs | $0.24 | $0.96 |
claude-sonnet-5 is a strong default for the agent; deepseek-v4-flash is a low-cost option for quick questions and inline assists. See every model on the models page.
Step 4: verify it works
Open the Agent Panel, click the model selector, and choose one of the models listed under your provider name. Ask a simple question about the open project. A normal reply means the provider works, and you’ll see the request in your console’s usage log a few seconds later.
To check the key independently of Zed:
curl -sS https://api.oneaiapikey.com/v1/models -H "Authorization: Bearer sk-your-key-here"Troubleshooting
The provider or models don’t show up. Zed couldn’t parse your settings, or the block is nested in the wrong place. Zed highlights JSON errors in the settings file; fix them and the provider appears without a restart.
401 Unauthorized. No key, or a wrong one, is stored for this provider. Re-enter it in the Agent Panel settings. If you rely on the environment variable, make sure Zed was launched from a shell where it’s set.
404 Not Found. api_url must be exactly https://api.oneaiapikey.com/v1: no trailing slash, no endpoint path.
“Model not found” or “no available channel”. A name in available_models doesn’t match a catalogue id. Ids are lowercase with exact dots and dashes.
The agent answers but never edits files. Tool calling is off for that model. Set capabilities.tools to true.
Long replies stop or time out. Zed streams responses, which keeps long generations alive. If you call the API from your own code, use "stream": true for long outputs: proxies cut idle non-streaming requests at about 100 seconds.
Next steps
Pair Zed with a terminal agent like Claude Code or OpenCode, or browse every tool guide. Current rates for all models are on the pricing page.