← All Comparisons

GPT-5.2 Codex vs Claude Sonnet 4.5

A detailed comparison of GPT-5.2 Codex (OpenAI) and Claude Sonnet 4.5 (Anthropic) across pricing, performance, and features.

Pricing Comparison

MetricGPT-5.2 CodexClaude Sonnet 4.5Difference
Input / 1M tokens$1.75$3.00+71%
Output / 1M tokens$14.00$15.00+7%
Context window200K200K
Max output65.536K16K

Benchmark Comparison

BenchmarkGPT-5.2 CodexClaude Sonnet 4.5
MMLU-Pro89%84.5%
HumanEval95.5%93%
GPQA76%68.2%

Capabilities

CapabilityGPT-5.2 CodexClaude Sonnet 4.5
code
reasoning
text
tool-use
vision

GPT-5.2 Codex Strengths

  • Strong coding performance
  • Available via API now
  • 200K context window

GPT-5.2 Codex Weaknesses

  • Being superseded by 5.3
  • Higher output cost than some competitors

Claude Sonnet 4.5 Strengths

  • Well-tested and stable
  • Strong coding and analysis

Claude Sonnet 4.5 Weaknesses

  • Superseded by Sonnet 4.6
  • Same price as the newer model

Quick Verdict

Best value: GPT-5.2 Codex is the more affordable option at $1.75/$14 per 1M tokens.

Higher benchmarks: GPT-5.2 Codex scores higher on average across available benchmarks (86.8% avg).

Choose GPT-5.2 Codex if cost matters most. Choose Claude Sonnet 4.5 if you need the best possible quality for complex tasks.

More Comparisons