ProprietaryAnthropicmidtextvision
Claude Sonnet 4
Mid-2025 mid-tier Claude, the predecessor workhorse to Sonnet 4.6 and still common in production.
Updated
Quick facts
- Released
- May 2025
- Context
- 200K tokens
- Output / 1M
- $15.00 / 1M tokens
- License
- Proprietary
About Claude Sonnet 4
Sonnet 4 was Anthropic's mid-tier launch alongside Opus 4 and the model that powered the bulk of Claude API traffic through the rest of 2025. Most production migrations to 4.6 happened over Q1 2026; many older deployments still run on 4 for stability.
Benchmarks
Published scores from Anthropic's model card or independent leaderboards. We do not publish numbers we cannot source, see methodology.
HumanEval
,
Python coding pass@1
MMLU
,
Broad academic knowledge
GPQA
,
Graduate-level reasoning
SWE-bench
65.0
Real software-engineering tasks
- SWE-bench Verified65.0
Capabilities
Strengths
- Solid all-rounder
- Mature deployment ecosystem
Tracked weaknesses
- Mostly superseded by 4.6
Pricing
Per-million-token rates as published by Anthropic.
| Tier | Price | Notes |
|---|---|---|
| Input | $3.00 / 1M tokens | Tokens you send to the model |
| Output | $15.00 / 1M tokens | Tokens the model generates |
| Context | 200K tokens | Max combined input + output |
Call Claude Sonnet 4 from your code
Drop-in snippet for the Anthropic SDK. Set your API key in the environment and run.
typescript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const message = await client.messages.create({
model: "claude-sonnet-4",
max_tokens: 1024,
messages: [
{ role: "user", content: "What's the time complexity of quicksort?" },
],
});
console.log(message.content);Compare Claude Sonnet 4 with…
Frequently asked
How much does Claude Sonnet 4 cost per million tokens?
Claude Sonnet 4 is priced at $3.00 / 1M tokens for input tokens and $15.00 / 1M tokens for output tokens via the official Anthropic API at the time of writing.What is Claude Sonnet 4's context window?
Claude Sonnet 4 supports a context window of 200K tokens.Is Claude Sonnet 4 open source?
No. Claude Sonnet 4 is a closed-weight model, you can use it via Anthropic's API but the model weights are not publicly downloadable.When was Claude Sonnet 4 released?
Claude Sonnet 4 was released on May 22, 2025 by Anthropic.What is Claude Sonnet 4's knowledge cutoff?
Claude Sonnet 4's training data has a knowledge cutoff of Mar 2025. For information after that date you'll need a tool-use or web-search wrapper.
Friday digest
Intelligence, distilled weekly.
One short email every Friday, new model launches, leaderboard moves, and pricing drops. Curated by hand. Free, no spam.