SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor · Updated 2026-08-27

Which Claude model make sense? Cost guide

Opus 4.8, Sonnet 5 or Haiku 4.5? See July 2026 API rates, cost for 100,000 jobs, and why Sonnet pricing changes from $2 to $3 per MTok in September.

Which Claude model I suppose make I use?

The short answer be this: start with Claude Opus 4.8, and only move away from am when you get clear reason. Anthropic guidance dey say the same thing. "If you no sure which model to use, start with Claude Opus 4.8 for complex agentic coding and enterprise work." Move down to Claude Sonnet 5 when the task clear well and you dey run am many times every day. Move down again to Claude Haiku 4.5 for mechanical, high-volume work where you already know how correct answer suppose look. Claude Fable 5 dey above all of dem, for agents wey go run for long time.

The choice get price attached. These na the rates for Claude API (application programming interface) as of 23 July 2026, per million tokens, wey the docs write as MTok.

  • Claude Fable 5 (claude-fable-5): $10 / MTok in, $50 / MTok out. 1M context.
  • Claude Opus 4.8 (claude-opus-4-8): $5 in, $25 out. 1M context.
  • Claude Opus 4.7 (claude-opus-4-7): $5 in, $25 out. 1M context.
  • Claude Sonnet 5 (claude-sonnet-5): $2 in, $10 out for introductory pricing until 31 August 2026. The standard $3 in, $15 out go take effect on 1 September 2026. 1M context.
  • Claude Haiku 4.5 (claude-haiku-4-5): $1 in, $5 out. 200K context.

Those identifiers complete exactly as dem dey written. Nothing dey append to dem.

Size by itself no add extra charge for the 1M-token models: "Dem dey bill 900k-token request with the same per-token rate as 9k-token request." Those rates still apply beyond the API, because Claude Enterprise dey measure usage with API rates on top of its seat price, so all the calculation below still apply to team wey dey use seat plan. Flat-rate subscription dey change the meter, but e no change this decision, because both Claude Max tiers get the same models and na usage amount dem differ on. Lower for the same ladder, Claude Pro $20 monthly payment dey buy usage allowance instead of per-token rate, so wetin go stop you there na limit reset, no be bill. If na there you dey now, work out which window you dey wait for before you do any calculation below, because the way out na smaller model, smaller context, or move to the API, no be cheaper rate. And if you never start to pay at all, whether Pro worth the $20 from the beginning depend on how often the free limit dey stop you, no be on any of the rates above.

Wetin each model really dey for

Anthropic describe the lineup with one line for each model, and those lines guide pass any leaderboard.

  • Claude Fable 5: "Next-generation intelligence for long-running agents." Na the slowest of the four for latency.
  • Claude Opus 4.8: "For complex agentic coding and enterprise work." E get moderate latency.
  • Claude Sonnet 5: "The best combination of speed and intelligence." E fast.
  • Claude Haiku 4.5: "The fastest model with near-frontier intelligence."

Fable 5 na the only one among the four wey this comparison never price for any workload, and because e cost twice the Opus 4.8 rate, the question of which jobs go return $10 as $50 deserve answer by itself.

Haiku 4.5 still get limits wey decide whether e fit do a job before price matter. E context window na 200K tokens instead of 1M, so large repository or long agent transcript no go fit. E maximum output for synchronous Messages API na 64K tokens, compared with 128K for the other models, and e reliable knowledge cutoff na February 2025, while the other three dey for January 2026.

Wetin be the cost of this choice for real workload?

Every model for the lineup dey charge output five times pass input. Opus 4.8 na $5 for input and $25 for output. Haiku 4.5 na $1 for input and $5 for output. This ratio dey hold across the whole range, so the model wey you choose matter pass for work wey dey generate plenty output.

Agentic work na this kind work, because dem dey bill thinking tokens as output tokens, and dem count toward max_tokens even when the text no reach you. For Fable 5, Opus 4.8, Opus 4.7 and Sonnet 5, dem no include reasoning summary by default, so the thinking field dey come back empty. The billing no change: "Either way the block is billed the same and passed back the same in multi-turn conversations." Wetin dey actually fill Claude token bill explain this meter completely.

Whether thinking go run at all dey differ between the models wey you dey compare. If you miss this, e go spoil your cost test. For Sonnet 5 and Fable 5, thinking don already turn on and e no need configuration. For Opus 4.8 and Opus 4.7, e dey off until you set thinking: {type: "adaptive"} for the request. Use the same configuration for both sides before you interpret the numbers.

Why the cheapest model fit be the most expensive

Take one self-contained coding task. The request carry 60,000 tokens of context, and the model produce 8,000 tokens of output including thinking. No caching dey happen, so the arithmetic remain clear.

For Opus 4.8: 0.06 MTok of input at $5 na $0.30, and 0.008 MTok of output at $25 na $0.20. The attempt cost $0.50. For Haiku 4.5, the same attempt na $0.06 plus $0.04, so e cost $0.10.

Haiku five times cheaper per attempt, and this fit look like plenty room to save until you follow wetin failed attempt dey cause. You read the wrong answer, and your time go waste. You send am again as context for the retry, so each attempt bigger pass the one before am. And when the third attempt still miss, you escalate anyway: $0.30 for Haiku plus $0.50 for Opus na $0.80, or 60% more than running Opus once.

So the main question na how cheaply you fit check the answer. When wrong answer obvious within one second, the small model na good bargain. When detecting am mean say you must read a diff carefully, the small model dey cost you time wey no dey show for the invoice.

Where smaller model dey win outright

Haiku 4.5 na the correct answer for these cases:

  • Mechanical subagent work. Subagent wey dey rename files or collect search output no need frontier reasoning. Na the standard pattern once you build AI agent with Claude and give am helpers.
  • Log triage. To decide whether one line na noise or e deserve human attention na narrow judgement with clear failure mode.
  • Classification against fixed label set. The output short, and you fit measure accuracy on sample.
  • High-volume production calls. For 100,000 runs every day, the per-token gap no be rounding error again. Na the usual shape of AI workflows wey connect to n8n.
  • Anything wey response speed matter to the user. Haiku 4.5 get rating as the fastest model for the lineup.

One limit dey apply specifically to Haiku. Its minimum cacheable prompt na 4,096 tokens, compared with 1,024 for Opus 4.8 and Sonnet 5. Below that minimum, "any requests to cache fewer than this number of tokens will be processed without caching, and no error is returned". Instruction block wey get 1,500 tokens fit cache for Sonnet 5, but e go silently fail to cache for Haiku 4.5. The sign na cache_creation_input_tokens and cache_read_input_tokens both dey zero. How to keep cost of always-on agent down cover this together with other ways cache fit lost.

Wetin dey change the answer

Each of these things fit affect bill pass model name.

Effort. output_config.effort dey control how much work model go do before e answer. The levels na low, medium, high, xhigh and max, and high na the default: "Setting effort to high produces exactly the same behavior as omitting the effort parameter entirely." E dey inside output_config, e no dey for the top level of the request:

response = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=4096,
    output_config={"effort": "medium"},
    messages=messages,
)

Effort dey affect every token for the response: "It can affect all token spend including tool calls. For example, lower effort would mean Claude makes fewer tool calls." This effect go add up for agentic loop. E no be token cap: "Effort is a behavioral signal, not a strict token budget." Anthropic never publish cost multiplier for each level, and e tell you make you test your own use case. So, Sonnet 5 run for high against Opus 4.8 run for low na real comparison wey you fit run this afternoon. Haiku 4.5 no dey among the models wey support effort.

Prompt caching. Cache read cost 0.1x of the base input rate, and the important thing for model choice na wetin this difference dey do across tiers. Cache hit for Opus 4.8 cost $0.50 / MTok, while uncached input for Haiku 4.5 cost $1 / MTok. So, Opus prefix wey cache dey work well fit cost less per input token than cold Haiku prompt. For any workload wey dey send large stable prefix again and again, good session hygiene matter pass model choice.

Batches. If nobody dey wait for the answer, Message Batches API go run the same models with "a 50% discount on both input and output tokens". E go cut every row for the comparison below by half, and e work across tiers. Batched Opus 4.8 job fit cost less than synchronous Sonnet 5 job for the standard price from 1 September 2026. You dey exchange lower latency for more capability with the same money.

One worked cost comparison

Workload na to classify 100,000 support emails, one call for each, with 2,000 input tokens and 300 output tokens per call. That one na 200 MTok input and 30 MTok output.

  • Haiku 4.5: 200 x $1 = $200 input, 30 x $5 = $150 output. Total na $350.
  • Sonnet 5, introductory rate: 200 x $2 = $400 input, 30 x $10 = $300 output. Total na $700.
  • Sonnet 5, from 1 September 2026: 200 x $3 = $600 input, 30 x $15 = $450 output. Total na $1,050.
  • Opus 4.8: 200 x $5 = $1,000 input, 30 x $25 = $750 output. Total na $1,750.

Change the four numbers to calculate am with tomorrow prices. The adjustments below fit change the result pass wetin the model name change:

  • Batching go halve every line: $175, $350, $525 and $875. Nothing dey wait for nightly classification run, so no reason dey to skip am.
  • Caching the shared prefix. Suppose say 1,200 of the 2,000 input tokens na the same instruction block every time. For Sonnet 5 at introductory rate, dem cost $0.20 / MTok as cache hits instead of $2 / MTok. So 120 MTok go cost $24 instead of $240. Add 80 MTok fresh input at $2, wey be $160, plus $300 output, and Sonnet 5 go reach about $484 instead of $700. This same method no help Haiku 4.5, because 1,200 tokens dey below its 4,096-token minimum.
  • Retries. Suppose say you reject Haiku answer for 8% of the emails and run dem again on Opus 4.8. Add 0.08 x $1,750 = $140 to the $350, giving $490. Measure your own rejection rate instead of using my own.
  • Tool definitions, if the job dey use dem. The system prompt wey dem generate na 290 tokens for Opus 4.8 with tool_choice set to auto, 354 for Sonnet 5 and 496 for Haiku 4.5. The cheapest model get the biggest fixed overhead.

Haiku with escalation path at $490 and cached Sonnet 5 at $484 cost almost the same, and one of dem do the job with one pass. The model no be the whole question.

Model mid-session change how e dey save money?

E dey save money less often than the sticker prices suggest, because the saving na per token, but wetin you dey put for risk na the whole cached prefix.

Anthropic document wetin fit invalidate cache. Dem build prefixes for this order: tools, then system, then messages, and "Changes at each level invalidate that level and all subsequent levels." Two request settings dey that list too: "The thinking configuration and the resolved effort level are rendered into the prompt itself, so changing any of them starts a new cache prefix." For effort, the docs talk am more clearly: "vary effort across workloads rather than within a conversation that relies on cache hits".

Model no dey the documented list, so no assume say e go invalidate cache or say e no go. Read cache_read_input_tokens for the first request after the switch, and make the number answer you. For a 150,000-token Opus 4.8 prefix, cache read cost about $0.08 and fresh write cost about $0.94. This one pass several turns of the per-token difference wey you dey try save.

So change these things between tasks, no be inside one task. For Claude Code, that means /clear first, when cache dey discard anyway, then /model or /effort. You type both of dem for the CLI, so if you dey work on Linux, na the terminal installation worth having. This na because wetin Anthropic ships natively for Linux combine a stable CLI with a desktop app wey still dey beta. Whether the change go show for bill at all depend on how you dey pay for that session, because Claude Code fit run with flat monthly plan or per-token API credits, and na only the second one dey price model change for dollars.

How to test the answer for your own workload

No use token count wey you collect from another model take size prompt. The token-counting endpoint free to use, and e dey count with tokenizer of any model wey you name, so name the model wey you plan call. That endpoint na one of the few parts of the platform wey never charge money, and other things wey you fit run without paying worth checking before you spend real credit to compare. Opus 4.7 and later, Fable 5 and Sonnet 5 dey use newer tokenizer wey "produces approximately 30% more tokens for the same text", so budget wey you measure with older model go too low for newer one if per-token rate no change.

Then read wetin come back. input_tokens na only the uncached remainder, so the real prompt size na that field plus cache_creation_input_tokens plus cache_read_input_tokens. Your first Claude API app for VPS na the smallest honest place to run that measurement, while which Claude plan fit your usage na separate decision about whether you go pay per token at all. If e turn out say na matter of which subscription to keep, instead of whether to keep one, Claude tiers wey dem price beside ChatGPT own explain wetin the same coding work cost for the other provider seats. If the measurement make you move your work go the API permanently, reducing the subscription to lower tier or cancelling am completely still leave the period wey you don already pay for, so you no lose anything by deciding after the numbers don show.

FAQ

Which Claude model dey best for coding?

Claude Opus 4.8 na the documented starting point for complex agentic coding, at $5 for every million input tokens and $25 for every million output tokens as of July 2026. Claude Sonnet 5 dey positioned as the best combination of speed and intelligence, and at $2 / $10 through 31 August 2026 e cost less than half as much. Run the same task for both models, keep the thinking configuration the same, then compare the total token spend from response.usage.

Claude Haiku 4.5 cheap enough to replace Sonnet 5?

Per token, yes: $1 / $5 against $2 / $10 for Sonnet 5 on introductory pricing, or $3 / $15 from 1 September 2026. Na the limits go decide am. Claude Haiku 4.5 get 200K token context window instead of 1M, 64K maximum output for the synchronous Messages API, February 2025 reliable knowledge cutoff, no output_config.effort support, and 4,096-token minimum cacheable prompt wey quietly disable caching for short system prompts.

If I switch to cheaper Claude model during session, e go save money?

E no save as often as e look. Anthropic document the cache invalidators as changes to the tools, system or messages prefix, changes to the thinking configuration, and changes to output_config.effort. Wetin model switch do to existing cache no dey documented, so treat am as unknown and read cache_read_input_tokens for the first request afterwards. The amount involved dey worth knowing: for 150,000-token Opus 4.8 prefix, cache read cost about $0.08 and fresh write cost about $0.94. This one pass the savings from several turns of lower per-token price. Switch between tasks, after /clear for Claude Code, when the cache go discard anyway.

Wetin output_config.effort do to my bill?

E dey change how many tokens the model spend across text, tool calls and thinking. Lower effort dey make fewer tool calls. This one compound for agentic loops because every tool result dey send again for later turns. The levels na low, medium, high, xhigh and max, with high as the default. Anthropic no publish any cost multiplier for each level. Dem describe effort as behavioural signal instead of token budget, so measure am for your own task.

How much Claude Batches API dey save?

50% for both input and output tokens, in exchange for asynchronous delivery. As of July 2026, this put Opus 4.8 at $2.50 in / $12.50 out, Sonnet 5 at $1 / $5 on introductory pricing, and Haiku 4.5 at $0.50 / $2.50. The comparison wey matter dey across tiers: batched Opus 4.8 job cost less than synchronous Sonnet 5 job at the standard rate from 1 September 2026. So batching fit give you stronger model for the same money.