Claude Sonnet 4.5 is Anthropic’s most advanced Sonnet model to date, optimized for real-world agents and coding workflows. It delivers state-of-the-art performance on coding benchmarks such as SWE-bench Verified, with improvements across sy…
Model details →Anthropic: Claude Sonnet 4.5 vs OpenAI: GPT-5.1-Codex
OpenAI: GPT-5.1-Codex wins on 2 of 6 axes — pricing and capability skew in its favour for most workloads.
GPT-5.1-Codex is a specialized version of GPT-5.1 optimized for software engineering and coding workflows. It is designed for both interactive development sessions and long, independent execution of complex engineering tasks. The model supp…
Model details →Side-by-side comparison
| Capability | Anthropic: Claude Sonnet 4.5 | OpenAI: GPT-5.1-Codex | Winner |
|---|---|---|---|
| Context window Maximum number of input tokens the model can attend to in a single request. | 1M | 400K | 🏆 Anthropic: Claude Sonnet 4.5 |
| Input price (per 1M) Cost per million input tokens billed by the provider. | $3.00 | $1.25 | 🏆 OpenAI: GPT-5.1-Codex |
| Output price (per 1M) Cost per million output tokens billed by the provider. | $15.00 | $10.00 | 🏆 OpenAI: GPT-5.1-Codex |
| Tool / function calling First-class support for emitting structured tool calls. | Yes | Yes | Tie |
| Vision input Accepts image inputs alongside text. | Yes | Yes | Tie |
| Reasoning mode Internal chain-of-thought / extended-thinking support. | Yes | Yes | Tie |
Frequently asked questions
Is Anthropic: Claude Sonnet 4.5 better than OpenAI: GPT-5.1-Codex?
OpenAI: GPT-5.1-Codex wins on 2 of 6 axes — pricing and capability skew in its favour for most workloads.
What's the price difference between Anthropic: Claude Sonnet 4.5 and OpenAI: GPT-5.1-Codex?
Input: $3.00 vs $1.25 per 1M tokens. Output: $15.00 vs $10.00 per 1M tokens.
What context windows do Anthropic: Claude Sonnet 4.5 and OpenAI: GPT-5.1-Codex support?
Anthropic: Claude Sonnet 4.5 supports up to 1M tokens. OpenAI: GPT-5.1-Codex supports up to 400K tokens.
Do both Anthropic: Claude Sonnet 4.5 and OpenAI: GPT-5.1-Codex support tool calling?
Anthropic: Claude Sonnet 4.5: yes. OpenAI: GPT-5.1-Codex: yes.