How to use Claude Haiku 4.5 in Cursor
Claude Haiku 4.5 is Anthropic's small, fast model — built for low latency and tight cost-per-token while still handling real coding work. That combination makes it a great fit for Cursor, where you want the AI to keep up with your typing during inline edits, autocompletes, and quick chat questions. The catch: Cursor doesn't expose every model out of the box, and pricing through built-in providers isn't always what you want.
This guide shows how to run Claude Haiku 4.5 in Cursor through AnyModel — one OpenAI-compatible endpoint that reaches Claude, GPT, Gemini, DeepSeek, and more with a single API key.
Why route Haiku 4.5 through AnyModel
Cursor speaks the OpenAI API format. AnyModel exposes every model behind one OpenAI-compatible base URL, so you point Cursor at AnyModel once and then switch between models by changing a single string. No second account, no separate billing per provider.
A few practical reasons this works well:
- One key, many models. The same API key reaches Claude Haiku 4.5, Sonnet, GPT, Gemini, Grok, Qwen, Kimi, GLM, and DeepSeek. Want to compare a heavier model on a hard bug? Change the
modelid, nothing else. See the full model list or a side-by-side comparison. - Pay-per-token, no subscription. No monthly minimums. You're billed for what you actually send.
- Free to start. You get 1,000,000 tokens on signup with no credit card, and up to 6,000,000 total if you link Telegram — plenty to test Haiku 4.5 across a real project.
Step 1: Get your API key
Create an account and copy your key from the dashboard. New accounts include the free token grant, so you can configure Cursor and start coding immediately.
Step 2: Point Cursor at AnyModel
Cursor isn't one of the tools covered by AnyModel's one-line installer (that's codex, claude, opencode, and hermes). For Cursor you use the standard OpenAI-compatible setup, which takes about a minute:
- Open Cursor and go to Settings → Models (or Cursor Settings → Models).
- Find the OpenAI API Key section and expand Override OpenAI Base URL.
- Set the base URL to:
https://anymodel.org/v1
- Paste your AnyModel API key into the key field.
- Add a custom model and name it with the Haiku 4.5 model id, for example:
claude-haiku-4-5
- Save, then enable that model so it appears in Cursor's model picker.
Tip: if Cursor offers a "Verify" button, run it after saving. A green check confirms the base URL and key are reachable. If verification fails, double-check there's no trailing slash issue and that you copied the full key.
Step 3: Use it
Pick claude-haiku-4-5 in the chat or Cmd/Ctrl-K inline edit dropdown and start working. Because Haiku 4.5 is optimized for speed, it shines on:
| Task | Why Haiku 4.5 fits |
|---|---|
| Inline edits (Cmd/Ctrl-K) | Low latency keeps edits feeling instant |
| Quick chat questions | Fast turnarounds for "what does this do?" |
| Refactors & boilerplate | Cheap per token, handles repetitive code well |
| First-pass drafts | Generate, then escalate to a bigger model if needed |
For deep multi-file reasoning or a stubborn architectural problem, switch the model id to a larger Claude or GPT model — same key, same endpoint.
A quick sanity check from the terminal
Before debugging Cursor settings, you can confirm your key and the model id work with a plain curl:
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."}]
}'
If that returns a completion, the same credentials will work in Cursor.
A note on privacy
Your code prompts pass through AnyModel to the model provider. If you'd rather they not be stored on our side, turn on Ghost Mode — opt-in zero-retention keys where we keep only a token counter, not your prompts or responses. To be honest about it: the model provider still receives the prompt to generate a response, so this isn't absolute privacy — but it removes our storage from the equation.
Wrap-up
Claude Haiku 4.5 gives Cursor a fast, affordable default for everyday coding, and routing it through AnyModel means one key for every model you'll ever want to try. Browse more setup guides on the blog when you're ready to add other editors or CLIs.
Ready to code with it? Create your free AnyModel account and get a million tokens to start — no credit card required.
AnyModel