Sonnet 4
A balanced Sonnet-class model for general coding and professional tasks.
Claude models work only with Anthropic’s official tools
Claude models on xKiro accept requests only from Anthropic’s official tools: Claude Code (in the terminal or your IDE), Claude Desktop and Cowork. Third-party tools (such as OpenCode, Cline, Roo Code, Kilo Code, Cursor or Codex), xKiro chat and direct API calls from your own code are not supported and return an error. Every other model on xKiro works with any tool or SDK, including xKiro chat.
Set up Claude CodeModel ID
anthropic/claude-sonnet-4- Context window
- 1M
- tokens
- Max output
- 66K
- tokens
- Input
- $3
- per 1M tokens
- Output
- $15
- per 1M tokens
Cache read $0.3 · Cache write $3.75
Quickstart
Call Sonnet 4 in one request.
Claude models run only in Anthropic’s official tools. Point Claude Code at xKiro once and select this model — the same key works for every model in the catalog.
SDK guides{ "env": { "ANTHROPIC_BASE_URL": "https://api.xkiro.com", "ANTHROPIC_AUTH_TOKEN": "sk-xt-...", "ANTHROPIC_MODEL": "" }}claude Claude Code now sends its requests to anthropic/claude-sonnet-4 through xKiro.
Create an API key in the dashboard and paste it into ANTHROPIC_AUTH_TOKEN.
Pricing
What Sonnet 4 costs.
Billed per million tokens at these rates, from your plan’s budget or your wallet.
$3
Input
per 1M tokens
$15
Output
per 1M tokens
$0.3
Cache read
per 1M tokens
$3.75
Cache write
per 1M tokens
On a plan
From $0.1 / $0.5 on a plan
Plan: up to −96%
Usage on a plan comes out of your allowance, so Sonnet 4 costs from $0.1 / $0.5 per 1M tokens when you use the whole allowance — up to 96% less than pay-as-you-go.
Compare plans →Billed fairly
- Requests that fail with a 5xx error are never billed
- Retrying an identical blocking request replays the first result — no double charge
- Cancel a stream and pay only for the tokens generated
Specifications
Limits and capabilities.
- Context window
- 1,000,000 tokens
- Max output
- 65,536 tokens
- Input
- Text · Image
- Output
- Text
- Provider
- Anthropic
- Model ID
- anthropic/claude-sonnet-4
- Good for
- Coding · Long context
Capabilities
- Tool useSupported
- VisionSupported
- Video inputNot supported
- ReasoningSupported
Reasoning effort
- none
- high
Set it with reasoning_effort in the OpenAI format, or thinking in the Anthropic format.
Supported parameters
- max_tokens
- temperature
- top_p
- stop
- frequency_penalty
- presence_penalty
- seed
- stream
- tools
- tool_choice
- response_format
- structured_outputs
- reasoning
- include_reasoning
Compare
Similar models.
Closest in price and context window — same provider first, then alternatives from other providers.
Browse all 69 models| Model | Input / 1M | Output / 1M | ||
|---|---|---|---|---|
| 1M | $3 | $15 | $0.3 | |
| 1M | $3 | $15 | $0.3 | |
| 1M | $3 | $15 | $0.3 | |
| 1M | $4 | $20 | $0.2 | |
| 1M | $2 | $10 | $0.2 | |
| 1.05M | $2 | $10 | $0.2 | |
| 1.05M | $2 | $10 | $0.1 |
Start building with Sonnet 4.
Create a key, point your SDK at xKiro and call anthropic/claude-sonnet-4.
No credit card · Cancel anytime · 26 free models, free forever