Zed Setup
Zed is a fast code editor with a built-in AI agent panel. This guide connects it to the API in about 3 minutes.
1. Create an API key
- Sign up on the registration page.
- In the console, open the API token page, create a token, and copy the key. It starts with
sk-.
2. Connect Zed
From the UI. Open Agent Settings (agent: open settings), find Add Provider in the LLM Providers section, and fill in:
- Provider name:
Gateway - API URL:
https://api.cmoso.com/v1 - Model ID: for example
claude-sonnet-5-5, with a context window such as200000 - API key: your key
Or in settings.json:
{
"language_models": {
"openai_compatible": {
"Gateway": {
"api_url": "https://api.cmoso.com/v1",
"available_models": [
{ "name": "claude-sonnet-5-5", "display_name": "Claude Sonnet 5.5", "max_tokens": 200000 },
{ "name": "gpt-5.4", "display_name": "GPT-5.4", "max_tokens": 200000 }
]
}
}
}
}
Then enter the API key in the Gateway provider settings, or set the GATEWAY_API_KEY environment variable. Do not put the key in settings.json.
3. Pick a model and test
In the Agent Panel, select an Gateway model and send a message.
Popular model IDs: claude-sonnet-5-5, gpt-5.4, gemini-3.1-flash-lite, deepseek-v4-pro, qwen3.5-plus.
Troubleshooting
- 401 Unauthorized: the API key is wrong or disabled. Copy it again from the console.
- Model not found: check the model ID spelling. IDs are case-sensitive.
- Connection error: check that the base URL ends with
/v1and has no trailing slash.