AI Model Intelligence

Comparison · 2026-08-13

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 CodexClaude Sonnet 4.5 (latest)
VendorOpenAIAnthropic
Input price / 1M tokens$1.07$3.00
Output price / 1M tokens$8.50$15.00
Total per 1M (in + out)$9.57$18.00
Context window400K1M
Max output tokens128K64K
Tool callingYesYes
Structured outputYesYes
ReasoningYesYes
Vision inputYesYes
Open weightsNoNo
Provider availability18 providers23 providers
Release date2025-11-132025-09-29
Knowledge cutoff2024-09-302025-07-31

Quick takeaway

  • GPT-5.1 Codex is 1.9× cheaper per 1M tokens (input + output combined).
  • Claude Sonnet 4.5 (latest) has a larger context window (1M vs 400K).
  • Claude Sonnet 4.5 (latest) is more widely available across providers (23 vs 18).
GPT-5.1 Codex · See all 18 providers →Claude Sonnet 4.5 (latest) · See all 23 providers →

How to read this comparison

This page compares GPT-5.1 Codex and Claude Sonnet 4.5 (latest) on the dimensions that matter most for production LLM selection: per-token cost, context window, declared capabilities (tool calling, structured output, reasoning, vision), and provider availability.

Green highlights in the table indicate which model leads on a given row. "Leads" means lower price or higher context/capability — not necessarily "better for your use case". A model that costs 3× more may still be the right choice if it unlocks a capability you need.

What this comparison does NOT tell you

  • Quality / accuracy — we have no benchmark data. Declared capabilities ≠ measured performance.
  • Latency — time-to-first-token varies by provider, region and load. Test with your actual traffic.
  • Prompt caching savings — if you reuse system prompts, the cheaper model on headline rate may not be cheapest in practice.
  • Fine-tuning availability — not all models can be fine-tuned, even if they are open-weight.

Data is refreshed daily. If a model's capabilities or pricing change, this page updates automatically on the next build cycle.

Frequently asked questions

Is GPT-5.1 Codex cheaper than Claude Sonnet 4.5 (latest)?

GPT-5.1 Codex costs $1.07/1M tokens input + $8.50/1M tokens output, while Claude Sonnet 4.5 (latest) costs $3.00/1M tokens input + $15.00/1M tokens output. GPT-5.1 Codex is cheaper per combined 1M tokens.

Which model has a longer context window, GPT-5.1 Codex or Claude Sonnet 4.5 (latest)?

Claude Sonnet 4.5 (latest) supports a longer context window — 1,000,000 tokens vs 400,000 tokens.

Where can I run GPT-5.1 Codex and Claude Sonnet 4.5 (latest)?

GPT-5.1 Codex is available on 18 providers; Claude Sonnet 4.5 (latest) is available on 23 providers. See each model's detail page for the full provider list.

Last updated:

Prices in USD per 1M tokens. Unknown means the provider does not publish per-token pricing.

Pricing and capabilities are refreshed daily and reconciled against each provider's official documentation. Always verify critical production decisions with the provider directly.