Skip to main content
Vendor: Anthropic Model ID: claude-opus-4-8 Capability: 200K context · tool use · vision · prompt caching · streaming · extended thinking Pricing: per-token, Opus tier (live rate) Opus 4.8 is the current flagship Anthropic model and the successor to Opus 4.7. It is the model you reach for when the one shot has to be right. It’s slower than Sonnet, more expensive than Sonnet, and noticeably better at the things Sonnet starts cutting corners on: long-context reasoning, multi-step plans where each step depends on the last, and the kind of code generation where the first draft has to compile and match the architecture conventions of an existing codebase. With extended thinking enabled, the response wait grows but the answer quality on hard problems jumps further than the latency cost suggests.

Request

Body parameters

Response

thinking_tokens are billed at the input-token rate (extended thinking adds latency but not the full output cost). See the pricing table for current rate.

Code examples

Extended thinking

Opt in by setting the thinking block:
budget_tokens is the maximum number of internal-reasoning tokens. The model may use fewer; the floor is a few hundred. Recommended budgets: Higher budgets monotonically improve answer quality on hard problems — but the marginal return falls off above 16K for most tasks.

Cache control

Cache reads at the discounted rate visible in the pricing table. On Opus 4.8, cache control is the single highest-leverage cost optimisation — large system prompts paid once, billed at the cache-read rate on every subsequent turn.

Errors

When to use

  • One-shot quality matters and you can wait for a thoughtful answer.
  • Code generation in an existing codebase where conventions matter.
  • Multi-step plans where each step depends on the last (Sonnet starts skipping; Opus 4.8 keeps the chain tight).
  • Long-context reasoning across legal / medical / technical corpora within the 200K window.
  • For mid-tier cost / latency, see Sonnet 4.6.
  • For high-throughput agent loops, see Haiku 4.5.

Limits