Claude API vs OpenAI API Pricing: When Each One Costs Less
As of September 26, 2026, GPT-6 Sol matches Sonnet 5 and Astra matches Fable 5.1 on list price. Prompts over 272K favor Claude; Luna costs a tenth of Haiku 4.5.
On this page

For short prompts without caching, the Claude API and the OpenAI API now charge exactly the same at two of their tiers. As of September 26, 2026, GPT-6 Sol and Claude Sonnet 5 both list $2 input and $10 output per million tokens, and GPT-6 Astra and Claude Fable 5.1 both list $10 and $50. Which one bills you less depends on four conditions:
- Prompts over 272K input tokens: OpenAI reprices the whole request at 2x input and 1.5x output, while Claude keeps standard rates up to its 1M window. One 300K-token request costs $1.50 on Sol and $0.80 on Sonnet 5.
- Repeated context at the top tier: a Fable 5.1 cache hit costs $0.25 per million tokens, against $1.00 on Astra.
- The budget tier: GPT-6 Luna costs one tenth of Claude Haiku 4.5 on every price line, and Haiku 4.5 stops at a 200K context window.
- Opus 5.5: it has no OpenAI counterpart. At $4 input and $20 output, it costs twice as much as Sol and 40% of Astra.
All prices here are first-party Standard rates in USD per 1M tokens from OpenAI's API pricing page and Anthropic's Claude pricing page. The pairings are budget positions, not claims that two models perform alike.
The comparable tiers and their current rates
| Budget position | OpenAI model: input / cached input / output | Claude model: input / cache hit / output | What differs |
|---|---|---|---|
| Low cost | gpt-6-luna: $0.10 / $0.01 / $0.50 | Haiku 4.5: $1 / $0.10 / $5 | Luna is 10x cheaper on every line; Haiku 4.5 has a 200K window |
| Everyday work | gpt-6-sol: $2 / $0.20 / $10 | Sonnet 5: $2 / $0.20 / $10 | Identical until a prompt passes 272K input tokens |
| Between the two | No OpenAI counterpart | Opus 5.5: $4 / $0.20 / $20 | 2x Sol on input and output, same cache-hit price as Sol |
| Top tier | gpt-6-astra: $10 / $1 / $50 | Fable 5.1: $10 / $0.25 / $50 | Fable 5.1 cache hits cost a quarter of Astra's |
The table shows short-context Standard rates. Cache writes, prompts above 272K, Batch, and Fast mode each follow different rules on the two platforms, and those rules are where the bills separate.

Price parity does not tell you which model finishes your task in fewer attempts. For the model-level trade-off, see Claude Opus 5.5 vs GPT-6 Sol: When the 2x Price Premium Pays Off and GPT-6 Sol vs Terra vs Luna vs Astra: Which Model Should You Use?.
The billing rules behind the headline prices
| Rule | OpenAI API (GPT-6) | Claude API (Sonnet 5, Opus 5.5, Fable 5.1) |
|---|---|---|
| Long prompts | More than 272K input tokens: the full request is billed at 2x input and cache rates and 1.5x output | Standard rates across the full 1M-token window |
| Context window / max output | 1,050,000 / 128,000 tokens | 1M / 128K tokens (Haiku 4.5: 200K / 64K) |
| Cache hit | 10% of the input rate | 10% on Sonnet 5 and Haiku 4.5; 5% on Opus 5.5; 2.5% on Fable 5.1 |
| Cache write | 1.25x input for the default 30-minute cache, 2.5x for a 12-hour cache (Responses API only, since October 20, 2026) | 1.25x input for a 5-minute cache, 2x for a 1-hour cache |
| Batch | 50% off Standard | 50% off input and output |
| Flex | 50% off Standard, same as Batch | No Flex tier |
| Fast mode | 2x Standard on all three GPT-6 models | Opus 5.5 only among these models: $8 / $40, research preview, Claude API only, not with Batch |
| Data residency | Regional processing endpoints add 10% for eligible models released on or after March 5, 2026 | US-only inference (inference_geo: "us") multiplies every token category by 1.1 on Claude 4.6 and later |
The GPT-6 figures come from the pricing page and the GPT-6 Sol model page; context windows for Claude come from Anthropic's models overview.
Which API costs less, condition by condition
Prompts above 272K input tokens: Claude
OpenAI's rule applies to the whole request, not only to the tokens past the threshold. Above 272K input tokens, Sol moves to $4 input and $15 output, and Astra to $20 and $75. Sonnet 5 stays at $2 and $10, and Fable 5.1 at $10 and $50.
For one request with 300K input tokens and 20K output tokens:
- Sol: 0.3 × $4 + 0.02 × $15 = $1.50
- Sonnet 5: 0.3 × $2 + 0.02 × $10 = $0.80
- Astra: 0.3 × $20 + 0.02 × $75 = $7.50
- Fable 5.1: 0.3 × $10 + 0.02 × $50 = $4.00
- Opus 5.5: 0.3 × $4 + 0.02 × $20 = $1.60
Opus 5.5 nearly catches up with Sol here. Above 272K, it costs only 10 cents more for the same request, although it lists at twice Sol's short-context price.
The threshold also cuts the other way. The same request with 270K input tokens costs $0.74 on both Sol and Sonnet 5. On Sol, the extra 30K tokens double the bill. If retrieval or compaction can keep your prompts under 272K, Sol returns to parity with Sonnet 5.

Luna's long-context rates, $0.20 input and $0.75 output, still undercut every Claude model: the 300K request costs $0.075. Haiku 4.5 cannot take that request at all.
Repeated context at the top tier: Fable 5.1
Agents, chat with long histories, and RAG pipelines resend the same prefix on every call, so cache-hit pricing does much of the work. At the everyday tier nothing changes: Sol and Sonnet 5 both charge $0.20 for a cache hit and $2.50 for a cache write. At the top tier, Fable 5.1 charges $0.25 for a hit and Astra $1.00. Both charge $12.50 per million tokens for a short cache write (Astra's 30-minute, Fable 5.1's 5-minute).
Opus 5.5 also charges $0.20 for a cache hit, the same as Sol. When most of the input is cached, the Opus premium shrinks to its uncached input and its output.
Claude offers a 1-hour cache at 2x the input rate, such as $4 on Sonnet 5 or $20 on Fable 5.1. OpenAI did not list a longer option until October 20, 2026, when it added a 12-hour cache in the Responses API at 2.5x the input rate: $0.25 on Luna, $5 on Sol, and $25 on Astra. Claude's 1-hour cache pays off when reuse is spread over more than 5 minutes. Per Anthropic's pricing page, a 5-minute write repays itself after one cache read, and a 1-hour write after two. For the full billing mechanics, see OpenAI vs Claude Cache Pricing: How Cached Tokens, Cache Writes, and Cache Reads Are Billed.
The budget tier: OpenAI
Luna lists $0.10 input and $0.50 output, against $1 and $5 for Haiku 4.5, a 10x gap on input, cached input, cache writes, and output. Haiku 4.5 is also limited to 200K tokens of context and 64K of output, and it does not support Claude's inference_geo setting. If a small model passes your quality bar, OpenAI's budget tier is the cheaper place to start, by a wide margin.
Batch, Flex, and Fast mode
Batch cuts both platforms by half, so the pair ratios stay the same: Sol and Sonnet 5 drop to $1 and $5, and Astra and Fable 5.1 to $5 and $25. OpenAI adds Flex at the same half price. Claude has no equivalent tier, so for work that cannot go through a batch job, Flex is a discount only OpenAI offers.
Fast mode doubles every GPT-6 rate. Sol in Fast mode costs $4 and $20, the same as Opus 5.5 at standard speed. On Claude, Fast mode covers only the Opus family among current models, with Opus 5.5 at $8 and $40.
Data residency
The two surcharges are close: 10% on OpenAI's regional processing endpoints and a 1.1x multiplier for Claude's US-only inference. One detail matters more than the percentage. For GPT-6 Sol and Luna, OpenAI offers EU data residency only with Standard processing, so a residency-bound workload cannot also use the Batch or Flex discount there.
Worked cost examples
Every example uses the same formula, with token counts in millions:
cost = uncached_input × input_rate
+ cache_hit_tokens × cache_hit_rate
+ cache_write_tokens × cache_write_rate
+ output × output_rateThe examples assume identical token counts on both platforms. Real counts differ between vendors, which the next section covers.
One agent turn with a warm cache
10K uncached input, 90K cache-hit input, and 5K output, with the cache already written:
| Model | Cost per turn | Per 1,000 turns |
|---|---|---|
| GPT-6 Luna | $0.0044 | $4.40 |
| Claude Haiku 4.5 | $0.044 | $44 |
| GPT-6 Sol | $0.088 | $88 |
| Claude Sonnet 5 | $0.088 | $88 |
| Claude Opus 5.5 | $0.158 | $158 |
| Claude Fable 5.1 | $0.3725 | $372.50 |
| GPT-6 Astra | $0.44 | $440 |
Fable 5.1 comes out lower than Astra only because of the cache-hit price. Writing the 90K cache the first time adds a one-time cost: $0.225 on Sol or Sonnet 5 with a 5-minute cache, $0.36 on Sonnet 5 with a 1-hour cache, and $1.125 on Astra or Fable 5.1.
A month of traffic
Take 100M input tokens and 20M output tokens per month, first with no caching and then with 80M of the input served from cache (cache writes excluded):
| Model | No cache | 80% cache hits | No cache, Batch |
|---|---|---|---|
| GPT-6 Luna | $20 | $12.80 | $10 |
| Claude Haiku 4.5 | $200 | $128 | $100 |
| GPT-6 Sol | $400 | $256 | $200 |
| Claude Sonnet 5 | $400 | $256 | $200 |
| Claude Opus 5.5 | $800 | $496 | $400 |
| GPT-6 Astra | $2,000 | $1,280 | $1,000 |
| Claude Fable 5.1 | $2,000 | $1,220 | $1,000 |
For Sol with 80% cache hits: 20 × $2 + 80 × $0.20 + 20 × $10 = $256. For Fable 5.1: 20 × $10 + 80 × $0.25 + 20 × $50 = $1,220.
Even with heavy caching, Fable 5.1 saves only $60 a month over Astra here, under 5%, because $1,000 of either bill is output. The cache-hit gap matters most when input dwarfs output, as in long-running agents that reread a large codebase to write a few lines.
Estimating the cost of your own workload
This short Python function applies the rules above to one request. Swap in your own token counts from each API's usage fields:
# USD per 1M tokens, Standard tier, as of September 26, 2026
# (input, cache_hit, cache_write_5min, output)
PRICES = {
"gpt-6-luna": (0.10, 0.01, 0.125, 0.50),
"claude-haiku-4-5": (1.00, 0.10, 1.25, 5.00),
"gpt-6-sol": (2.00, 0.20, 2.50, 10.00),
"claude-sonnet-5": (2.00, 0.20, 2.50, 10.00),
"claude-opus-5-5": (4.00, 0.20, 5.00, 20.00),
"gpt-6-astra": (10.00, 1.00, 12.50, 50.00),
"claude-fable-5-1": (10.00, 0.25, 12.50, 50.00),
}
def cost(model, uncached=0, cache_hit=0, cache_write=0, output=0):
rate_in, rate_hit, rate_write, rate_out = PRICES[model]
prompt = uncached + cache_hit + cache_write
if model.startswith("gpt-6") and prompt > 272_000:
# OpenAI reprices the whole request above 272K input tokens
rate_in, rate_hit, rate_write = rate_in * 2, rate_hit * 2, rate_write * 2
rate_out = rate_out * 1.5
if model == "claude-haiku-4-5" and prompt + output > 200_000:
raise ValueError("Haiku 4.5 has a 200K context window")
return (uncached * rate_in + cache_hit * rate_hit
+ cache_write * rate_write + output * rate_out) / 1_000_000
print(cost("gpt-6-sol", 300_000, output=20_000)) # 1.5
print(cost("claude-sonnet-5", 300_000, output=20_000)) # 0.8Four adjustments turn this list-price estimate into a budget:
- Count tokens with each vendor's own tokenizer. Anthropic says Claude 4.7 and later models produce roughly 30% more tokens for the same text than its previous tokenizer. Sonnet 5, Opus 5.5, and Fable 5.1 use the newer one, while Haiku 4.5 uses the older one. No published ratio against OpenAI's tokenizer exists, so run a sample of your real prompts through both APIs and read the billed usage.
- Add retries and output length. A model that needs a second attempt or writes twice as much output erases any list-price gap between matched pairs.
- Add tool charges. Server-side tools such as web search are billed per use on both platforms, on top of tokens.
- Apply multipliers last. Batch or Flex halve the result, Fast mode doubles it, and data residency adds 10% on OpenAI or 1.1x on Claude.
Rerun the estimate on the day you deploy. Both lineups changed in September 2026, and GPT-5.6 Sol's promotional price has an end date.
Moving from GPT-5.6 or Opus 5
OpenAI still lists the GPT-5.6 models. GPT-5.6 Sol costs $4 input and $20 output, twice GPT-6 Sol, and OpenAI states that its promotional pricing runs at least through November 21, 2026. GPT-5.6 Terra costs $2 and $12, the same input as Sonnet 5 and GPT-6 Sol but with $2 more on output. GPT-5.6 Luna costs $0.20 and $1.20, twice GPT-6 Luna.
On the Claude side, Opus 5.5 lists 20% below Opus 5 ($5 input, $25 output). If you are still budgeting against Opus 5 or GPT-5.6 Sol, both replacements cut the list price on their own. If you already run an Opus model, Claude Fable 5.1 vs Opus 5.5: Which Should You Use? covers the upgrade decision.
FAQ
Is the Claude API or the OpenAI API cheaper?
At the budget tier, OpenAI is cheaper: GPT-6 Luna costs one tenth of Claude Haiku 4.5. At the everyday tier (GPT-6 Sol vs Claude Sonnet 5) and the top tier (GPT-6 Astra vs Claude Fable 5.1), short-context list prices are identical. Claude costs less once a prompt exceeds 272K input tokens, and Fable 5.1 costs less than Astra on cached input.
How much does the OpenAI API cost per request?
It depends on tokens and model. With 10K fresh input, 90K cached input, and 5K output, one request costs about $0.0044 on GPT-6 Luna, $0.088 on GPT-6 Sol, and $0.44 on GPT-6 Astra. A 300K-token prompt with 20K output costs $1.50 on Sol, because the long-context rates apply to the whole request.
Is it cheaper to use the OpenAI API or a ChatGPT subscription?
They are billed separately. ChatGPT and Claude plans charge a monthly fee with usage limits, while the APIs charge per token. For the Claude side of that choice, Claude Code Heavy Users: API vs Subscription, Keep or Downgrade? works through when API billing beats a plan.
Which API is better, OpenAI or Anthropic?
Price alone cannot answer that when the matched tiers cost the same. Run the same set of real tasks on both models of a pair and compare cost per accepted result, including retries. The GPT-6 models offer a 1,050,000-token window, while Claude offers standard pricing across its 1M window and a 1-hour cache option, against OpenAI's 12-hour cache at a higher 2.5x write rate.
Do API gateways or relay services change these numbers?
Yes. Resellers set their own prices, and those prices can move independently of OpenAI and Anthropic. Treat a gateway as a separate contract with its own reliability and data terms. Cheapest LLM API Provider: Compare Price, Quality, Latency, and Gateway Risk in 2026 covers that decision, and AI API Price Comparison: Cheapest Model by Input and Output Mix compares first-party prices across five vendors.
Sources4
External pages this guide links to, in the order they appear. Last updated Oct 26, 2026.
Sources4
External pages this guide links to, in the order they appear. Last updated Oct 26, 2026.
- 1.OpenAI's API pricing pagedevelopers.openai.com/api/docs/pricing
- 2.Anthropic's Claude pricing pageplatform.claude.com/docs/en/about-claude/pricing
- 3.GPT-6 Sol model pagedevelopers.openai.com/api/docs/models/gpt-6-sol
- 4.Anthropic's models overviewplatform.claude.com/docs/en/about-claude/models/overview





