Anthropic: Claude Sonnet 4✓ Catalog verified
Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%), Sonnet 4 balances capability and computational efficiency, making it suitable for a broad range of applications from routine coding tasks to complex software development projects. Key enhancements include improved autonomous codebase navigation, reduced error rates in agent-driven workflows, and increased reliability in following intricate instructions. Sonnet 4 is optimized for practical everyday use, providing advanced reasoning capabilities while maintaining efficiency and responsiveness in diverse internal and external scenarios. Read more at the blog post here
Overview
Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%), Sonnet 4 balances capability and computational efficiency, making it suitable for a broad range of applications from routine coding tasks to complex software development projects. Key enhancements include improved autonomous codebase navigation, reduced error rates in agent-driven workflows, and increased reliability in following intricate instructions. Sonnet 4 is optimized for practical everyday use, providing advanced reasoning capabilities while maintaining efficiency and responsiveness in diverse internal and external scenarios. Read more at the blog post here
Access: available through the official Anthropic API. Context window: 200K.
Specifications
| API identifier | anthropic/claude-sonnet-4 |
| Provider | Anthropic |
| Model type | Multimodal LLM |
| Context window | 200K catalog |
| Input modalities | image · text · file |
| Output modalities | text |
| Released | May 22, 2025 |
| Tokenizer | Claude |
| Moderated | Yes |
| Architecture modality | text+image+file->text |
API defaults
{
"top_p": null,
"temperature": null,
"frequency_penalty": null
}Pricing
Live pricing components for anthropic/claude-sonnet-4 as published in the catalog.
| Pricing component | Raw unit price | Normalized | Unit |
|---|---|---|---|
| Prompt tokens | $0.000003 | $3.00 / 1M | Per input token |
| Completion tokens | $0.000015 | $15.00 / 1M | Per output token |
| Request fee | N/A | N/A | Per request |
| Image fee | N/A | N/A | Per image unit |
| Web search fee | $0.01 | $0.010000 | Per search request |
Cost calculator
Estimate monthly spend from your own token volumes.
Estimated Total Cost
$4.5Calculated from current list pricing in the ModelsAtlas catalog.Capabilities
| Capability | Status | What it means |
|---|---|---|
| Visual Understanding | ✓ Supported | Image and document analysis support |
| Audio Processing | Not advertised | Speech and voice aligned flows |
| Tool Calling | ✓ Supported | Supports tools / function calling |
| Self-Hosting | Not advertised | Deploy outside managed APIs |
Capability signals
Directional signals derived from model metadata and capability tags — not official benchmark submissions.
Quick start
Call Anthropic: Claude Sonnet 4 through an OpenAI-compatible client.
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="YOUR_API_KEY"
)
response = client.chat.completions.create(
model="anthropic/claude-sonnet-4",
messages=[{"role": "user", "content": "Explain quantum physics."}]
)
print(response.choices[0].message.content)Alternatives
Closest models by context window from a different provider.
| Model | Provider | Context | Input /1M | Actions |
|---|---|---|---|---|
| OpenAI: o1 | OpenAI | 200K | $15.00 | View → |
| OpenAI: o1-pro | OpenAI | 200K | $150.00 | View → |
Sources & attribution
Pricing and metadata are maintained in the ModelsAtlas catalog.
Frequently asked questions
How much does Anthropic: Claude Sonnet 4 cost?
$3.00 per 1M input tokens and $15.00 per 1M output tokens on the official Anthropic API.
What is the context window of Anthropic: Claude Sonnet 4?
Anthropic: Claude Sonnet 4 supports up to 200K tokens of context.
Does Anthropic: Claude Sonnet 4 support tool / function calling?
Yes, Anthropic: Claude Sonnet 4 supports tool / function calling — you can register tools and the model will emit structured tool calls.
How do I access Anthropic: Claude Sonnet 4?
Use the official Anthropic API with the model id `anthropic/claude-sonnet-4`. See the Quick start section above for code examples.