Independent & unofficial. Not affiliated with Anthropic. Facts verified 21 August 2026. Always confirm pricing at claude.com/pricing.
Retired 15 June 2026

Claude Sonnet 4 (retired)

Claude Sonnet 4 was retired on 15 June 2026. What it was, how it compared to Opus 4 at the time, and the exact model string to move to now.

Retired model

Claude Sonnet 4 (claude-sonnet-4-20250514) was retired from the Claude API on 15 June 2026, having been deprecated on 14 April 2026. Requests using that model ID now return an error. The current replacement is claude-sonnet-5 - see the Claude Sonnet 5 page for its specification, price and migration notes.

Why this page still exists: Sonnet 4 was, for most of 2025, the Claude model that actually ran in production. It is baked into old tutorials, integration guides, n8n and Zapier workflows and half-finished side projects. A version record with a correct migration path is more useful than a removed page.

Claude Sonnet 4 was released on 22 May 2025 as the mid-tier model of the Claude 4 generation. It replaced Claude 3.5 Sonnet as the default workhorse: a 200,000-token context window, $3 / $15 per million tokens, and - awkwardly for Anthropic's own pricing logic - a marginally higher SWE-bench Verified score than the far more expensive Opus 4 released the same day.

#Claude Sonnet 4 as it shipped

Status
Retired 15 June 2026
Released
22 May 2025
Retired API ID
claude-sonnet-4-20250514
Context window
200,000 tokens
Max output
64,000 tokens
Price at launch
$3 input / $15 output per million tokens
Batch price
$1.50 / $7.50 per million tokens
Replace with
claude-sonnet-5

#What was Claude Sonnet 4 for?

At launch in May 2025, Sonnet 4 was pitched as frontier-adjacent capability at a price you could put in front of real traffic. It was the model for code generation, data extraction, support automation, document analysis and everything else where per-request cost multiplied by volume mattered more than the last few points of reasoning depth. That role has passed intact to Sonnet 5, which is still the tier most teams should default to.

It inherited the hybrid-reasoning design introduced by Claude 3.7 Sonnet three months earlier: answer immediately, or engage extended thinking with a token budget you set explicitly. That manual budget is gone from the current lineup - the shift to adaptive thinking and an effort ladder is covered on the thinking and reasoning page, and it is the single largest behavioural difference between Sonnet 4-era code and code written today.

#Sonnet 4 versus Opus 4, as it looked in May 2025

This is the comparison people actually searched for at the time, preserved with its original figures. Both models were retired on the same day.

DimensionClaude Sonnet 4Claude Opus 4
Released22 May 202522 May 2025
Context window200,000 tokens200,000 tokens
Max output64,000 tokens32,000 tokens
Price per million tokens$3 / $15$15 / $75
SWE-bench Verified at launch72.7%72.5%
Terminal-bench at launchNot published43.2%
Positioned forHigh-volume production workLong multi-step agentic tasks
Retired15 June 202615 June 2026

These are May 2025 figures for retired models, and SWE-bench Verified is no longer reported by frontier vendors - Anthropic, OpenAI and Google have all moved to long-horizon agentic evaluations instead. They are useful for understanding the pricing argument of the time, not for judging anything current. For context on where the series went: Opus 4.1 scored 74.5% (August 2025), Sonnet 4.5 scored 77.2% (September 2025), and Haiku 4.5 - the cheapest model in the family - scored 73.3% in October 2025, beating both Claude 4 launch models within five months.

The five-times price gap for a 0.2-point benchmark deficit was the strongest argument anyone had for defaulting to Sonnet, and it is why the Sonnet tier became the commercial centre of the lineup. The same logic is worked through with current numbers on the model comparison page.

#Migrating away from Claude Sonnet 4

Old model stringPlatformRecommended replacement
claude-sonnet-4-20250514Claude APIclaude-sonnet-5
anthropic.claude-sonnet-4-20250514-v1:0AWS Bedrockanthropic.claude-sonnet-5
claude-sonnet-4@20250514Google Cloud / Vertex AIclaude-sonnet-5
claude-sonnet-4-20250514Anthropic's own deprecation noticeclaude-sonnet-4-6 (like-for-like, still callable)

Anthropic's deprecation notice named claude-sonnet-4-6 as the direct successor, and it is still available - the record for it is on the Sonnet 4.6 page. For new work, claude-sonnet-5 is the better target: $2 / $10 per million tokens against Sonnet 4's $3 / $15, a 1M-token context window as standard, and 128k maximum output.

The cheaper sticker price is not the whole saving

Sonnet 5 uses the tokenizer introduced with Opus 4.7, which emits roughly 30% more tokens for the same text than Sonnet 4's tokenizer did. A workload that looks 33% cheaper per token is closer to a 13% saving once re-counted. Re-measure real prompts rather than trusting the rate card, and revisit your max_tokens values at the same time. Worked examples are on the pricing page.

Three API behaviours also changed after Sonnet 4 and will break a model-string-only migration: temperature, top_p and top_k now return a 400 error on Sonnet 5; assistant message prefill was removed on 4.6 and later; and thinking.budget_tokens has been replaced by adaptive thinking with an effort parameter. A production-grade migration checklist with code is on the Sonnet API guide.

#Sonnet 4 may still be listed on partner clouds

Anthropic's pricing documentation continues to list Claude Sonnet 4 with a footnote marking it retired except on Amazon Bedrock and Google Cloud. Partner clouds run their own deprecation calendars, so a workload calling Sonnet 4 through Bedrock may still succeed while the identical call on the first-party API fails. That is worth knowing when auditing an estate - it is not a reason to stay put. A model that survives only on a partner's timetable is a dependency with an unannounced expiry date.

#What to use instead, by workload

What you used Sonnet 4 forUse nowWhy
General production trafficclaude-sonnet-5Cheaper per token, 1M context, the current default tier
Classification, extraction, routingclaude-haiku-4-5$1 / $5 and faster - see Haiku 4.5
Long autonomous agent runsclaude-opus-5Built for multi-hour agentic work; see automation patterns
Minimal-change swapclaude-sonnet-4-6Anthropic's named successor; keeps the older tokenizer

The archive for the other half of this generation is on the Claude Opus 4 page, and every currently callable model is listed with its specification on the model index.

#Frequently asked questions

Is Claude Sonnet 4 still available?

No. Sonnet 4 was deprecated on 14 April 2026 and retired from the Claude API on 15 June 2026. Calls to claude-sonnet-4-20250514 return an error. Anthropic's pricing documentation notes it remained listed on Amazon Bedrock and Google Cloud after that date, on those platforms' own schedules.

What replaced Claude Sonnet 4?

Anthropic's deprecation notice named claude-sonnet-4-6 as the direct replacement, and it is still callable. For new work use claude-sonnet-5, released 30 June 2026: $2 / $10 per million tokens, a 1M-token context window and 128k maximum output.

What did Claude Sonnet 4 score on SWE-bench Verified?

72.7%, published by Anthropic on 22 May 2025 - slightly above Claude Opus 4's 72.5% on the same day, at a fifth of the price. These are historical figures for a retired model, and frontier vendors no longer report SWE-bench Verified.

Is Sonnet 5 actually cheaper than Sonnet 4 was?

Per token, yes: $2 / $10 against $3 / $15. In practice the gap is narrower, because Sonnet 5's tokenizer produces roughly 30% more tokens for the same text. Measure your own prompts under the new tokenizer before assuming a one-third saving.

Did Claude Sonnet 4 support a 1M-token context?

No. Sonnet 4 had a 200,000-token context window and 64,000-token maximum output. The 1M-token window arrived later, in beta on Opus 4.6 in February 2026, and is now standard on Sonnet 5, Opus 5 and Fable 5 with no beta header and no long-context price premium.

Verify it yourself

Retirement dates, replacement model IDs and pricing footnotes checked against platform.claude.com/docs, and launch benchmarks against anthropic.com/news/claude-4, on 21 August 2026. This is an archive page: every capability statement describes Sonnet 4 as it stood in May 2025.