June 25, 20263 min readSetupZed

How to use Zed through one API

Zed is a fast, Rust-built code editor with a capable AI assistant baked in. By default you wire it up to one provider at a time — an OpenAI key here, an Anthropic key there. That gets tedious fast, and it locks each model behind its own billing and dashboard.

There's a simpler path: point Zed at a single OpenAI-compatible endpoint and reach every major model with one key. This guide shows how.

Why one endpoint for Zed

Zed's assistant speaks the OpenAI Chat Completions format. Any backend that implements that same format can stand in as a provider. AnyModel exposes exactly one such endpoint:

  • base_url: https://anymodel.org/v1
  • One API key reaches GPT, Claude, Gemini, DeepSeek, GLM, Kimi, Qwen, and Grok.
  • Switching models means changing the model id — nothing else in your config.

So instead of juggling separate keys for each vendor, you configure Zed once and pick the model per task: a fast cheap model for autocomplete-style edits, a frontier model for tricky refactors.

Step 1: Get a key

Create an account and grab your key — no credit card required. You start with 1,000,000 free tokens, and that jumps to 6,000,000 total if you link Telegram. After the free tier it's pay-per-token: no subscription, no monthly minimums.

Step 2: Configure Zed

Zed doesn't have a one-line installer, so this is a manual OpenAI-compatible setup. Open your Zed settings.json (Command Palette → zed: open settings) and add an OpenAI-compatible provider that points at the AnyModel base URL.

{
  "language_models": {
    "openai": {
      "api_url": "https://anymodel.org/v1",
      "available_models": [
        { "name": "gpt-5", "max_tokens": 128000 },
        { "name": "claude-sonnet-4-5", "max_tokens": 200000 },
        { "name": "deepseek-chat", "max_tokens": 64000 }
      ]
    }
  }
}

Then add your AnyModel key. In Zed's Assistant panel, open the provider settings and paste the key into the OpenAI API key field — Zed sends it as a Bearer token to the api_url you set above. Restart the assistant panel if the models don't appear immediately.

Note: model ids shown above are examples. Check the models list for the exact ids available, and use those strings verbatim in available_models.

Step 3: Switch models freely

Once configured, the model dropdown in Zed's assistant lists everything you declared in available_models. Want to compare a Claude response against a Gemini one for the same prompt? Switch the dropdown and re-run — same key, same endpoint, same billing. If you're unsure which model fits a task, the compare page lays out strengths side by side.

A practical workflow:

Task Reach for
Quick inline edits A fast, low-cost model
Multi-file refactors A frontier reasoning model
Long-context review A large-context model

Because every call hits one endpoint, you can change your mind mid-session without touching config files.

A note on privacy

By default, requests pass through normally. If you'd rather not have prompts and responses retained on our side, turn on Ghost Mode — opt-in, zero-retention keys where we keep only a token counter. Be clear-eyed about the limit: the underlying model provider still receives your prompt, so this isn't "100% privacy," just no storage on our end.

Beyond Zed

The same key and base URL work across other OpenAI-compatible clients — Cursor, Windsurf, Cline, Aider, Continue, and the Gemini CLI all use the identical manual setup. For a few CLI tools (codex, claude, opencode, hermes) there's an even faster one-line installer:

bash <(curl -fsSL "https://anymodel.org/i?tool=codex") <YOUR_API_KEY>

Zed isn't on that installer list, so the manual settings.json route above is the way. For more editor and CLI walkthroughs, browse the blog.

Get started

One endpoint, one key, every major model — right inside Zed. Create your free account and start with a million tokens, no card needed.

Read next