PL Log inOpen Studio
Preview version. Model catalog, prices, calculator and docs are live. Generation goes live at launch.

Comparison · Chat & code

Claude Sonnet 5 vs Claude Opus 4.8

Claude Sonnet 5 vs Opus 4.8: rates, thinking rules, tokenizer and Claude Code use. Learn when Sonnet 5 can take over and when Opus 4.8 should stay.

What each one accepts

Claude Sonnet 5Claude Opus 4.8
VendorAnthropicAnthropic
TypeChat & codeChat & code
Released2026-062026-05
Context window1,000,000 tokens1,000,000 tokens
Max output128,000 tokens128,000 tokens
Endpoints/v1/chat/completions · /v1/messages/v1/chat/completions · /v1/messages

Token prices

Claude Sonnet 5Claude Opus 4.8
Input / 1M tokens$3.24$3.78
Output / 1M tokens$16.20$18.90
Input from cache / 1Msame as inputsame as input
1,000 replies, 1,500 in / 400 out$11.34$13.23

Charged from a prepaid USD balance, no taxes added. One key runs both, through /v1/chat/completions in the OpenAI format. A failed generation is $0.

For most new work I would reach for Sonnet 5. It is the newer model, its per-token rate is lower than Opus 4.8's, and Anthropic says its results come close to Opus 4.8 while keeping the same 1M window and 128K replies. Opus 4.8 still makes sense where your prompts, parsers and tests were tuned on its output, or where your own data shows it ahead.

When to pick Claude Sonnet 5

  • You want one model for daily Claude Code work: tests, fixes, features and reviews.
  • You are tracing a bug through old, tangled code.
  • An agent calls tools and APIs in loops, many times a day. Anthropic calls Sonnet 5 its most agentic Sonnet, able to plan and drive a browser or terminal for longer.
  • You write reports, emails and docs in volume.

When to pick Claude Opus 4.8

  • A production pipeline was built and tested around Opus 4.8 answers, and it works.
  • Your own evaluation shows a clear edge for Opus on your task.
  • Your conversations add system messages later in the thread, which Anthropic allows on Opus 4.8.
  • You plan an A/B run against a newer model such as Claude Opus 5.5 before migrating.

Differences you will notice

  • Rates. Claude Sonnet 5 is billed at $3.24 / $16.20 per 1M tokens, Claude Opus 4.8 at $3.78 / $18.90 per 1M tokens. Opus costs more on input and output; the cached input row in the table above shows how each handles a repeated prefix.
  • Token counts. Anthropic says Sonnet 5 uses a new tokenizer that turns the same text into about 30% more tokens than Sonnet 4.6. I have no matching figure for Opus 4.8, so compare whole requests, not rates alone.
  • Thinking settings. Sonnet 5 has adaptive thinking on by default and rejects non-default temperature, top_p and top_k with a 400. Opus 4.8 also thinks adaptively, defaults to high effort and refuses the old fixed thinking budget.
  • Release dates. Opus 4.8 followed Opus 4.7 in May 2026. Sonnet 5 came a month later, in June 2026.
  • What they share. Each reads 1,000,000 tokens, writes up to 128K, and runs on both /v1/chat/completions and /v1/messages.

How to decide

Rates alone can mislead, because the two models may cut text into tokens differently and reason for different lengths. In my own tokenizer test (published in Polish on promptowy.com), Sonnet 5 needed about 56% more tokens than OpenAI models for the same Polish text; Opus 4.8 was not in that test. So send one typical document to both with max_tokens: 1, compare usage, and then judge. For short, varied requests the move to Sonnet 5 usually cuts the bill. The newer Opus is covered in Claude Opus 5.5 vs Sonnet 5, and my Claude Code setup in Claude Code cost: pay per token.

Questions

My request failed after I changed the model to Sonnet 5. Why?

Most likely a sampling field. Sonnet 5 rejects non-default temperature, top_p or top_k with a 400 error, so delete them and send the request again.

Can I switch between them inside Claude Code?

Yes. Point Claude Code at Kadraris as the Claude Code docs describe, then change models with /model whenever you like.

Should I retire Opus 4.8 now?

Not in a hurry. If a pipeline on Opus 4.8 is stable, run a newer model next to it on the same data first and switch only when the results hold up.