For Developers/Models/Claude Opus 4.8
Closed SourceAnthropicReleased 2026-05

Claude Opus 4.8

Anthropic's top general-availability workhorse for complex agentic coding and enterprise work.

Context window

1M

Input / 1M tokens

$5.00

Output / 1M tokens

$25.00

Provider

Anthropic

Standard pricing $5/$25 per 1M input/output tokens with the full 1M context included at no surcharge. Fast mode (research preview) costs $10/$50 per 1M for ~2.5x higher output tokens/sec. Up to 90% savings with prompt caching (minimum cacheable prompt lowered to 1,024 tokens) and 50% with batch processing. · Data verified 2026-07-24

Claude Opus 4.8 (May 2026) builds on Opus 4.7 with stronger long-horizon agentic coding, better effort calibration, and improved tool triggering. It adds a research-preview fast mode that is roughly 3x cheaper than prior fast modes, effort control across surfaces, mid-conversation system messages, and notably higher honesty (about 4x less likely to let code flaws pass unremarked than Opus 4.7). It uses adaptive thinking only - manual thinking budgets and non-default sampling parameters return 400 errors.

Capability index

Relative estimates (0-100) to place this model against its peers, grounded in published benchmarks.

Coding
96
Reasoning
95
Math
92
Multimodal
88
Long context
93
Speed
68
Cost efficiency
70

How to access it

Available via the Claude API, Amazon Bedrock, Google Cloud (Vertex AI), and Microsoft Foundry, plus claude.ai and Cowork. Anthropic's recommended default for complex agentic coding and enterprise work.

Strengths

  • Best-in-GA agentic coding: 88.6% SWE-bench Verified and 69.2% SWE-bench Pro
  • Improved long-context handling with fewer compactions and better compaction recovery
  • Recalibrated effort levels (medium/high/xhigh) for precise cost-vs-thoroughness control
  • Higher honesty - far less likely to let code flaws pass unflagged
  • Fast mode option for ~2.5x throughput and a lower 1,024-token cache minimum

Best for developers who...

Complex, long-horizon agentic coding and autonomous engineeringEnterprise knowledge work and professional-grade analysisHigh-stakes tasks where honesty and flaw-catching matterLarge-codebase work needing 1M context and 128k outputLegal, finance, and other rigorous professional agent workflows

When to choose it (and when not to)

Reach for Claude Opus 4.8 when...

  • You need top-tier autonomous coding and multi-step agentic reliability
  • You run long-horizon agent traces that previously derailed after compaction
  • You want enterprise-grade reasoning with 1M context and 128k output
  • You need throughput and are willing to pay fast-mode premium for 2.5x speed

Look elsewhere if...

  • You are cost-sensitive at scale - Sonnet 5 delivers close performance for far less
  • You require manual extended-thinking budgets or custom sampling parameters (400 error)
  • You want the single strongest available model regardless of price (consider Fable 5)

How to use it

  • Use the effort parameter (default 'high') with adaptive thinking; re-baseline cost/latency since effort levels were recalibrated vs Opus 4.7
  • Leverage mid-conversation system messages to update instructions without breaking prompt-cache hits on earlier turns
  • Remove temperature/top_p/top_k and manual thinking budgets - both return 400
  • Take advantage of the 1,024-token cache minimum to cache shorter shared prefixes

Quickstart

Python
import anthropic

client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=16000,
    thinking={"type": "adaptive"},
    output_config={"effort": "high"},
    messages=[
        {"role": "user", "content": "Diagnose and fix the failing integration test."}
    ],
)
print(response.content[0].text)

Manual thinking budgets and non-default temperature/top_p/top_k return a 400 error; control depth via effort (low/medium/high/xhigh).

API model id: claude-opus-4-8

Benchmarks

BenchmarkScoreNotes
SWE-bench Verified88.6%vs Opus 4.7 87.6%
SWE-bench Pro69.2%Leads active models; ~5 pts over Opus 4.7
Terminal-Bench 2.174.6%
GPQA Diamond93.6%
Artificial Analysis Intelligence Index61.4Edges GPT-5.5 at 60.2

Source: Vellum / MorphLLM Claude benchmark tables

Tools powered by Claude Opus 4.8

Compare Claude Opus 4.8

Compare Claude Opus 4.8 with any other model

Build a comparison →
All model comparisons →

Learn the concepts