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.
GPT-5 and Claude Sonnet 4 are available through the OpenRouter API, so switching between them takes a model slug change rather than a new integration.
GPT-5, from OpenAI, has a 400,000-token context window and is priced at $1.25/M tokens input, $10/M tokens output on OpenRouter.
Claude Sonnet 4, from Anthropic, has a 200,000-token context window and is priced at $3/M tokens input, $15/M tokens output on OpenRouter.
| GPT-5 | Claude Sonnet 4 | |
|---|---|---|
| Input price | $1.25/M tokens | $3/M tokens |
| Output price | $10/M tokens | $15/M tokens |
| Context window | 400,000 tokens | 200,000 tokens |
| Intelligence Index | Not available | Not available |
| Coding Index | 37.8 | 37.6 |
| Agentic Index | Not available | Not available |
| Latency (p50) | 3.42 s | 1.79 s |
| Throughput (p50) | 74.0 tok/s | Not available |
GPT-5 has the longer context window at 400,000 tokens, compared with 200,000 tokens for Claude Sonnet 4.
GPT-5 scores higher on coding, with an Artificial Analysis Coding Index of 37.8 compared with 37.6 for Claude Sonnet 4.