How to use Claude Haiku 4.5 in Windsurf
Claude Haiku 4.5 is Anthropic's small, fast model — built for low latency and low cost while keeping surprisingly strong coding and reasoning ability. That makes it a great default for Windsurf, where you want autocomplete-speed responses and quick inline edits without burning through a budget. The catch: Windsurf doesn't ship Haiku 4.5 on every plan, and switching providers natively can be clunky.
This guide shows how to plug Claude Haiku 4.5 into Windsurf using a single OpenAI-compatible endpoint, so you can keep your editor and just point it at the model you want.
Why route Haiku 4.5 through AnyModel
AnyModel is a unified gateway: one OpenAI-compatible endpoint and one API key reach every major model — Claude, GPT, Gemini, DeepSeek, GLM, Kimi, Qwen, and Grok. To switch models you change one string (the model id) and nothing else.
For Windsurf specifically that means:
- No per-provider keys. One key covers Haiku 4.5 today and Sonnet or GPT tomorrow.
- Standard OpenAI schema. Windsurf's "custom provider" / OpenAI-compatible field works out of the box.
- Pay-per-token, no subscription. No seat fees, no minimums — you pay for what the model actually processes.
You also start free: 1,000,000 tokens on signup, up to 6,000,000 total if you link Telegram, no credit card. That's plenty to evaluate Haiku 4.5 in real editing sessions before spending a cent.
Step 1: Get your API key
Create an account and copy your key from the dashboard. Keep it somewhere safe — it's the only credential you'll need.
Step 2: Add AnyModel as a custom model in Windsurf
Windsurf isn't one of the four tools covered by AnyModel's one-line installer (that's codex, claude, opencode, and hermes), so you'll use the standard manual OpenAI-compatible setup. In Windsurf, open Settings → Windsurf Settings → Models (or the model picker's "Add custom model" / OpenAI-compatible provider section) and fill in:
| Field | Value |
|---|---|
| Base URL | https://anymodel.org/v1 |
| API key | your AnyModel key |
| Model id | claude-haiku-4-5 |
Save, then select the new model in Windsurf's Cascade or autocomplete model dropdown.
Step 3: Confirm it works
Before testing inside the editor, a quick curl proves the endpoint and key are good:
curl https://anymodel.org/v1/chat/completions \
-H "Authorization: Bearer $ANYMODEL_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-4-5",
"messages": [{"role": "user", "content": "Reply with: ready"}]
}'
A normal JSON completion back means Windsurf will work too. If you get a 401, re-check the key; a 404 on the model usually means a typo in the model id.
Getting the most out of Haiku 4.5 in Windsurf
Haiku 4.5 shines on high-frequency, latency-sensitive work:
- Inline edits and autocomplete — its speed keeps suggestions snappy.
- Quick refactors, renames, and docstrings where you don't need a frontier model.
- Cheap iteration while drafting, then escalate to a larger model for tricky architecture.
Because switching is a one-field change, a good workflow is to keep Haiku 4.5 as your everyday driver and add a second custom model (say claude-sonnet-4-5 or a GPT id) for the hard problems. Not sure which to reach for? The model comparison page lays out trade-offs side by side, and the full model list shows everything reachable from the same key.
A note on privacy
Standard requests pass through AnyModel to Anthropic. If you want zero retention on our side, enable Ghost Mode — your prompts and responses aren't stored by us, only a token counter runs. Be honest with yourself about what that means: the model provider still receives the prompt, so this isn't "100% privacy," but it does keep your code off our servers.
Wrapping up
Adding Claude Haiku 4.5 to Windsurf takes three fields: base URL, key, and model id. From there you get a fast, low-cost coding model — and the freedom to swap in any other model later without touching your setup. For more walkthroughs like this, browse the blog.
Ready to try it? Create a free account, grab your key, and paste it into Windsurf in under five minutes.
AnyModel