Claude API Model Selection: Haiku vs Sonnet vs Opus
Which Claude model should you call?
The short answer: use Haiku for high-volume, low-complexity tasks where speed and cost matter more than depth; use Sonnet as your default for most production workloads — it's the best balance of reasoning quality, speed, and price; use Opus only when a task genuinely requires the deepest reasoning, long multi-step chains, or nuanced judgment calls that cheaper models get wrong.
Most teams don't need to agonize over this. The practical pattern is: start on Sonnet, drop to Haiku for anything that's essentially classification, extraction, or simple formatting, and reserve Opus for a small slice of requests where accuracy failures are expensive (legal review, complex code generation, multi-document synthesis). Below is how to actually decide, with concrete signals rather than vibes.
The three models, in practical terms
Haiku is the fastest and cheapest tier. It's built for tasks with a narrow, well-defined scope: sentiment tagging, short summaries, simple Q&A against a known context, routing user messages to the right workflow, or generating short copy variants. It handles instructions well but struggles more than the larger models with ambiguity, long chains of reasoning, or tasks that require holding many constraints in mind simultaneously.
Sonnet is the general-purpose workhorse. It handles most coding tasks, structured data extraction from messy documents, multi-turn customer support, and content generation that needs to actually sound good — not just grammatically correct. If you're unsure which model to pick, Sonnet is the right default to benchmark against before you consider anything else.
Opus is the slowest and most expensive, and it should be treated as a scarce resource. It earns its cost on tasks with long reasoning chains, subtle edge cases, or high stakes for being wrong: complex refactors across a codebase, legal or financial document analysis, multi-step agentic planning, or anything where a Sonnet draft needs a second pass of scrutiny.
Decision checklist
Ask these questions in order:
- Is the task narrow and repetitive? (classify, extract, format, route) → try Haiku first.
- Does it involve open-ended generation, moderate reasoning, or code? → start with Sonnet.
- Does a wrong answer cost real money, time, or trust, and does the task require chaining many steps or weighing ambiguous tradeoffs? → use Opus, but only for that slice of requests.
- Are you unsure? → default to Sonnet and measure. Don't default to Opus "to be safe" — it's the most expensive way to find out you didn't need it.
A useful mental model: Haiku is for volume, Sonnet is for quality-per-dollar, Opus is for ceiling. Most production systems should see request volume shaped like a pyramid — lots of Haiku calls, a solid base of Sonnet calls, and a thin Opus layer for escalations.
Cost and latency tradeoffs in practice
Model choice is really a latency/cost/quality triangle. Haiku responses typically come back fastest, which matters for anything user-facing and synchronous — autocomplete, live chat, search-query rewriting. Sonnet is still fast enough for most interactive use cases but costs more per token. Opus is noticeably slower and the most expensive per token, which makes it a poor fit for anything real-time or high-frequency.
A common mistake is picking Opus for an entire pipeline because one step in it is hard. Instead, split the pipeline: use Sonnet or Haiku for the bulk of the work (parsing, retrieval, formatting) and route only the genuinely hard reasoning step to Opus. This keeps average cost and latency low while still getting Opus-level quality where it counts.
# Example: routing by task type with SubToAPI
curl https://api.subtoapi.app/v1/messages \
-H "Authorization: Bearer $SUBTOAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-5-haiku",
"messages": [{"role": "user", "content": "Classify this ticket: billing, bug, or feature request?"}]
}'
// Escalate only when needed
async function classifyAndMaybeEscalate(ticketText) {
const quick = await callModel("claude-3-5-haiku", ticketText);
if (quick.confidence < 0.6) {
return callModel("claude-3-5-sonnet", ticketText);
}
return quick;
}
Building a routing strategy, not a single choice
If your product sends more than a handful of requests a day, hardcoding one model for everything is a missed optimization. A simple routing layer looks like this:
- Tier by task type at design time. Decide up front which endpoints or workflows map to Haiku, Sonnet, or Opus based on the checklist above.
- Tier by confidence at runtime. For ambiguous cases, let a cheap model attempt the task first and escalate only when its output looks uncertain (low confidence score, empty result, validation failure).
- Tier by user tier or plan. Some products reserve Opus for premium users or specific high-value actions, and use Sonnet or Haiku for everyone else.
- Re-evaluate periodically. Model pricing and capability shift over time; a task that needed Opus six months ago may now run fine on Sonnet.
If you're testing this across multiple models and want one place to track usage and spend per model without juggling separate API keys for experiments, a layer like SubToAPI gives you application-level sub_live_ keys and per-key usage metadata, so you can see exactly which model tier is driving cost before you commit to a routing strategy. See the quickstart and messages docs for setup, and pricing if you're comparing plans for a team.
A simple rule of thumb
If you only remember one thing: default to Sonnet, downgrade to Haiku where you can prove it doesn't hurt quality, and upgrade to Opus only where you can prove Sonnet isn't enough. Measure both directions — don't assume Opus is always better (it's slower and pricier for marginal gains on simple tasks) and don't assume Haiku is always fine (it will quietly degrade quality on tasks with real ambiguity).
questions
Is Opus always more accurate than Sonnet? Not always, and not by a margin that justifies the cost on simple tasks. Opus tends to pull ahead on long, multi-step reasoning and ambiguous judgment calls, but on narrow, well-specified tasks Sonnet often matches it for a fraction of the price.
Can I switch models per request without changing my whole integration? Yes — the model is just a parameter in the API call. A clean setup lets you pass model per request so you can route different workflows or even individual requests to Haiku, Sonnet, or Opus dynamically.
What's a safe default if I'm not sure which model to use? Start with Sonnet. It handles the majority of coding, writing, and reasoning tasks well, and you can selectively drop to Haiku for cost savings or escalate to Opus for the subset of requests that genuinely need deeper reasoning.