For Developers/Models/Claude Sonnet 5
Closed SourceAnthropicReleased 2026-06

Claude Sonnet 5

The best combination of speed and intelligence, at near-Opus quality for a Sonnet price.

Context window

1M

Input / 1M tokens

$3.00

Output / 1M tokens

$15.00

Provider

Anthropic

Introductory pricing of $2/$10 per 1M input/output tokens applies through August 31, 2026, then reverts to standard $3/$15. New tokenizer produces ~30% more tokens for the same text vs Sonnet 4.6, so equivalent requests can cost more even though per-token rates match. Batch API and prompt caching discounts available. · Data verified 2026-07-02

Claude Sonnet 5 is Anthropic's June 2026 flagship mid-tier model and a drop-in upgrade for Sonnet 4.6, delivering large gains in agentic coding, tool use, reasoning, and knowledge work. Its performance approaches Opus 4.8 at substantially lower cost, and it ships with adaptive thinking on by default and a new tokenizer. Manual extended thinking and non-default sampling parameters now return 400 errors.

Capability index

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

Coding
92
Reasoning
90
Math
87
Multimodal
85
Long context
92
Speed
82
Cost efficiency
85

How to access it

Available now via the Claude API to all customers, plus AWS (Bedrock and Claude Platform on AWS), Google Cloud, and Microsoft Foundry (preview). It is also the default model on claude.ai Free and Pro plans and available to Max, Team, and Enterprise users.

Strengths

  • Agentic coding and long-horizon task completion, finishing tasks where earlier Sonnet models stopped short
  • Strong tool use and self-checking of its own output without being asked
  • 1M-token context window for large codebases and documents
  • Near-Opus-4.8 quality at roughly one-third to one-half the price
  • Adaptive thinking on by default with effort control for cost/quality tuning

Best for developers who...

Agentic coding assistants and autonomous dev agentsHigh-volume production agent loops needing strong reasoning per dollarLarge-codebase and long-document analysis with 1M contextGeneral-purpose chat with near-frontier qualityComputer-use and tool-heavy workflows

When to choose it (and when not to)

Reach for Claude Sonnet 5 when...

  • You want frontier-adjacent agentic coding but need better cost-efficiency than Opus
  • You are running high-volume agent loops and want strong reasoning per dollar
  • You are already on Sonnet 4.6 and want a same-price capability upgrade
  • You need a 1M context window with fast latency

Look elsewhere if...

  • You need the absolute highest capability on the hardest coding/agentic tasks (use Opus 4.8 or Fable 5)
  • You depend on manual extended-thinking budgets or custom temperature/top_p (both return 400 on Sonnet 5)
  • You need Priority Tier service, which is not available on Sonnet 5

How to use it

  • Remove temperature/top_p/top_k overrides and manual thinking budgets; use the effort parameter with adaptive thinking instead
  • Recount prompts under the new tokenizer (~30% more tokens) and re-check max_tokens limits sized close to expected output
  • Guide behavior via system-prompt instructions rather than sampling parameters
  • Pass thinking:{type:'disabled'} for latency-sensitive lookups that don't need reasoning

Quickstart

Python
import anthropic

client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=4096,
    thinking={"type": "adaptive"},
    output_config={"effort": "high"},
    messages=[
        {"role": "user", "content": "Refactor this function and add tests."}
    ],
)
print(response.content[0].text)

effort defaults to 'high' on the Claude API and Claude Code. Do not set temperature/top_p or a manual thinking budget - both return a 400 error.

API model id: claude-sonnet-5

Benchmarks

BenchmarkScoreNotes
SWE-bench Verified~85.2%Secondary-source figures; Anthropic's own chart is image-based and not machine-readable. Some outlets report an earlier variant near 72.7%.
Terminal-Bench 2.180.4%Beats Opus 4.8 (74.6%); up from Sonnet 4.6's ~67.0%
SWE-bench Pro63.2%vs Sonnet 4.6 58.1%, Opus 4.8 69.2%
OSWorld-Verified81.2%Computer use; vs Sonnet 4.6 78.5%

Source: MarkTechPost benchmark comparison (Sonnet 5 vs Sonnet 4.6 vs Opus 4.8)

Compare Claude Sonnet 5 with

All model comparisons →