Compare Claude Sonnet 4 from Anthropic and GPT-5 from OpenAI on key metrics including benchmarks, price, context length, and other model features. Access both models and hundreds of others through the OpenRouter API.
| Attribute | Claude Sonnet 4 | GPT-5 |
|---|---|---|
| Input price | Pricing varies by provider | $1.25/M tokens |
| Output price | Pricing varies by provider | $10/M tokens |
| Context window | 1,000,000 tokens | 400,000 tokens |
| Intelligence Index | Not available | Not available |
| Coding Index | 37.6 | 37.8 |
| Agentic Index | Not available | Not available |
| Latency (p50) | Not available | 1.62 s |
| Throughput (p50) | Not available | 46.0 tok/s |
| Provided by | Anthropic | OpenAI |
| Model page | Claude Sonnet 4 model details, providers and pricing | GPT-5 model details, providers and pricing |
Benchmark data updated
Claude Sonnet 4 has the longer context window at 1,000,000 tokens, compared with 400,000 tokens for GPT-5.
GPT-5 scores higher on coding, with an Artificial Analysis Coding Index of 37.8 compared with 37.6 for Claude Sonnet 4.