Skip to content

Claude Sonnet 4

Also accepted:claude-sonnet-4claude-sonnet-4-0anthropic/claude-sonnet-4-0claude-sonnet-4-20250514anthropic/claude-sonnet-4-20250514
Texttext → text1Mtoken context
Context
1M
Input
$3.00
Output
$15.00
TTFT
—
Uptime
—
Routes
3
01

Providers + pricing

Capabilities
● Your own key · billed by your provider · AnyRouter fee $0
OpenRouter
openrouter-byok
$3.00list$15.00list
$0
Unavailable
OpenCode Zen
opencode-zen-byok
$3.00list$15.00list
$0
Unavailable
Cline
cline-byok
$3.00list$15.00list
—
Unavailable
● Free pool · donated keys · not available for this model — donate a key
02

Try it

POST /api/v1/chat/completions
import { createAnyRouter } from "@anyr/ai-sdk-provider"import { generateText } from "ai" const anyrouter = createAnyRouter() const { text } = await generateText({  model: anyrouter("anthropic/claude-sonnet-4"),  prompt: "Say hi in 3 words.",})console.log(text)
Set ANYROUTER_API_KEY · edits on the demo update this code
Live demo

Type a prompt and run it on this model.

03

Uptime + latency

—recent checks · all routes

No health checks recorded for this model yet.

24h
No traffic in the last 24h.
More performance detail
Usage analytics

Loading usage…

Uptime & Health
No uptime data yet

These providers haven't been health-probed for this model yet. The router still routes around upstreams that fail live requests — uptime fills in once probe history accrues.

04

Your access

Credits
Your own key · AnyRouter fee $0

Run Claude Sonnet 4 on your own key — your requests are billed by the provider. Pool callers pay AnyRouter credits.

No BYOK keys configured for this model yet.

Share a key with the pool to earn credits for every request it serves, covering your plan cost.

Free poolnot in pool yetDonate key →
Create API key for this model
05

About

Anthropic's Claude Sonnet 4, a versatile model combining strong reasoning, coding proficiency, and broad instruction-following capabilities.

Released 2025-05-22

Text generation
Context length1,000,000 tokens
Max output64,000 tokens
ArchitectureTransformer
Categorytext
ReleasedMay 22, 2025
Modalities
Capabilities
API & code
Share cards
Claude Sonnet 4 share card
Claude Sonnet 4
OpenRouter upstream share card
OpenRouter upstream
OpenCode Zen upstream share card
OpenCode Zen upstream
Cline upstream share card
Cline upstream