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.
Search across all documentation pages
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.
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.
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:
claude-sonnet-5 unless you have a specific reason to change it.claude-haiku-4-5 for classification, extraction, or simple chat where speed and cost dominate.claude-opus-4-8 for multi-step reasoning, complex code generation, or high-stakes analysis.claude-fable-5 for the largest-context or most demanding workloads where its higher ceiling and price are justified.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:
claude-haiku-4-5 with temperature=0 for a deterministic classification task.claude-opus-4-8 for the harder, lower-volume reasoning task where quality matters more than per-call cost.model is the only thing you change to switch tiers.| 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.
# 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"claude-sonnet-5, and only route specific hard tasks to claude-opus-4-8 or claude-fable-5.max_tokens ceiling and monitor usage.output_tokens on real traffic.| 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 |
Claude Sonnet 5, it's the current default and the right starting point for most application code.
Claude Haiku 4.5, built for high-volume, latency-sensitive, or simple tasks like classification and extraction.
For genuinely hard, multi-step reasoning tasks, complex code review, or analysis where a wrong answer is costly, not for routine application logic.
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.
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.
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.
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.
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.
No, output tokens are generally priced higher than input tokens across the lineup, which matters more for tasks with long generated responses.
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.
model parameter alongside the rest of the request.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.
Reviewed by Chris St. John·Last updated Jul 18, 2026