Selecting a Model: Claude Fable 5, Opus 4.8, Sonnet 5, and Haiku 4.5
The model parameter is the single biggest lever you have over cost, latency, and output quality.
As of ~June 2026, the current Claude lineup spans four tiers: Claude Fable 5, Claude Opus 4.8, Claude Sonnet 5, and Claude Haiku 4.5.
This page compares them so you can pick the right default, and know when a specific task justifies stepping up or down.
Summary
Claude Sonnet 5, released 2026-06-30, is the default model for most applications, balancing capability and cost.
Claude Opus 4.8 is the flagship reasoning model, worth the higher price for genuinely hard, multi-step tasks.
Claude Haiku 4.5 is the fastest and cheapest option, built for high-volume, latency-sensitive, or simple tasks.
Claude Fable 5 sits above Opus as a top/"Mythos-class" tier with the largest context window and output ceiling, reserved for the most demanding workloads.
Exact model ID strings and prices change as new versions ship, always confirm the current values in the API docs before hardcoding them into production code.
Recipe
Quick-reference recipe card - copy-paste ready.
import anthropic
client = anthropic.Anthropic()
# Default choice for most application code
response = client.messages.create(
model="claude-sonnet-5-20260630",
max_tokens=500,
messages=[{"role": "user", "content": "Draft a product update summary."}],
)
# Cheaper, faster choice for simple, high-volume tasks
fast_response = client.messages.create(
model="claude-haiku-4-5-20260601",
max_tokens=100,
messages=[{"role": "user", "content": "Classify this ticket as billing, bug, or feature request."}],
)When to reach for this:
- Default to
claude-sonnet-5unless you have a specific reason to change it. - Use
claude-haiku-4-5for classification, extraction, or simple chat where speed and cost dominate. - Use
claude-opus-4-8for multi-step reasoning, complex code generation, or high-stakes analysis. - Reserve
claude-fable-5for the largest-context or most demanding workloads where its higher ceiling and price are justified.
Working Example
import anthropic
client = anthropic.Anthropic()
def classify_ticket(ticket_text: str) -> str:
"""Cheap, fast model - simple classification task, high volume."""
response = client.messages.create(
model="claude-haiku-4-5-20260601",
max_tokens=20,
temperature=0,
messages=[{
"role": "user",
"content": f"Classify as exactly one word (billing/bug/feature): {ticket_text}",
}],
)
return response.content[0].text.strip()
def draft_incident_report(logs: str) -> str:
"""Flagship model - synthesizing a multi-step reasoning task."""
response = client.messages.create(
model="claude-opus-4-8-20260415",
max_tokens=1500,
messages=[{
"role": "user",
"content": f"Analyze these logs and draft a root-cause incident report:\n\n{logs}",
}],
)
return response.content[0].text
if __name__ == "__main__":
print(classify_ticket("My invoice charged me twice this month."))What this demonstrates:
- Matching model tier to task complexity within the same application, rather than using one model everywhere.
- Using
claude-haiku-4-5withtemperature=0for a deterministic classification task. - Reserving
claude-opus-4-8for the harder, lower-volume reasoning task where quality matters more than per-call cost.
Deep Dive
How It Works
- Every Claude model shares the same Messages API shape,
modelis the only thing you change to switch tiers. - Pricing is per million tokens (MTok), split into input and output rates, output tokens generally cost more than input tokens across the lineup.
- Context window (how much input a model can consider) and max output tokens are independent limits, both matter for tasks with large documents or long generated responses.
- Model choice compounds: a high-volume pipeline calling a flagship model on every request can cost far more than the same pipeline routing simple cases to a cheaper model first.
Model Comparison
| Model | Tier | Context Window | Max Output | Approx. Pricing (input/output per MTok) |
|---|---|---|---|---|
| Claude Fable 5 | Top / Mythos-class | 1M tokens | 128K tokens | ~$10 / $50 |
| Claude Opus 4.8 | Flagship reasoning | 1M tokens (default) | Large, model-dependent | ~$5 / $25 |
| Claude Sonnet 5 | Default | Large | Large | ~$2 / $10 intro pricing through 2026-08-31, then ~$3 / $15 |
| Claude Haiku 4.5 | Fastest / cheapest | 200K tokens | Model-dependent | ~$1 / $5 |
Pricing and exact context/output figures shift with new releases, treat the table above as a directional comparison and confirm current numbers at platform.claude.com/docs before budgeting.
When Each Tier Wins
- Claude Haiku 4.5: classification, tagging, short extraction, simple chatbots, autocomplete-style suggestions, anything called at high volume where latency and cost dominate.
- Claude Sonnet 5: general-purpose application logic, most chat products, summarization, moderate code generation, the safe default when you're unsure.
- Claude Opus 4.8: multi-step reasoning, complex code review or generation, careful analysis where a wrong answer is costly.
- Claude Fable 5: the largest documents or codebases that need the full 1M context window and the highest output ceiling, or tasks that specifically benefit from the top-tier model's extra capability.
Python Notes
# Centralize model choice as named constants rather than
# scattering literal strings through a codebase - it makes
# a future model swap a one-line change.
MODEL_FAST = "claude-haiku-4-5-20260601"
MODEL_DEFAULT = "claude-sonnet-5-20260630"
MODEL_FLAGSHIP = "claude-opus-4-8-20260415"Gotchas
- Using the flagship model everywhere "to be safe." This inflates cost for tasks a cheaper model handles just as well. Fix: default to
claude-sonnet-5, and only route specific hard tasks toclaude-opus-4-8orclaude-fable-5. - Hardcoding a dated model ID string without checking for updates. Model ID strings and availability change as new versions ship. Fix: verify current model IDs in the docs periodically, and centralize them as named constants (see Python Notes) so updates are a one-line change.
- Assuming a cheaper model can't handle a task without testing it. Haiku-tier models are often sufficient for classification and extraction tasks assumed to need a bigger model. Fix: benchmark a sample of your real task on the cheaper tier before defaulting to a pricier one.
- Ignoring output token cost when the response is long. Output tokens are typically priced higher than input tokens across the lineup, and long generations add up quickly. Fix: set a sensible
max_tokensceiling and monitorusage.output_tokenson real traffic. - Not accounting for intro pricing windows. Sonnet 5's ~$2/$10 rate is introductory through 2026-08-31, after which it moves to ~$3/$15. Fix: budget for the post-window rate, not just the launch price, when forecasting long-term cost.
Alternatives
| Alternative | Use When | Don't Use When |
|---|---|---|
| Single-model strategy (always Sonnet 5) | Simpler codebase, moderate volume, no strong cost pressure | High-volume simple tasks exist that a cheaper model handles equally well |
| Tiered routing (Haiku for simple, Sonnet for general, Opus/Fable for hard) | Cost-sensitive, high-volume production systems with varied task difficulty | Small projects where the added routing logic isn't worth the complexity |
| Always the flagship model | Low-volume, high-stakes tasks where quality dominates cost | Any high-volume or latency-sensitive workload |
FAQs
Which model should I use if I'm not sure?
Claude Sonnet 5, it's the current default and the right starting point for most application code.
What's the fastest and cheapest model in the lineup?
Claude Haiku 4.5, built for high-volume, latency-sensitive, or simple tasks like classification and extraction.
When is Claude Opus 4.8 worth the higher price over Sonnet 5?
For genuinely hard, multi-step reasoning tasks, complex code review, or analysis where a wrong answer is costly, not for routine application logic.
What makes Claude Fable 5 different from Opus 4.8?
It sits above Opus as a top-tier model with the largest context window (1M tokens) and the highest max output (128K tokens), for the most demanding workloads.
Are the prices shown on this page exact and permanent?
No, treat them as directional; exact pricing changes with new releases and Sonnet 5 in particular has an introductory rate through 2026-08-31 before it increases.
Can I mix models within the same application?
Yes, and it's a common and cost-effective pattern, routing simple, high-volume tasks to a cheaper model and reserving the flagship for genuinely hard ones.
Does a bigger context window always mean a better model for my task?
No, context window size matters only if your input is actually large; for short prompts, model tier (reasoning quality, speed, cost) matters more than context size.
Should I hardcode model ID strings throughout my codebase?
No, centralize them as named constants in one place, so a future model change is a one-line update rather than a search-and-replace across the codebase.
Is output token cost the same as input token cost?
No, output tokens are generally priced higher than input tokens across the lineup, which matters more for tasks with long generated responses.
How often do model names and prices change?
Frequently enough that hardcoded assumptions go stale; always verify current model IDs and pricing at platform.claude.com/docs rather than relying on training data or older documentation.
Related
- Claude API Request Parameters Cheatsheet - the
modelparameter alongside the rest of the request. - Claude API Fundamentals Basics - these models used in runnable examples.
- Building a Reusable Claude API Client Wrapper - centralizing model defaults in a wrapper.
Stack versions: Written against the Claude model lineup current as of ~June 2026 - Claude Fable 5, Claude Opus 4.8, Claude Sonnet 5 (the default), and Claude Haiku 4.5 - and the official
anthropicPython SDK (latest 0.x release). Model names, SDK versions, and pricing move quickly - verify current specifics at platform.claude.com/docs before relying on them.