Claude Sonnet 4

anthropic/claude-sonnet-4
by Anthropic · image+text+file in · text out · 1M ctx · 2025-05-22

Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in…

INPUT$3.00/ 1M tokens
OUTPUT$15.00/ 1M tokens
p50 TTFT1.40 s7d
p95 TTFT4.25 s7d
TRAFFIC12.2Ktokens / 7d
Code samples
from openai import OpenAI

client = OpenAI(
    base_url="https://orcarouter.ai/v1",
    api_key="$ORCAROUTER_API_KEY",
)

response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
Pricing
Input / 1M tokens$3.00
Output / 1M tokens$15.00
Cache read / 1M$0.300
Cache write / 1M$3.75
CurrencyUSD
Performance
TTFT p50
1.40 s
Output speed
42.0 tok/s
TTFT p95
4.25 s
Error rate
1.0%
Public benchmarks
AA Coding
30.6
AA Intelligence
33.0
AA Math
38.0
AIME
40.7
AIME 2025
38.0
GPQA Diamond
68.3
Humanity's Last Exam
4.0
IFBench
45.4
LiveCodeBench
44.9
Long-Context Recall
44.3
MATH-500
93.4
MMLU-Pro
83.7
SciCode
37.3
TerminalBench Hard
27.3
τ²-Bench
52.3
Source: artificialanalysis.ai
FAQ
How much does Anthropic: Claude Sonnet 4 cost on OrcaRouter?
Anthropic: Claude Sonnet 4 is priced at $3.00 per 1M input tokens and $15.00 per 1M output tokens via OrcaRouter. Pricing is pulled live from the routing layer.
What is Anthropic: Claude Sonnet 4's context window?
Anthropic: Claude Sonnet 4 supports a context window of 1M tokens. Use long-context features (RAG, summarisation) up to that limit.
How do I call Anthropic: Claude Sonnet 4 via the OpenAI SDK?
Set OpenAI base_url to https://orcarouter.ai/v1, supply your OrcaRouter API key, and pass model="anthropic/claude-sonnet-4" in the chat.completions.create call.
Does OrcaRouter rate-limit Anthropic: Claude Sonnet 4?
Per-model rate limits follow your OrcaRouter plan. Free tiers ship with conservative caps; paid tiers lift them. Check /pricing for current quotas.
Embed this badge
Anthropic: Claude Sonnet 4$3.00/M in1399ms p50via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/anthropic/claude-sonnet-4" target="_blank"> <img src="https://www.orcarouter.ai/embed/anthropic/claude-sonnet-4.svg" alt="Anthropic: Claude Sonnet 4 on OrcaRouter" /> </a>
Markdown [![Anthropic: Claude Sonnet 4](https://www.orcarouter.ai/embed/anthropic/claude-sonnet-4.svg)](https://www.orcarouter.ai/models/anthropic/claude-sonnet-4)