Comparison · 2026-05-12
GPT-5.1 Codex vs Claude Sonnet 4.5 (latest)
Side-by-side comparison of pricing, context window and capabilities for GPT-5.1 Codex (OpenAI) and Claude Sonnet 4.5 (latest) (Anthropic). Focus: coding.
| GPT-5.1 Codex | Claude Sonnet 4.5 (latest) | |
|---|---|---|
| Vendor | OpenAI | Anthropic |
| Input price / 1M tokens | $1.25 | $3.00 |
| Output price / 1M tokens | $10.00 | $15.00 |
| Total per 1M (in + out) | $11.25 | $18.00 |
| Context window | 400K | 200K |
| Max output tokens | 128K | 64K |
| Tool calling | ✓ Yes | ✓ Yes |
| Structured output | ✓ Yes | Unknown |
| Reasoning | ✓ Yes | ✓ Yes |
| Vision input | ✓ Yes | ✓ Yes |
| Open weights | ✗ No | ✗ No |
| Provider availability | 19 providers | 16 providers |
| Release date | 2025-11-13 | 2025-09-29 |
| Knowledge cutoff | 2024-09-30 | 2025-07-31 |
Quick takeaway
- GPT-5.1 Codex is 1.6× cheaper per 1M tokens (input + output combined).
- GPT-5.1 Codex has a larger context window (400K vs 200K).
- Only GPT-5.1 Codex supports structured output / JSON mode.
- GPT-5.1 Codex is more widely available across providers (19 vs 16).
Last updated:
Prices in USD per 1M tokens. Unknown means the provider does not publish per-token pricing.
Data is sourced from models.dev and normalized for comparison. Prices and capabilities may change. Always verify critical production decisions with the provider's official documentation.