Compare GPT-5 from OpenAI and Claude Sonnet 4 from Anthropic on key metrics including benchmarks, price, context length, and other model features. Access both models and hundreds of others through the OpenRouter API.
| Attribute | GPT-5 | Claude Sonnet 4 |
|---|---|---|
| Input price | $1.25/M tokens | Pricing varies by provider |
| Output price | $10/M tokens | Pricing varies by provider |
| Context window | 400,000 tokens | 1,000,000 tokens |
| Intelligence Index | Not available | Not available |
| Coding Index | 37.8 | 37.6 |
| Agentic Index | Not available | Not available |
| Latency (p50) | 10.68 s | Not available |
| Throughput (p50) | 69.0 tok/s | Not available |
| Provided by | OpenAI | Anthropic |
| Model page | GPT-5 model details, providers and pricing | Claude Sonnet 4 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.