Claude Opus 4.1 vs GPT-5.1-Codex
Compare the historical Anthropic and OpenAI API rates, context limits, cache pricing, and migration paths for Claude Opus 4.1 and GPT-5.1-Codex.
Catalog snapshot
What to compare
Both first-party APIs have retired these releases. GPT-5.1-Codex used the Responses API and offered a 400,000-token context window. Claude Opus 4.1 offered a 200,000-token context window and separate 5-minute and 1-hour cache-write rates. Use this comparison to audit historical workloads, then check each vendor’s replacement before migrating.
Standard text API rates per million tokens are $15.00 input and $75.00 output for Claude Opus 4.1, and $1.25 input and $10.00 output for GPT-5.1-Codex.
API pricing and model specs
Token rates in USD per million. A dash means the source did not report a value.
| Metric | Claude Opus 4.1 | GPT-5.1-Codex |
|---|---|---|
| Uncached input | $15.00 | $1.25 |
| Output | $75.00 | $10.00 |
| Cache read | $1.50 | $0.125 |
| Cache write | $18.75 | — |
| 1-hour cache write | $30.00 | — |
| Batch input | $7.50 | — |
| Batch output | $37.50 | — |
| Long-prompt pricing | — | — |
| Batch long-prompt pricing | — | — |
| Other token rates | — | — |
| Other published fees | — | — |
| Billing notes | — | — |
| API provider | Anthropic | OpenAI |
| Model ID | claude-opus-4-1-20250805 | gpt-5.1-codex |
| Model family | — | — |
| Description | Legacy Claude model for reasoning, coding, and agent workflows. | GPT model optimized for agentic coding in the Responses API. |
| Context window | 200,000 | 400,000 |
| Maximum input | — | 400,000 |
| Maximum output | 32,000 | 128,000 |
| Input modalities | text, image, pdf | text, image |
| Output modalities | text | text |
| Reasoning | Yes | Yes |
| Tool calling | Yes | Yes |
| Structured output | — | Yes |
| Open weights | No | No |
| Release date | 2025-08-05 | — |
| Knowledge cutoff | — | 2024-09-30 |
| API lifecycle | Retired · 2026-08-05 | Retired · 2026-07-23 |
| Provider replacement | claude-opus-4-8 | gpt-5.6-sol |
| Sources | ||
| Cost calculator | Estimate Claude Opus 4.1 cost | Estimate GPT-5.1-Codex cost |
Estimate your API spend
Enter token counts for one request. Put each input token in one field. Include billable reasoning tokens in output.
Claude Opus 4.1 · Anthropic
$3,000.00 / month
$0.30 per request
Cost breakdown per request
- Uncached input
- $0.15
- Output
- $0.15
Historical estimate for a retired API route.
GPT-5.1-Codex · OpenAI
$325.00 / month
$0.0325 per request
Cost breakdown per request
- Uncached input
- $0.0125
- Output
- $0.02
Historical estimate for a retired API route.
Estimates use USD list prices for text tokens. Your bill may also include search, multimodal inputs, cache storage, or account fees.
More model comparisons
- Claude Opus 5.5 vs GPT-6.2 Sol
Compare Claude Opus 5.5 and GPT-6.2 Sol on API pricing, prompt caching, context window, output limits, and features for long-running coding workloads.
- Gemini 4 Neon vs DeepSeek V4.1 Flash
Compare Gemini 4 Neon and DeepSeek V4.1 Flash on first-party API prices, caching, context windows, and supported input types.
- Gemini 3.1 Pro Preview vs DeepSeek V4 Pro
Compare Gemini 3.1 Pro Preview and DeepSeek V4 Pro on API cost, input modalities, context, output limits, caching, and open-weight availability.
- Claude Sonnet 5.5 vs Claude Opus 5.5
Compare Claude Sonnet 5.5 and Claude Opus 5.5 API prices, cache rates, context, and limits on Anthropic, then estimate the same workload for each.
Where the data comes from
Each listing shows a model served through its developer’s own API. Developers may publish separate pricing for different regions or API endpoints. Historical rates for retired first-party endpoints remain available for comparison.
Models.dev supplies the base catalog. LiteLLM adds listings and billing fields where the developer endpoint and model ID match. Directly verified records link to the developer’s documentation.
