LogoAI Jet

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

First model
Second model

Search 685 first-party API listings across 27 developer endpoints.

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.

MetricClaude Opus 4.1GPT-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 providerAnthropicOpenAI
Model IDclaude-opus-4-1-20250805gpt-5.1-codex
Model family——
DescriptionLegacy Claude model for reasoning, coding, and agent workflows.GPT model optimized for agentic coding in the Responses API.
Context window200,000400,000
Maximum input—400,000
Maximum output32,000128,000
Input modalitiestext, image, pdftext, image
Output modalitiestexttext
ReasoningYesYes
Tool callingYesYes
Structured output—Yes
Open weightsNoNo
Release date2025-08-05—
Knowledge cutoff—2024-09-30
API lifecycleRetired · 2026-08-05Retired · 2026-07-23
Provider replacementclaude-opus-4-8gpt-5.6-sol
Sources
Cost calculatorEstimate Claude Opus 4.1 costEstimate 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

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.