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

Claude Sonnet 5

Anthropic's June 2026 Sonnet with near-Opus quality, now replaced by Sonnet 5.5 at the same price.

Anthropic has replaced this model with Claude Sonnet 5.5.

Context window

1M

Input / 1M tokens

$2.00

Output / 1M tokens

$10.00

Provider

Anthropic

$2/$10 per 1M input/output tokens; cache hits $0.20 per 1M. Anthropic announced this at launch as introductory pricing through August 31, 2026, but its pricing page now lists it as the standard price and says the scheduled increase to $3/$15 on September 1, 2026 will not occur. The new tokenizer produces ~30% more tokens for the same text vs Sonnet 4.6, so equivalent requests cost more than the per-token rate alone suggests. Batch API and prompt caching discounts available. · Data verified 2026-11-11

Claude Sonnet 5 (June 30, 2026) was a drop-in upgrade for Sonnet 4.6, delivering large gains in agentic coding, tool use, reasoning, and knowledge work. Its performance approached Opus 4.8 at substantially lower cost, and it shipped with adaptive thinking on by default and a new tokenizer. Manual extended thinking and non-default sampling parameters return 400 errors. Claude Sonnet 5.5 replaced it in September 2026 at the same $2/$10 price with faster output and cheaper cache reads; Sonnet 5 stays in the API as a legacy model (retirement not before June 30, 2027) and still accepts thinking type disabled, which Sonnet 5.5 rejects.

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 via the Claude API (claude-sonnet-5), Amazon Bedrock (anthropic.claude-sonnet-5), Claude Platform on AWS, Google Cloud, and Microsoft Foundry. Anthropic lists it as a legacy model (retirement not before June 30, 2027) and recommends Claude Sonnet 5.5, which has the same $2/$10 list price.

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 have a pipeline tuned to Sonnet 5 and want stable behavior while you test Sonnet 5.5
  • →You turn thinking off with thinking type disabled or use forced tool_choice, both of which Sonnet 5.5 rejects
  • →You need a 1M context window at $2/$10 with the Sonnet 5 request surface

Look elsewhere if...

  • ✕New projects: Sonnet 5.5 has the same price, faster output and cheaper cache reads ($0.10 vs $0.20 per 1M)
  • ✕You need the absolute highest capability on the hardest coding/agentic tasks (use Opus 5.5 or Fable 5.2)
  • ✕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

Compare Claude Sonnet 5 with any other model

Build a comparison →
All model comparisons →