Loading...

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

If it fails

Models: gpt-6.1-sol, grok-4.7 · Models & pricing

Related

Previous: Continue with TopxAI: models in config.yaml · Next: Aider with TopxAI: OPENAI_API_BASE and the model name

Other languages: 简体中文