AI for Builders
The best Claude model for coding is rarely the one at the top.
Which Claude model should you use? A task-by-task routing guide across Opus 4.8, Sonnet 5, Haiku 4.5, and Fable 5, with a checkability rule for coding, writing, research, and agents.
In brief
5 POINTS- The right Claude tier is the cheapest that passes your tests, and on checkable coding that is rarely the priciest.
- Fable 5 refused 75 to 86% of benign tasks on a hard slice, and fallback reroutes to Opus 4.8, so the premium tier quietly serves cheaper answers.
- Our checkable coding eval put Sonnet 5 at 96.4% and Opus 4.8 at 89.3%, intervals overlapping too heavily to separate while Sonnet's sticker runs $3/$15 against Opus's $5/$25.
- reliability@k held a 0.875 to 0.946 band across Sonnet and Opus with no separable climb, so Fable's 2x has room only on long-horizon runs the suite cannot grade.
- Route each task to the cheapest tier that clears your checks, and settle the long-horizon call by measuring consistency on your own runs before the price ladder decides.
On this page (8)
Key figures (2)
The model: field in your agent config is one line, and whatever you type there runs every call it makes this week. Four tiers sit in the dropdown, a ten-to-one price spread on input, and a workload that looks demanding enough to talk you toward the top of the list. That pull toward the priciest tier is the instinct Anthropic’s own documentation argues against. Its guidance says start with Claude Opus 4.8 for complex agentic coding and enterprise work, and step past it only when a workload needs the highest available capability1. Which Claude model you should use has a default answer, and it is not the most capable one: on work you can grade with a test, stepping up buys a bigger bill more reliably than it buys a better answer.
Route by what the task is, not by how hard it looks or where it sits in the list. Send everyday and checkable work to the cheapest tier that clears your checks (Haiku 4.5 or Sonnet 5), keep Opus 4.8 as your default for complex agentic coding, and reserve Fable 5 for long-horizon agent runs where a small early error compounds. Get the routing backwards and you pay a premium on exactly the tasks where our measurements found the premium changes nothing.
The four generally available tiers, cheapest to priciest: Haiku 4.5 ($1 in / $5 out per million tokens), Sonnet 5 ($3 / $15 sticker; introductory $2 / $10 through August 31, 2026), Opus 4.8 ($5 / $25), Fable 5 ($10 / $50)1. Fable 5 lists at twice Opus and ten times Haiku on input. A fifth model, Claude Mythos 5, shares Fable 5’s specs and pricing but ships invitation-only through Project Glasswing, so it stays off this routing map1. The question every routing decision answers is whether your task can spend that gap.
Claude models comparison: three tiers cost the same or less than Opus, one costs double
Anthropic positions the family by capability and speed, and each model carries a one-line job description on its models overview1. Read them as a routing map. Haiku 4.5 is the fastest model with near-frontier intelligence. Sonnet 5 is the best combination of speed and intelligence. Opus 4.8 is built for complex agentic coding and enterprise work. Fable 5 is next-generation intelligence for long-running agents, and Anthropic’s most capable widely released model.
Here is the current-generation model list, the four tiers Anthropic’s guidance routes new work to, with the numbers that decide a route.
TABLEShow full table (4 rows)Showing full table (4 rows)
| Model | API ID / context | Price per 1M (in / out) | Latency | Anthropic’s positioning |
|---|---|---|---|---|
| Claude Haiku 4.5 | claude-haiku-4-5, 200K | $1 / $5 | Fastest | Fastest model, near-frontier intelligence |
| Claude Sonnet 5 | claude-sonnet-5, 1M | $3 / $15 ($2 / $10 through Aug 31) | Fast | Best combination of speed and intelligence |
| Claude Opus 4.8 | claude-opus-4-8, 1M | $5 / $25 | Moderate | Complex agentic coding and enterprise work |
| Claude Fable 5 | claude-fable-5, 1M | $10 / $50 | Slower | Next-generation intelligence for long-running agents |
Prices, latency, positioning, and API IDs come from Anthropic’s model overview as of July 2026; every tier caps output at 128K tokens except Haiku’s 64K1. Previous-generation models stay served (Opus 4.7 and 4.6 at Opus 4.8’s price, Sonnet 4.6 at Sonnet 5’s sticker), but at the same or a higher price they buy no routing advantage, so this page routes among the current four1. The verdict the table hides: three of the four tiers cost the same or less than Opus, and one costs double, so a default of Opus with a deliberate step down covers most work at a lower bill than a default of Fable with hopeful reaching. The closest of those steps, Opus down to Sonnet, gets its own routing table.
Opus 4.8 is the sensible center of the list. The routing skill is knowing when to step down from it, and how rarely you need to step up.
Which Claude model is best for coding?
For coding, one property picks the tier: can a script grade the output. Send routine, unit-testable coding to Sonnet 5, where our checkable eval could not separate it from Opus 4.8, at three-fifths of Opus’s sticker price2. Step up to Opus 4.8 for complex, multi-file agentic work, Anthropic’s own stated default1. Keep Fable 5 off the routine path, where its refusal tax lands hardest.
Anthropic’s answer to this is Opus 4.8 for complex agentic coding1. Our reliability desk sharpens it by one distinction: whether a coding task is checkable. A task is checkable when a script can grade the output, a unit test, an exact match, a parseable result, with no human or model judge in the loop.
What our checkable eval showed
On that slice, the tier ranking Anthropic’s price ladder implies did not show up in our data. We wrote original, benign, deterministically scored tasks aimed at a frontier model’s failure band, a mix of compositional reasoning, format, and tool-use problems, and ran them across tiers. The Opus-versus-Fable comparison was the pre-registered core; the Sonnet reading here is a lighter low-effort spot-check on the same tasks2.
At low effort Sonnet 5 passed 96.4% of non-refused trials (27 of 28, 95% Wilson interval 82.3 to 99.4). Opus 4.8 passed 89.3% (25 of 28, interval 72.8 to 96.3). The intervals overlap so heavily we could not separate the two2. Scored as quality per dollar over the prior 40-task round, Sonnet returned roughly 3.8 times Fable 5’s value at sticker pricing2. The full method, per-tier counts, and stop rule live in the routing eval, and the reliability-side reading in routing Claude models by task.
Fable’s refusal tax on routine coding
Fable 5 is the tier to avoid for routine coding, for a reason that has nothing to do with capability. The version redeployed on July 1 shipped a retrained safety classifier that flags benign requests more often during routine coding and debugging3. We measured the size of that tax on a deliberately hard, failure-zone slice of the set: there Fable refused roughly 75 to 86% of benign tasks, against 16.25% (13 of 80) on the wider, easier pool, and 44 of 45 refusals carried the API’s cyber label on tasks with no cyber content2. Read the high number with its mix; what carries to routine work is the direction Anthropic itself disclosed.
Turn on server-side fallback to rescue those refusals and the API retries on another Claude model you nominate, typically Opus 4.8: the refused Fable attempt goes unbilled, the retry bills at that model’s rate, and the response comes back looking normal4. You provisioned the premium tier and, on this task family, mostly read a cheaper model’s answers without ever paying Fable’s premium on them. That silent swap is its own hazard, and instrumenting for it is a separate build job.
Checkability picks the coding tier: when a test can grade the work, the cheapest passing tier wins.
One property per task routes the whole family
Fold the whole family into one routing rule and it fits in a table. The column that does the work is the last one: what property of the task earns the tier.
TABLEShow full table (7 rows)Showing full table (7 rows)
| Your task | Route to | What earns the tier |
|---|---|---|
| Everyday chat, quick lookups, high-volume calls | Haiku 4.5 | Short, self-contained, latency- and cost-sensitive |
| Routine, checkable coding (parsers, transforms, unit-testable) | Sonnet 5 | Could not be separated from Opus on our checkable eval; about twice Opus’s value per dollar at sticker2 |
| Complex agentic coding, enterprise workflows | Opus 4.8 | Anthropic’s stated default for this work1 |
| Short drafts, edits, tone fixes | Haiku 4.5 or Sonnet 5 | Low stakes, nothing downstream builds on the output |
| Long-form writing where each section builds on the last | Opus 4.8 | Quality compounds; reach to Fable only if truly long-horizon |
| Multi-source research and analysis you reconcile step by step | Opus 4.8 default, Fable 5 for the longest runs | Early errors are inherited as settled fact by later steps |
| Long-horizon multi-step agents | Fable 5 | The one lane a stronger model’s edge has room to pay, and the one a checkable suite cannot grade |
The pattern in that last column: everything above the long-horizon rows is checkable or low-stakes, so no route there needs Fable’s 2x. The bottom two rows are the only ones where a stronger model has room to earn its price, and they are exactly the workloads our deterministic suite could not measure.
Which Claude model is best for writing?
Send a single email, a tone fix, a quick lookup, or a short draft to Haiku 4.5 or Sonnet 5: the output stands alone, nothing downstream builds on it, and the cheapest tier that answers cleanly wins at the latency an interactive session wants1. Step up to Opus 4.8 only for long-form writing where each section builds on the last, and reach to Fable 5 only when the piece is genuinely long-horizon.
The property that moves the tier is whether the work compounds. A quick draft is nearly standalone, so a stronger model has nothing to build on. A long report is the reverse: a sharper paragraph at section six becomes the ground section seven stands on, quality accrues down the chain, and that is the one shape in writing where reaching up can pay.
Which Claude model is best for research and analysis?
Route most multi-source research and analysis to Opus 4.8, and reserve Fable 5 for the longest reconciliation runs. The trigger to step up is compounding: when a later step inherits an earlier one as settled fact, a small early error travels, and a more capable model narrows how far.
When you feed a model source after source to reconcile against a running summary, a small error at step six is inherited as settled fact by everything after it. The lane’s name for how far a single early fault travels through that chain is propagation radius, and a wider radius is precisely what a more capable model can narrow. That case, drawn out in full for the consumer side, is whether you need Fable 5 at all. For most drafting and most research turns the radius is short, the work is nearly standalone, and Opus 4.8 or below is the route that fits.
Which Claude model is best for agents and planning?
Route short, gradable agent steps and quick planning turns to Sonnet 5 or Haiku 4.5, keep Opus 4.8 as the default for complex multi-step agents, and hold Fable 5 for long-horizon runs where a small early misstep travels far down the chain. A plan you can score against a spec or a test is checkable, so the cheapest tier that clears it wins. A plan that seeds a long autonomous run is the case where reaching up can pay: its first step becomes the ground every later step stands on, and that is the one shape our deterministic suite cannot grade, drawn out next.
The one thing the cheaper tiers cannot promise: the long-horizon lane
Before Fable’s 2x can pay, a task has to be the kind our grader cannot see. The failure it prevents has to live where a deterministic score has no purchase: a run long enough that a small early slip compounds across dozens of steps, or open-ended enough that there is no key to check the output against. Those are the workloads Fable 5 is built for, and the plausible place its premium earns out. Our suite scores none of them, by construction, so we make no capability claim about them in either direction. The grader that makes our no-separation result clean is the same grader that is blind to the one lane where the premium could earn out.
On that lane, consistency is the metric that decides, and peak capability is a weak proxy for it. The lane measures consistency with reliability@k, the mean over tasks of each task’s pass fraction raised to the power k: it rewards a model for being right run after run rather than right once. On the tiers our eval could score, reliability@k held one tight band, 0.875 to 0.946 for Sonnet and Opus, and showed no climb we could separate from noise, at either price or effort; Fable’s raw figure collapses under its refusal tax and carries no consistency claim in either direction, and Haiku was never in this run2. Whether a pricier model buys steadier long-horizon behavior stays the open question, and the way to answer it is to measure your own agent runs the way our research desk measures reliability past a single pass rate, never to read it off the price ladder.
Consistency, measured on your own runs, is what settles the long-horizon call. The price ladder cannot stand in for it.
Route each task to the cheapest tier that clears your checks
- Send everyday, high-volume turns to Haiku 4.5. Short, self-contained calls where latency and cost matter and nothing downstream builds on the output.
- Send routine, unit-testable coding to Sonnet 5. On our checkable eval it and Opus 4.8 came back too close to separate2.
- Keep Opus 4.8 as your center. Anthropic’s stated model for complex agentic coding and enterprise work, and the default whenever you are unsure1.
- Reserve Fable 5 for long-horizon, open-ended runs, and keep it off routine coding. Its 2x earns out only where a grader cannot score the work; on benign code its classifier refuses often enough that fallback quietly serves a cheaper model’s answers, and Fable’s rate bills only on the minority of calls it answers itself4.
The menu ranks capability in the abstract. The routing table above is the purchase order: it sends each task to the cheapest tier that clears your checks, run after run, and it rests on a measurement only your own task set can make. Make that measurement before the price ladder makes the routing call for you.
Footnotes
-
Anthropic, Claude models overview, https://platform.claude.com/docs/en/about-claude/models/overview (as of 2026-07-10): current tiers Claude Haiku 4.5 ($1 / $5 per million tokens), Claude Sonnet 5 ($3 / $15 sticker, introductory $2 / $10 through August 31, 2026), Claude Opus 4.8 ($5 / $25), Claude Fable 5 ($10 / $50); comparative latency fastest / fast / moderate / slower; and the guidance to start with Opus 4.8 for complex agentic coding and enterprise work and reach for Fable 5 only for the highest available capability. The same page lists Claude Mythos 5, which shares Fable 5’s specs and pricing but is invitation-only under Project Glasswing and is not generally available. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11
-
Our own routing-eval harness: deterministic exact-match / unit-test scoring (no LLM judge), Anthropic API, pricing re-verified live 2026-07-02; an effort sweep of 14 pruned tasks x 2 runs = 28 trials per arm (prior round n=40), 95% Wilson intervals, a pre-registered stop rule. It measures short-horizon checkable correctness only, not long-horizon agentic or open-ended quality. The 3.8x quality-per-dollar figure is a point composite (pass rate over mean cost per task), so read it as a value ranking, not an interval-bounded estimate. Full method, per-arm counts, confidence intervals, and the results CSV live in the canonical write-up: the routing eval. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8
-
Anthropic, Redeploying Claude Fable 5, https://www.anthropic.com/news/redeploying-fable-5 (as of 2026-07-10): the July 1 redeploy and the retrained safety classifier that “comes at the cost of flagging benign requests more often during routine coding and debugging tasks,” plus the notify-and-reroute-to-Opus-4.8 behavior inside Claude’s own apps. ↩
-
Anthropic, Introducing Claude Fable 5 and Claude Mythos 5, “Refusals, fallback, and billing” section, https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5 (as of 2026-07-10): a Fable request refused before any output is generated is not billed; a server-side
fallbacksretry is served by another Claude model you nominate and bills at that model’s rate, with fallback credit refunding the prompt-cache cost of the switch. Anthropic’s own apps reroute refusals to Claude Opus 4.8. ↩ ↩2