Claude Haiku 4.5 API - pricing, context window and best use cases
Claude Haiku 4.5 is Anthropic's fastest and most cost-effective model in the Claude 4.5 generation. It is built for high-volume, latency-sensitive work where you want solid reasoning without paying Opus or Sonnet prices. This guide covers the numbers that matter — pricing, context window, model id — and where Haiku 4.5 actually earns its place in production.
Pricing
Claude Haiku 4.5 is priced per token, with no subscription and no minimums:
| Per 1M tokens | |
|---|---|
| Input | $1.00 |
| Output | $5.00 |
That makes it roughly a third of Sonnet 4.6's input price and a fifth of Opus 4.8's. For workloads that run millions of requests — classification, routing, extraction — the difference compounds fast. Prompt caching cuts the bill further: cached input reads cost about a tenth of the base input rate, so a large shared system prompt or document context becomes nearly free on repeat requests.
Context window and output limits
| Spec | Value |
|---|---|
| Context window | 200K tokens |
| Max output | 64K tokens |
| Model id | claude-haiku-4-5 |
200K tokens is enough to hold a long document, a sizeable codebase slice, or a multi-turn conversation history without truncation. The 64K output ceiling covers almost any single-response generation task; for large outputs, stream the response to avoid HTTP timeouts.
One thing to know: Haiku 4.5 does not support the effort parameter or adaptive thinking — those are reserved for the Opus and Sonnet 4.6 tiers. Haiku 4.5 supports extended thinking via an explicit token budget if you need step-by-step reasoning, but its real strength is fast, direct answers. It also supports structured outputs and tool use, so it slots cleanly into agentic pipelines as a worker model.
Best use cases
Haiku 4.5 shines wherever speed and cost beat raw frontier intelligence:
- Classification and routing — sentiment, intent, spam, content moderation, ticket triage. One-word answers at scale.
- Extraction — pulling structured fields (names, dates, amounts, entities) out of unstructured text, with
strict: truetool schemas for guaranteed-valid JSON. - Real-time chat and autocomplete — low latency keeps interactive UIs responsive.
- Subagents in a larger system — use Haiku for cheap parallel exploration (file reads, search, summarization) while a stronger model handles the main reasoning loop.
- High-volume summarization — batch jobs where per-request cost is the constraint.
When a task needs deep multi-step reasoning, large refactors, or long-horizon agentic work, step up to a Sonnet or Opus model instead. See our model comparison to weigh the tradeoffs, or browse the full model catalog to find the right fit per route.
Calling Claude Haiku 4.5 through AnyModel
AnyModel is a single OpenAI-compatible gateway: one base_url, one API key, every model. Switching from GPT or Gemini to Claude Haiku 4.5 means changing the model id — nothing else in your code changes.
curl https://anymodel.org/v1/chat/completions \
-H "Authorization: Bearer $ANYMODEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-haiku-4-5",
"messages": [{"role": "user", "content": "Classify this review as positive or negative: Loved it."}]
}'
Point any OpenAI-compatible client (Cursor, Windsurf, Zed, Cline, Aider, Continue, Gemini CLI) at https://anymodel.org/v1 with your key. For the supported CLIs — codex, claude, opencode, hermes — there is a one-line installer:
bash <(curl -fsSL "https://anymodel.org/i?tool=claude") <YOUR_API_KEY>
Because every model lives behind the same endpoint, you can A/B Haiku 4.5 against Sonnet 4.6 or GPT for a given task with a single string swap, then keep whichever wins on cost-per-correct-answer.
Privacy
If you handle sensitive prompts, AnyModel's Ghost Mode offers opt-in zero-retention API keys: we don't store your prompts or responses, only a token counter for billing. Note that the model provider still receives the prompt to generate a response — Ghost Mode controls retention on our side, not theirs.
Get started
You can try Claude Haiku 4.5 free: every new account gets 1,000,000 tokens, rising to 6,000,000 if you link Telegram — no credit card required. After that it's pay-per-token with no subscription. For more model breakdowns, see the AnyModel blog.
Create your free account and start building with Claude Haiku 4.5 today.
AnyModel