# Claude Sonnet 4 (latest) Usage, Cost & Rank | OpenCode Data

Balanced Claude model for coding, analysis, agent workflows, and cost control

- Page: https://opencode.ai/data/anthropic/claude-sonnet-4-0
- JSON: https://opencode.ai/data/anthropic/claude-sonnet-4-0.json
- Model ID: anthropic/claude-sonnet-4-0
- Lab: Anthropic

## Model facts

| Fact | Value |
| --- | --- |
| Context window | 200K |
| Max output | 64K |
| Knowledge cutoff | 2025-03-31 |
| Release date | 2025-05-22 |
| Input modalities | text, image, pdf |
| Output modalities | text |
| Reasoning | Yes |
| Tool calling | Yes |
| Open weights | No |

## Benchmarks

| Benchmark | Score | Metric | Source |
| --- | --- | --- | --- |
| Aider Polyglot | 61.3 | percent correct | https://aider.chat/docs/leaderboards/ |
| SWE-Bench Pro | 42.7 | resolve rate | https://labs.scale.com/leaderboard/swe_bench_pro_public |

## Methodology

- Updates: Aggregated every hour. Days and weeks use UTC.
- Tokens: Input, output, reasoning, and cached tokens for each request.
- Users and sessions: Approximate counts of distinct users and OpenCode sessions.
- Cost: Session cost is the average cost per OpenCode session. Token prices are list prices from the OpenCode model catalog.
- Retention: The share of a model's users in one week who use it again the next week.
- Citation: Cite OpenCode Data (opencode.ai/data) with the update time shown at the top of the page.
