April 28, 20263 min readSetupClaude Haiku 4.5Zed

How to use Claude Haiku 4.5 in Zed

Zed is a fast, Rust-based code editor with a built-in AI assistant panel. Claude Haiku 4.5 is Anthropic's small, low-latency model — quick enough for inline edits and cheap enough to run all day. Pairing the two gives you a snappy AI coding loop without paying flagship prices. This guide shows how to wire Haiku 4.5 into Zed using a single OpenAI-compatible endpoint.

Why Haiku 4.5 for in-editor work

Editor assistants live or die on latency. You want completions, refactors, and "explain this function" answers back in a second or two, not after a long pause. Haiku 4.5 is built for exactly that: fast responses, solid coding ability, and a low per-token cost that makes frequent calls painless.

The catch is plumbing. Zed expects an API provider, and juggling separate keys for Anthropic, OpenAI, and others gets old fast. That is where a gateway helps.

One endpoint for every model

AnyModel is an OpenAI-compatible gateway: one base_url and one API key reach every model it carries — GPT, Claude, Gemini, DeepSeek, GLM, Kimi, Qwen, and Grok. Switching models means changing the model id and nothing else. No new keys, no new SDKs.

That matters in Zed because you can point the editor at AnyModel once, then flip between Haiku 4.5 for quick edits and a heavier model for tough debugging — same configuration, same key. Compare options on the models page or side by side on compare.

Setting up Zed

Zed lets you add an OpenAI-compatible provider directly in its settings. There is no one-line installer for Zed (that exists only for codex, claude, opencode, and hermes), so you configure it by hand.

  1. Open Zed settings: Cmd+, (macOS) or Ctrl+, (Linux), which opens settings.json.
  2. Add AnyModel as an OpenAI-compatible provider with the values below.
  3. Reload Zed, open the Assistant panel, and pick your AnyModel provider.
{
  "language_models": {
    "openai": {
      "api_url": "https://anymodel.org/v1",
      "available_models": [
        {
          "name": "claude-haiku-4-5",
          "display_name": "Claude Haiku 4.5",
          "max_tokens": 200000
        }
      ]
    }
  }
}

When Zed prompts for the OpenAI API key, paste your AnyModel key instead. The editor talks to https://anymodel.org/v1 exactly as if it were the OpenAI API, and the gateway routes your request to Haiku 4.5.

Verify the connection

Before debugging inside Zed, confirm the key and endpoint work from your terminal:

curl https://anymodel.org/v1/chat/completions \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-haiku-4-5","messages":[{"role":"user","content":"Say hi in one word"}]}'

A short JSON reply means you are ready. If you get a 401, recheck the key; a 404 usually means a typo in the model id.

Switching models without reconfiguring

Add more entries to available_models to keep several models one click apart in Zed's model picker:

Use case Suggested model id
Fast inline edits, completions claude-haiku-4-5
Deep reasoning, gnarly bugs a larger Claude or GPT id
Long-context review a high-context model id

Because every id rides the same key and base_url, adding a model is a one-line change, not a new integration.

Cost and privacy notes

AnyModel is free to start: you get 1,000,000 tokens on signup, and 6,000,000 total if you link Telegram — no credit card required. After that it is pay-per-token with no subscription and no minimums, so an editor that fires off many small Haiku calls stays cheap.

If your code is sensitive, enable Ghost Mode for zero-retention keys: prompts and responses are not stored on our side, only a token counter for billing. Note that the model provider still receives your prompt to generate a response, so this is not "100% privacy" — it simply means AnyModel keeps no copy.

Wrap-up

With one endpoint and one key, Claude Haiku 4.5 slots into Zed in a couple of minutes, and you can graduate to bigger models whenever a task demands it. For more setup walkthroughs, browse the blog.

Ready to code faster in Zed? Create your free AnyModel account and start with a million tokens, no card needed.

Read next