Claude Haiku, Sonnet, and Opus: Which Model to Use
The practical differences between Claude's model tiers — what each one is good at, where the trade-offs are, and how to pick the right one for a given task.
Anthropic's Claude models come in three tiers. They share the same values and safety properties, but differ in capability, speed, and cost. Picking the right one for a task is not about always using the most powerful — it is about matching the model to the work.
The three tiers
Haiku is the fastest and least expensive model. It handles straightforward tasks quickly: classifying text, extracting structured data, answering factual questions, summarising short documents, generating simple code. If your application makes hundreds of calls per minute or needs to respond in under a second, Haiku is the starting point.
Sonnet is the balanced tier — the default for most applications. It handles complex reasoning, multi-step tasks, longer documents, and nuanced writing well. Most developers build on Sonnet first and only switch if they need more capability (Opus) or lower cost (Haiku).
Opus is the most capable model. It performs best on tasks that require extended reasoning, synthesis across long documents, subtle interpretation, and complex multi-step problem solving. It is slower and more expensive than Sonnet, so it is worth using only when Sonnet's output consistently falls short.
How to choose
Start by asking what the task actually requires.
Haiku is the right choice when:
- The input is short and the output is constrained (a label, a score, a JSON object)
- The task is repetitive at scale — processing thousands of records
- Latency matters and the quality bar is low to moderate
- You are running a background pipeline, not an interactive conversation
Sonnet is the right choice when:
- You are building a general-purpose assistant or chatbot
- The task involves reasoning, explanation, or multi-step decisions
- You are generating code of moderate complexity
- You do not know yet what the task requires — Sonnet is the safe default
Opus is the right choice when:
- Sonnet's output is not good enough and you have tested this
- The task involves very long documents or complex synthesis
- The stakes are high enough that quality outweighs cost and speed
- You need the model to reason carefully through edge cases and exceptions
The last point about Sonnet not being good enough is important. Upgrade to Opus only after testing — many tasks that seem like they require Opus are handled well by Sonnet.
Context window
All three models support a 200,000-token context window. That is roughly 150,000 words, or about 500 pages of text. For most applications, the context window is not the limiting factor — cost and latency are.
Cost and speed in practice
Haiku costs significantly less per token than Sonnet, and Sonnet less than Opus. The exact pricing is on Anthropic's pricing page and changes over time, so check there for current numbers.
The practical implication: for a product with real users, the difference in monthly API cost between Haiku and Sonnet can be substantial at scale. Benchmark both on your actual task and measure the quality difference before defaulting to the more expensive model.
Model strings for the API
# Current model strings, at the time we are writing this tutorial
"claude-haiku-4-6"
"claude-sonnet-4-6"
"claude-opus-4-6"
Pin to a specific version string rather than a moving alias. Model behaviour can change between versions, and a pinned string ensures your application behaves consistently until you explicitly update it.
A practical testing approach
When building something new:
- Start with Sonnet.
- Collect examples of outputs that are not good enough.
- Test those same examples on Opus. If Opus handles them clearly better, the task needs Opus.
- Test those same examples on Haiku. If Haiku handles them well enough, use Haiku for cost savings.
- For pipelines with mixed complexity, route by task type — simple extraction to Haiku, complex reasoning to Sonnet.
Most developers settle on Sonnet for interactive features and Haiku for background processing. Opus sees use in applications where quality genuinely matters more than cost — document analysis, research tools, high-stakes decision support.
SysEmperor