●FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtask●LIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its own●MCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS●PLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callback●SONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15●IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October●FORK — Claude Code 2.1.212 changes what /fork does: it copies your conversation into a new background session with its own row in claude agents, so you can keep working. The old in-session subagent is now /subtask●LIMITS — WebSearch calls are now capped at 200 per session by default, and subagent spawns get the same 200 ceiling, so a runaway search or delegation loop stops on its own●MCPBG — MCP tool calls running past two minutes now move to the background automatically, keeping the session usable. Tune the threshold with CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS●PLANFIX — Fixed plan mode auto-running file-modifying Bash commands such as touch and rm without a permission prompt or an SDK canUseTool callback●SONNET5 — Claude Sonnet 5 is running on introductory pricing of $2 per million input tokens and $10 per million output. After August 31 it moves to $3 and $15●IPO — Bankers are reportedly lining up investor meetings for Anthropic ahead of a possible public listing as soon as October
Claude Haiku 4.5 — Build Real-Time AI Apps at a Fraction of the Cost
Claude Haiku 4.5: 200K context, SWE-bench 73.3%, Extended Thinking, $1/$5 pricing. When to use Haiku vs Sonnet/Opus, with Prompt Caching and Batch API tips.
On October 15, 2025, Anthropic released Claude Haiku 4.5 — the latest generation of Anthropic's "fast, affordable, and intelligent" model lineup. Haiku 4.5 is designed for developers who need near-frontier performance without the cost of larger models.
ℹ️
The model ID for Claude Haiku 4.5 is **`claude-haiku-4-5-20251001`**. Always use the full model ID in your API calls.
Compared to Claude Haiku 3.5, Haiku 4.5 represents a dramatic leap forward: it matches Claude Sonnet 4 on coding and agentic benchmarks at one-third the cost and more than twice the speed. Haiku 4.5 also becomes the first Haiku model to support Extended Thinking and Computer Use — capabilities previously reserved for Sonnet and Opus models.
Whether you're building a high-throughput chatbot, processing thousands of documents overnight, or deploying a real-time coding assistant, Haiku 4.5 is the go-to choice when performance-per-dollar matters most.
Specs and Pricing: Haiku vs. Sonnet vs. Opus
Anthropic's model lineup spans three tiers: Haiku (fast and affordable), Sonnet (balanced), and Opus (most capable). Here's how they compare:
Feature
Claude Haiku 4.5
Claude Sonnet 4.6
Claude Opus 4.6
Model ID
claude-haiku-4-5-20251001
claude-sonnet-4-6
claude-opus-4-6
Context Window
200K tokens
200K / 1M (β)
200K tokens
Max Output Tokens
64,000
64,000
32,000
Input Pricing (per 1M tokens)
$1.00
$3.00
$15.00
Output Pricing (per 1M tokens)
$5.00
$15.00
$75.00
Speed
Fastest (2x+ vs Sonnet)
Fast
Medium
SWE-bench Verified
73.3%
~80%
~85%
Extended Thinking
✅
✅
✅
Computer Use
✅
✅
✅
Image Input
✅
✅
✅
Prompt Caching
✅ (up to 90% off)
✅
✅
Batch API
✅ (50% off)
✅
✅
Haiku 4.5's standout advantage is its cost-to-performance ratio: roughly 3x cheaper than Sonnet 4.6, while delivering competitive quality across the majority of real-world tasks.
What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.
WHAT YOU'LL LEARN
✦How the ephemeral prompt-cache TTL (~5 minutes) really behaves, and the traffic shape where caching actually lowers your bill
✦A working exponential-backoff-with-jitter retry that absorbs peak-time 529 Overloaded errors in production
✦Measured latency and cost when moving classification and completion tasks off Sonnet 4.6, plus a migration checklist
Secure payment via Stripe · Cancel anytime
✦
Unlock This Article
Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.
Haiku 4.5 supports a 200,000-token context window — equivalent to processing several hundred pages of text in a single request. This makes it suitable for tasks like summarizing long PDFs, reviewing entire codebases, or maintaining long multi-turn conversations, all at Haiku's signature low price point.
Extended Thinking (First for Haiku)
For the first time in the Haiku series, Extended Thinking is available. By setting thinking: {type: "enabled"}, you instruct Claude to reason through a problem step by step before delivering its final answer.
Extended Thinking is especially effective for math, logic puzzles, code optimization, and structured analysis tasks. Combining Haiku 4.5's low cost with Extended Thinking opens the door to affordable, high-accuracy reasoning pipelines.
Haiku 4.5 also gains Computer Use support — Anthropic's GUI automation capability where Claude interprets screenshots and outputs precise cursor actions (click, type, scroll). For routine GUI tasks that don't require the sophistication of Opus or Sonnet, running them on Haiku 4.5 can yield significant cost savings.
Multimodal Input
In addition to text, Haiku 4.5 accepts image inputs — making it suitable for screenshot analysis, document OCR assistance, chart interpretation, and other vision tasks.
Code Examples: Using Haiku 4.5 in Production
Basic API Call
import anthropicclient = anthropic.Anthropic()response = client.messages.create( model="claude-haiku-4-5-20251001", # Full model ID required max_tokens=1024, messages=[ { "role": "user", "content": "Implement a binary search algorithm in Python with comments." } ])# Expected output:# def binary_search(arr, target):# left, right = 0, len(arr) - 1# while left <= right:# mid = (left + right) // 2# if arr[mid] == target:# return mid# elif arr[mid] < target:# left = mid + 1# else:# right = mid - 1# return -1 # Target not foundprint(response.content[0].text)
Real-Time Streaming for Chat Applications
For chatbots and live completion features, streaming minimizes time-to-first-token and keeps the UI feeling responsive.
import anthropicclient = anthropic.Anthropic()# Stream tokens as they are generated — ideal for chat UIswith client.messages.stream( model="claude-haiku-4-5-20251001", max_tokens=512, messages=[ { "role": "user", "content": "Explain overfitting in machine learning in two sentences." } ]) as stream: for text in stream.text_stream: print(text, end="", flush=True)# Expected output (streamed token by token):# Overfitting occurs when a model learns the training data too well,# capturing noise rather than underlying patterns, which leads to poor# generalization on unseen data.
Prompt Caching: Slash Input Costs by Up to 90%
Any text that repeats across multiple API calls — system prompts, retrieved documents, long instructions — can be cached. After the first call, cached tokens cost just $0.10/1M (one-tenth of the normal rate).
import anthropicclient = anthropic.Anthropic()# Mark a long system prompt for caching# First call: normal pricing — subsequent calls: up to 90% cheaperresponse = client.messages.create( model="claude-haiku-4-5-20251001", max_tokens=1024, system=[ { "type": "text", "text": """You are an expert customer support agent for an e-commerce platform.Always answer using the following policy document:[Return Policy]- Within 30 days of purchase: Full refund- 31–60 days: 50% refund- 61+ days: Exchange only- Sale items: Exchange only, no refunds- Digital goods: Non-refundable[Shipping Policy]- Standard shipping: 3–5 business days (free over $50)- Express: Next-day delivery ($5.99)- Same-day: Select cities only ($9.99)Respond concisely with the relevant policy and the customer's next step.""", # Mark this block as cacheable "cache_control": {"type": "ephemeral"} } ], messages=[ { "role": "user", "content": "I bought a shirt 2 weeks ago and want to return it. Can I get a refund?" } ])# Expected output:# Yes! Since it's been 2 weeks (within 30 days), you're eligible for a full refund.# To start the return, visit our returns portal at returns.example.com# or contact support@example.com.print(response.content[0].text)# Check cache usage in response metadata:print(f"Input tokens: {response.usage.input_tokens}")print(f"Cache read tokens: {response.usage.cache_read_input_tokens}")
Batch API: 50% Off for Asynchronous Workloads
Non-urgent bulk processing — nightly reports, data enrichment, bulk classification — is a natural fit for the Message Batches API, which delivers a flat 50% discount on all requests.
import anthropicclient = anthropic.Anthropic()# Classify 1,000 product reviews in a single batch jobreviews = [ "Absolutely love this product, will buy again!", "Shipping took 3 weeks. Terrible experience.", "Average quality for the price. Nothing special.", # ... up to 10,000 requests per batch]requests = [ { "custom_id": f"review-{i}", "params": { "model": "claude-haiku-4-5-20251001", "max_tokens": 16, "messages": [ { "role": "user", "content": f"Classify as positive, negative, or neutral. One word only: {review}" } ] } } for i, review in enumerate(reviews)]# Create the batch — processed within 24 hours at 50% discountbatch = client.messages.batches.create(requests=requests)print(f"Batch ID: {batch.id}")print(f"Status: {batch.processing_status}")# Expected cost comparison (3 reviews):# Standard API: ~$0.0001# Batch API: ~$0.00005 (50% savings)
Haiku 4.5's combination of speed, low cost, and strong intelligence makes it the right choice in these scenarios.
Real-time chatbots are where Haiku 4.5 shines most. When response latency directly affects user experience, Haiku 4.5's 2x+ speed advantage over Sonnet — at one-third the cost — translates into a better product at a lower bill. For a chatbot handling one million requests per month, switching from Sonnet 4.6 to Haiku 4.5 can reduce API costs by hundreds of dollars.
High-volume classification and extraction jobs — sentiment analysis, email routing, form data structuring — benefit from Haiku 4.5's strong instruction-following at low cost. With 73.3% on SWE-bench, it reliably outputs structured JSON and follows complex classification schemas.
Inline code completion in IDEs triggers an API call with every keystroke. Only Haiku's speed and price make this economically viable at scale.
Cost-constrained teams building their first AI feature will find Haiku 4.5 lets them ship production-quality AI without breaking the budget. A common pattern: start everything on Haiku 4.5, then selectively escalate to Sonnet or Opus only for tasks where you measure a quality gap.
Quick Decision Guide
What does your task require?
↓
Top accuracy, complex multi-step reasoning → Opus 4.6
↓
Balance of quality and speed, long context → Sonnet 4.6
↓
Speed, cost, high volume, real-time → Haiku 4.5 ← most use cases
Cost Optimization Best Practices
Haiku 4.5 is already the most affordable Claude model, but you can go further.
Use Prompt Caching aggressively. Any content that repeats across API calls — your system prompt, RAG context, instructions — should be marked with cache_control: ephemeral. Cache hits cost $0.10/1M input tokens, a 90% reduction from the standard rate.
Set max_tokens conservatively. You only pay for tokens actually generated, not for the max_tokens ceiling. Setting an appropriate upper bound prevents runaway outputs and keeps your p99 latency predictable.
Route async workloads to the Batch API. Any job where results aren't needed immediately qualifies for the Batch API's 50% flat discount. Up to 10,000 requests can be submitted per batch.
Prefill the assistant turn. By starting the assistant's response with a partial string, you can skip filler phrases like "Sure! Here's..." and guide output format directly, reducing unnecessary output tokens.
messages=[ {"role": "user", "content": "Classify the sentiment of: I love this!"}, # Prefill constrains the model to complete from here {"role": "assistant", "content": "{\"sentiment\":"}]# Output: "positive", "score": 0.97}# ← No preamble, clean JSON from the first token
What I Learned Running Haiku 4.5 in Production
Here are a few things the documentation does not spell out — things I only noticed after wiring Haiku 4.5 into a live app.
As an indie developer at Dolice, I moved several small "respond instantly to user input" helper features off Sonnet 4.6 and onto Haiku 4.5. Going in, all I had was a vague hope that it would be faster and cheaper. The reassurance only came once I read the logs: in my own setup, the average response time for a short classification task dropped from roughly 1.9 seconds to around 0.8, and monthly model spend for the same request volume fell to about a third. The lower latency translated directly into shorter waits for users — and one fewer cancellation that month, which mattered more to me than the cost line.
Prompt Caching only pays off under the right conditions
Prompt Caching is powerful, but the ephemeral cache lives for only about five minutes. Miss that detail and the savings never materialize.
If requests are spaced more than five minutes apart, the cache has already expired by the time the next call arrives, so you pay the full input price every time. Caching genuinely helps only during bursts — when requests arrive close together.
In my case, the busy daytime support window had a high cache-hit rate and a large drop in input cost, while sparse late-night traffic saw almost no benefit. The same system prompt produces wildly different savings depending on the shape of your traffic. Before enabling caching, look at the intervals in your own access logs.
Quietly absorbing 529 Overloaded at peak
Haiku 4.5 is a high-throughput model, but you can still see 529 Overloaded during traffic spikes. In real-time features, hiding that transient error from the user is what protects trust.
Exponential backoff with jitter absorbs most temporary overload. Here is a minimal retry close to what I actually run:
import timeimport randomimport anthropicclient = anthropic.Anthropic()def create_with_retry(messages, max_retries=4): """Absorb 529 / 429 with exponential backoff + jitter.""" for attempt in range(max_retries): try: return client.messages.create( model="claude-haiku-4-5-20251001", max_tokens=256, messages=messages, ) except (anthropic.InternalServerError, anthropic.RateLimitError): if attempt == max_retries - 1: raise # 1, 2, 4, 8 seconds + 0-1s of jitter to de-sync retries time.sleep((2 ** attempt) + random.uniform(0, 1))resp = create_with_retry( [{"role": "user", "content": "Classify in one word: shipping was fast but the box was crushed"}])print(resp.content[0].text)
The jitter matters because, when several requests fail at the same instant, having them all wait the exact same number of seconds just makes the retries stampede together. Spreading the retry timing out visibly stabilized recovery.
Use prefill to constrain output and trim tokens
For classification or extraction tasks with a fixed output shape, prefilling the start of the assistant turn removes the preamble and reliably reduces output tokens. In my classification pipeline, prefill alone shrank output tokens by about 20% per item — small, but it compounds across high volume.
Here is the sequence I actually followed when moving tasks off Sonnet 4.6. Working through it top to bottom catches most oversights.
Pick the right tasks first. Favor work where speed, low cost, and volume matter more than peak accuracy — classification, extraction, completion, short summaries. Leave deep reasoning and hard code generation for later.
Compare quality on a small sample. Pull 50-100 items from real data and eyeball Sonnet 4.6 against Haiku 4.5 side by side. Decide here whether the difference is acceptable.
Measure latency and cost. Record average response time and estimated cost per 1,000 items for both models. Decide on numbers, not gut feel.
Add error handling first. Wire in the exponential-backoff-with-jitter retry above before you switch.
Enable Prompt Caching based on traffic shape. Turn it on if requests cluster closely; hold off if they are sparse.
Cut over gradually. Route a slice of traffic to Haiku 4.5 and raise the share while watching error rate and quality metrics.
Keep an escalation path. Send only the cases where Haiku 4.5 falls short up to Sonnet 4.6, so you hold a quality floor while keeping average cost low.
Skipping steps 2 and 3 is the fastest way to be surprised by a quality drop after the switch — so don't.
Looking back
Claude Haiku 4.5 is the right model for the majority of production AI use cases — particularly those where speed, cost, and reliability matter more than squeezing out every last percentage point of accuracy.
The core value proposition is clear: near-Sonnet performance at one-third the price and twice the speed. With Extended Thinking and Computer Use now in the Haiku lineup, the gap between "affordable" and "capable" has effectively closed for most real-world workloads.
Add Prompt Caching for repeated contexts and Batch API for async jobs, and your effective cost can drop by 50–90% compared to baseline Sonnet pricing. If you haven't benchmarked Haiku 4.5 for your use case yet, that's the first experiment to run.
Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.