Anthropic logo Retired Jun 2026

Claude Sonnet 4

Released May 2025 alongside Opus 4, with coding and reasoning upgrades over Sonnet 3.7 and hybrid instant and extended thinking.

Cheapest via Replicate
Input
$3.00 /1M tokens
Output
$15.00 /1M tokens
Replicate 1 provider

Key Specifications

Context window
200K tokens
Max output
64K tokens
Knowledge cutoff
Released
Inputs
Text, image
Capabilities Show details
Reasoning Thinks before it answers, always on or as a switchable mode. Function calling Connect to external tools, APIs, and systems. Structured output Return responses in structured formats like JSON.

Hosted API pricing

Provider Input /1M tokens Output /1M tokens Cost at 10M in + 2M out
Replicate logo Replicate $3.00 $15.00 $60.00 View

Heads up: Base-tier, on-demand rates per 1M tokens; cached, batch and long-context tiers excluded. A provider may serve a shorter context or a quantized build than the creator's release. Verify before provisioning. More on how we price.

Similarly priced models

The models nearest Claude Sonnet 4 by blended rate, each at its own cheapest provider.

Model Blended /1M vs Claude Sonnet 4
Cohere Command A Cohere $3.75 −25%
OpenAI GPT-4o OpenAI $3.75 −25%
OpenAI GPT-5.2 OpenAI $3.7917 −24%
OpenAI GPT-5.3-Codex OpenAI $3.7917 −24%
OpenAI GPT-5.4 OpenAI $4.5833 −8%
Anthropic Claude Sonnet 4 This model Anthropic $5.00
Anthropic Claude Sonnet 4.5 Anthropic $5.00 0%
Anthropic Claude Sonnet 4.6 Anthropic $5.00 0%
Anthropic Claude Opus 4.5 Anthropic $8.3333 +67%
Anthropic Claude Opus 4.6 Anthropic $8.3333 +67%
Anthropic Claude Opus 4.7 Anthropic $8.3333 +67%

Prices are USD per 1M tokens at each model's cheapest listed provider. Blended is the cost of 10M input plus 2M output tokens, spread over the 12M.

Frequently Asked Questions

What is Claude Sonnet 4 good for?

Coding and reasoning, with a choice of instant or extended thinking. It takes text and images, at the Sonnet tier below Opus.

When is Claude Sonnet 4 not a good fit?

Any new work: Anthropic retired it in June 2026, and Sonnet 4.5 and 4.6 know more recent events. No audio or video input, and closed weights, so no self-hosting.

What is the cheapest way to run Claude Sonnet 4?

The cheapest hosted rate is $3.00 / $15.00 per 1M tokens via Replicate.

How does Claude Sonnet 4 compare with Claude Sonnet 4.5?

Anthropic says Claude Sonnet 4.5 improves on Claude Sonnet 4 most in computer use, reasoning and math, and holds focus on long multi-step tasks for many hours. The launch added a memory tool and context editing so agents can run longer. Same price, 200K-token context and text and image input. Claude Sonnet 4 came out 4 months earlier and has a newer knowledge cutoff (March 2025 against January 2025).

Can I self-host Claude Sonnet 4?

No. Anthropic does not publish the weights; Claude Sonnet 4 is available only through hosted APIs.

More from Anthropic

Model Context Input /1M Output /1M
Anthropic Claude Sonnet 4.6 1M $3.00 $15.00
Anthropic Claude Sonnet 4.5 200K $3.00 $15.00
Anthropic Claude Sonnet 5 1M $2.00 $10.00
Anthropic Claude Opus 5 1M $5.00 $25.00
Anthropic Claude Opus 4.7 1M $5.00 $25.00
Anthropic Claude Opus 4.8 1M $5.00 $25.00
Anthropic Claude Opus 4.6 1M $5.00 $25.00
Anthropic Claude Opus 4.5 200K $5.00 $25.00