Docs · Integrations
Zed with TopxAI: OpenAI- and Anthropic-compatible providers
Add TopxAI to Zed as an openai_compatible provider for GPT, Grok, Kimi and GLM, and as an anthropic_compatible provider for Claude, in settings.json.
Zed's agent takes custom providers under language_models in settings.json. TopxAI is one openai_compatible provider for the text models on Chat Completions and one anthropic_compatible provider for Claude.
settings.json
{
"language_models": {
"openai_compatible": {
"TopxAI": {
"api_url": "https://ai.topxea.com/v1",
"available_models": [
{
"name": "gpt-6.1-sol",
"display_name": "GPT-6.1 Sol",
"max_tokens": 1000000
},
{
"name": "grok-4.7",
"display_name": "Grok 4.7",
"max_tokens": 500000
},
{
"name": "kimi-k3.1-pro",
"display_name": "Kimi K3.1 Pro",
"max_tokens": 1048576
}
]
}
},
"anthropic_compatible": {
"TopxAI Claude": {
"api_url": "https://ai.topxea.com",
"available_models": [
{
"name": "claude-sonnet-5-5",
"display_name": "Claude Sonnet 5.5",
"max_tokens": 1000000,
"max_output_tokens": 128000,
"capabilities": {
"tools": true,
"images": true,
"prompt_caching": true
}
},
{
"name": "claude-opus-5-5",
"display_name": "Claude Opus 5.5",
"max_tokens": 1000000,
"max_output_tokens": 128000,
"capabilities": {
"tools": true,
"images": true,
"prompt_caching": true
}
}
]
}
}
}
}
The key does not go in settings.json. Enter it in the provider's row in the agent settings, or export the variable Zed derives from the provider name: TOPXAI_API_KEY and TOPXAI_CLAUDE_API_KEY for the two providers above.
Notes
max_tokensis the context window Zed assumes for its "context left" meter; use the model's real window.- Enable
prompt_cachingon the Claude provider: TopxAI forwardscache_controlbreakpoints and bills cache reads at one tenth of the input price. - Zed's Edit Prediction has its own provider setting and is not covered by these entries.
If it fails
- 401: the key is wrong or was pasted with a space. 402: the balance is empty. 403: the model id is not sold here or is not on this key's route. See Common error responses.
- The model works in curl but not in the tool: that page lists the usual causes, one per tool.
Models: gpt-6.1-sol, grok-4.7 · Models & pricing
Related
- Connect your SDK
- Create an API key and choose a route
- The model works in curl but not in my tool
- Common error responses
- Continue with TopxAI: models in config.yaml
- Cursor with TopxAI: override the OpenAI base URL
- GPT-6.1 Sol API pricing
- Grok 4.7 API pricing
Previous: Continue with TopxAI: models in config.yaml · Next: Aider with TopxAI: OPENAI_API_BASE and the model name
Other languages: 简体中文