Head-to-Head Pricing (March 2026)
Quick Answer
- Per-token: OpenAI is cheaper at every tier. GPT-5.2 costs $1.75/$14 vs Opus 4.6 at $5/$25.
- Per-task: Depends on the workload. Claude completes some coding tasks in fewer tokens, narrowing the cost gap.
- Optimization: Claude's prompt caching (90% off cache hits) is deeper than OpenAI's cached input discount (~50% off). Both offer batch processing.
Flagship Models
| Model | Input/MTok | Output/MTok | Context Window | Best For |
|---|---|---|---|---|
| Claude Opus 4.6 | $5.00 | $25.00 | 200K (1M beta) | Deep reasoning, multi-file code |
| GPT-5.4 | $2.50 | $15.00 | 272K+ | Newest OpenAI flagship |
| GPT-5.2 | $1.75 | $14.00 | 128K | Fast reasoning, agentic tasks |
| o3 | $2.00 | $8.00 | 200K | Complex reasoning (hidden tokens) |
| o3-pro | $20.00 | $80.00 | 200K | Maximum reasoning depth |
Hidden Reasoning Tokens
OpenAI's o3 and o3-pro use "reasoning tokens" for internal thinking steps, billed as output tokens but not visible in the API response. A 500-token visible response may consume 2,000+ total output tokens. This makes the effective per-task cost of o3 higher than its listed $2/$8 rate. Claude Opus 4.6 also uses hidden reasoning traces, but Anthropic bills only visible tokens.
On raw per-token pricing, GPT-5.2 is 2.9x cheaper on input and 1.8x cheaper on output than Opus 4.6. But o3's hidden reasoning tokens complicate the comparison. If o3 generates 4x more output tokens than visible, its effective output cost is $32 per million visible tokens, which is more expensive than Opus 4.6's $25.
Mid-Tier Models
| Model | Input/MTok | Output/MTok | Notes |
|---|---|---|---|
| Claude Sonnet 4.6 | $3.00 | $15.00 | Best price/performance for coding |
| GPT-5 | $1.25 | $10.00 | Previous flagship, still capable |
| GPT-5.1 | $1.25 | $10.00 | Same pricing as GPT-5 |
| GPT-5.4 | $2.50 | $10.00 | Widely used, multimodal |
| o4-mini | $1.10 | $4.40 | Budget reasoning model |
GPT-5 at $1.25/$10 undercuts Sonnet 4.6 at $3/$15 by 2.4x on input and 1.5x on output. The o4-mini at $1.10/$4.40 is the cheapest reasoning-capable model from either provider, but it trades reasoning depth for speed. Sonnet 4.6 remains competitive for coding tasks where fewer iterations offset the higher per-token cost.
Budget Models
| Model | Input/MTok | Output/MTok | Notes |
|---|---|---|---|
| Claude Haiku 3 | $0.25 | $1.25 | Cheapest Claude model |
| Claude Haiku 4.5 | $1.00 | $5.00 | Better capability, 4x more expensive |
| GPT-5.4-mini | $0.15 | $0.60 | Cheapest OpenAI model |
| GPT-5-mini | $0.25 | $2.00 | Budget GPT-5 variant |
GPT-5.4-mini wins the budget tier at $0.15/$0.60. Claude Haiku 3 is close at $0.25/$1.25, with slightly higher output costs but stronger performance on classification benchmarks. For pure throughput at minimum cost, GPT-5.4-mini is the cheapest option available from either provider.
Discount Mechanisms Compared
| Feature | Claude (Anthropic) | ChatGPT (OpenAI) |
|---|---|---|
| Batch processing | 50% off all models | ~50% off (varies by model) |
| Input caching | 90% off cache hits (0.1x) | ~50% off cached input |
| Cache write cost | 1.25x (5min) or 2x (1hr) | Standard (no write premium) |
| Long context premium | 2x input, 1.5x output >200K | Varies by model (GPT-5.4: 2x >272K) |
| Discount stacking | All discounts stack multiplicatively | Batch + caching stack |
Claude's caching discount is steeper: 90% off vs ~50% off. But Claude charges 1.25-2x for the initial cache write, while OpenAI does not charge a write premium. For applications that hit cache frequently (chatbots with long system prompts, document QA), Claude's 90% hit discount produces larger savings after the break-even point.
Real-World Cost Scenarios
| Scenario | Claude Cost | OpenAI Cost | Winner |
|---|---|---|---|
| Simple classification (Haiku 3 vs 5.4-mini) | ~$3.75 | ~$1.50 | OpenAI |
| Code generation, standard (Sonnet vs GPT-5) | ~$45 | ~$25 | OpenAI per-token |
| Complex refactoring (Opus vs GPT-5.2) | ~$125 | ~$70 | Depends on tokens used |
| Chatbot with cached system prompt (Sonnet) | ~$4.50 | ~$12.50 | Claude |
| Batch document processing (Haiku 3 batch) | ~$1.88 | ~$3.00 | Claude |
The scenarios where Claude wins involve repeated context (caching) and batch processing. The scenarios where OpenAI wins involve one-shot requests where per-token pricing dominates. Most production applications involve a mix of both patterns.
When Claude is Cheaper
Best when you have repeated context, batch workloads, or tasks that require fewer iterations.
- Heavy prompt caching: Claude's 90% cache hit discount (vs ~50% for OpenAI) saves more on repeated system prompts, RAG context, and long conversations.
- Batch processing with Haiku 3: At $0.125/$0.625 per MTok (batch), Haiku 3 is competitive with GPT-5.4-mini for bulk classification.
- Complex coding tasks: Opus 4.6 completes multi-file refactoring in fewer iterations than GPT-5.2, which can offset the 2.9x per-token premium.
- Long context with caching: If you send 500K token inputs repeatedly, Claude's cache hit pricing ($0.50/MTok on Opus) beats re-sending full context on OpenAI.
When OpenAI is Cheaper
Best for one-shot requests, budget-tier throughput, and workloads where per-token pricing dominates.
- One-shot API calls: Without caching, OpenAI's lower per-token rates win directly. GPT-5 at $1.25/$10 vs Sonnet at $3/$15.
- Budget classification: GPT-5.4-mini at $0.15/$0.60 is the cheapest per-token option from either provider.
- Reasoning with o3/o4-mini: o4-mini at $1.10/$4.40 is the cheapest reasoning-capable model available, though hidden reasoning tokens increase effective cost.
- High-volume simple tasks: For tasks where model capability doesn't matter much, OpenAI's lower base prices reduce total spend.
FAQ
Is Claude API cheaper than ChatGPT API?
Per-token, no. OpenAI is cheaper at every tier. Per-task, it depends. Claude's deeper caching discounts (90% vs ~50%) and Opus's ability to complete complex tasks in fewer iterations can make Claude cheaper for specific workloads. See full Claude pricing breakdown.
What is the cheapest option from either provider?
GPT-5.4-mini at $0.15/$0.60 per MTok. Claude Haiku 3 batch at $0.125/$0.625 is comparable. For cached input, Claude Haiku 3 batch with cache hits costs $0.0125 per MTok.
How do hidden reasoning tokens affect cost?
OpenAI's o3 and o3-pro use reasoning tokens billed as output but not shown in responses. A 500-visible-token response may use 2,000+ total output tokens. Claude Opus 4.6 also reasons internally but bills only visible tokens.
Which API is better for coding?
Both are strong. Claude Opus 4.6 leads SWE-bench Verified (80.8%). GPT-5.3-Codex leads Terminal-Bench 2.0 (77.3%). For multi-file reasoning, Claude often costs less per task despite higher per-token pricing. See Codex vs Opus comparison.
Do batch discounts stack with caching?
Yes, on both providers. Claude stacks batch (50% off) with prompt caching (90% off cache hits) multiplicatively. OpenAI stacks batch pricing with cached input discounts.
Can I use models from both providers?
Yes. Morph routes between Claude models automatically, selecting the optimal price-performance point per request. Many teams also maintain separate OpenAI integrations for specific use cases like o4-mini for lightweight reasoning.
Automatic model routing across Claude tiers
Morph selects between Opus, Sonnet, and Haiku based on task complexity. Pay Haiku prices for simple tasks and Opus prices only when the problem demands it.