Skip to content
TopInsight .co
Two abstract pricing graph visualisations side by side — warm amber (Anthropic) and cool teal (OpenAI) — in dark void editorial.

Anthropic vs OpenAI API pricing: the actual math at typical coding workloads

Both API providers iterated pricing through 2025 and Claude Code added weekly limits. The honest "which is cheaper" answer depends entirely on workload shape. Here is the working math.

C Charles Lin ·

API pricing comparisons usually publish the per-million-token rates and call it analysis. Real pricing depends on what you are doing — and on which models you are routing to. After modelling actual spend across multiple workloads on both providers, and reading every “I just hit my Claude weekly limit” thread in September 2025, here is the working pricing math.

The two YouTube videos that frame the question

Leonardo Grigorio’s “Which is Cheaper? Claude Pro vs. API” (7 min, 92K views, July 2025) is the single best video on the subscription-versus-metered question. He walks through the break-even point: if you are sending more than roughly 30M tokens a month at Sonnet rates, the API is cheaper than Claude Pro; below that, the subscription wins. The math is workload-specific but the framework is right.

Bill Prin’s “The Hidden Cost of Claude Code: Cost Optimization and Token Usage Monitoring” (8 min, 9K views, September 2025) is the engineering-side companion. He shows the per-session cost monitoring tools, explains where Claude Code burns tokens you did not expect (large file reads, repeated tool calls, agent loops that re-summarise the same context), and demonstrates how a “$2 prompt” can quietly become a “$15 prompt” inside an agent.

Together those two videos cover the question most engineers actually have: not “what is the per-million rate” but “how do I keep my monthly bill under what I budgeted”.

The headline rates in mid-2025

Anthropic Claude:

ModelInput $/MOutput $/MContext
Claude 3.7 Sonnet$3.00$15.00200K
Claude 3.5 Haiku$0.80$4.00200K
Claude 3 Opus (legacy)$15.00$75.00200K

OpenAI:

ModelInput $/MOutput $/MContext
GPT-4o$2.50$10.00128K
GPT-4o-mini$0.15$0.60128K
GPT-4.1 (newer)variesvaries1M
o1 (reasoning)$15.00$60.00200K
o1-mini$3.00$12.00128K

The raw rates favour OpenAI on the cheap tier (GPT-4o-mini at $0.15/$0.60 is cheaper than Claude Haiku) and Anthropic on the premium tier (Sonnet at $3/$15 is cheaper than GPT-4o for the typical input-light, output-heavy coding workload).

The dirty secret: token ratios matter more than rates

For typical coding workloads, the input:output ratio is roughly 3:1 — you send a lot of context (existing code, prompts, examples) and the model writes less code back. The headline output rate dominates total cost.

Worked example: 1M tokens in, 300K out:

  • Claude 3.7 Sonnet: 1M × $3 + 0.3M × $15 = $7.50
  • GPT-4o: 1M × $2.50 + 0.3M × $10 = $5.50
  • Claude Haiku: 1M × $0.80 + 0.3M × $4 = $2.00
  • GPT-4o-mini: 1M × $0.15 + 0.3M × $0.60 = $0.33

GPT-4o is cheaper than Sonnet here. GPT-4o-mini is dramatically cheaper than Haiku.

But — and this matters — the cheaper-tier models produce more tokens and lower-quality output. The cost-per-completed-task is not the same as cost-per-token.

Where Anthropic actually wins on cost

Task completion rate on hard tasks. Claude 3.7 Sonnet finishes complex multi-file refactors more often than GPT-4o in my testing. A “$5 task that needs 2 retries on GPT-4o” can be a “$7 task that completes first try on Claude.” The retry math flips the headline rate.

Prompt caching. Anthropic ships prompt caching that reduces input cost by roughly 90% for repeated context. For workflows that re-send the same system prompt + tool definitions repeatedly (every coding session), this matters a lot. OpenAI has equivalent now but the discount math is similar.

Output predictability. Claude tends to be more concise than GPT-4o for coding output. Lower output token count means lower total cost.

Where OpenAI actually wins on cost

Bulk and volume workloads. GPT-4o-mini at $0.15/$0.60 is cheaper than anything Anthropic offers. For automation, content processing, batch work — OpenAI wins.

Reasoning-heavy tasks at scale. The o-series pricing is similar to Anthropic’s Sonnet but reasoning models often complete tasks Sonnet would need multiple iterations on.

Longer context for cheap. GPT-4.1 has 1M context at competitive pricing. Anthropic’s 200K is workable but smaller.

The September 2025 Claude weekly limits change everything

In late July 2025, Anthropic announced weekly rate limits on Claude Pro and Max subscriptions. Eamonn Cottrell’s “Claude Weekly Limits Explained” (6 min, 57K views, July 28 2025) walks through the announcement and what it actually means for the typical Pro user — and it is the calmest take in a very loud week.

The Reddit reaction was less calm. “Open Letter to Anthropic” (1114 ups, July 21 2025) is the single biggest post on the topic. The author lays out, with receipts, how the new caps interact with Claude Code’s tendency to consume context on agent loops, and argues the effective price increase is significantly larger than the headline implies. The thread is long and the engineering pushback is detailed.

“Claude weekly limits announcement” (879 ups, October 1 2025) is the second wave — the same conversation a quarter later, with users who initially shrugged off the July changes now hitting walls. The pattern in both threads is consistent: heavy Claude Code users are the ones flipping to API metered billing, accepting higher bills in exchange for predictability.

This matters for the comparison because the subscription path on Anthropic now has a real ceiling. If you are using Claude Code heavily through Pro or Max, you may hit the cap by Wednesday and be back on the API for the rest of the week. At which point the per-million math actually becomes the math you live with.

The community signal across forums

“Value of $200/month AI users” (358 ups) reflects the heavy-user reality across both providers: serious coding users are spending $100 to $300 per month total across both providers plus subscription tiers. The cost question is not “which is cheaper per token” — it is “which combination delivers the value at the right total cost.”

A parallel “Anthropic is lagging on cheap fast models” thread (118 ups) captures the real Anthropic weakness — Haiku is competitive but not cheap-tier-dominant. OpenAI’s mini tier is the best in class for bulk work.

The “PSA for anyone using Cursor — wasting most of your AI requests” thread (148 ups) is the canonical “you are paying for tokens you do not need” piece, pointing out that wrapping AI in IDE tools often burns tokens on things that do not need premium models.

Creator POV vs Reddit dissent

The YouTube voices (Grigorio, Cottrell, Prin) are measured. They walk through the numbers, show the tooling, and frame the choice as a tractable optimization problem: pick your routing, monitor your spend, adjust monthly.

Reddit is angrier and the anger is specifically Anthropic-directed in late 2025. The framing on r/ClaudeAI is “we paid for Pro/Max expecting predictable access and the cap moved on us”. The framing on r/OpenAI is “GPT-5 with Codex CLI is the cheaper-equivalent-quality path that people fleeing Claude Code are landing on”.

The disagreement is partly tone, partly substance. The substance: subscription-tier predictability has become more important than headline rate for the heavy-user segment. That is a different question than “which API is cheaper per token” — and it is the question the next generation of pricing pages will have to answer better.

The working multi-provider pattern

What heavy users actually do in mid-to-late 2025:

  1. Claude 3.7 Sonnet via Anthropic API for default coding work (with Pro/Max as a cheaper-up-to-the-cap backstop)
  2. GPT-4o-mini via OpenAI API for bulk and cheap routing (the cheapest credible “good enough” model)
  3. DeepSeek V3 via DeepSeek API for cost-conscious bulk where China-hosting is acceptable
  4. OpenAI o-series for hard reasoning when speed is not the goal
  5. Gemini 2.5 Pro for long-context analysis

Total monthly spend for a heavy user: $50 to $200 per month across providers. The pattern wins because each model handles what it is best at — no single-provider strategy lands as well, especially with Anthropic’s weekly cap forcing a fallback path anyway.

The pricing tier comparison

Picking by your specific workload

Pros

  • Default coding driver → Claude 3.7 Sonnet (best quality-per-dollar at the premium tier)
  • Bulk / automation → GPT-4o-mini (cheapest credible quality)
  • Hard reasoning → OpenAI o3-mini (cheaper o-series option)
  • Long context → Gemini 2.5 Pro (2M context cheap)
  • Cost-optimised bulk → DeepSeek V3 (cheapest, China-hosted)
  • Prompt-caching workflows → Anthropic (mature caching at the premium tier)

Cons

  • Do not single-provider lock-in if you can avoid it — multi-model routing is the optimal pattern
  • Do not over-route at low volume — switching providers has overhead
  • Do not use o-series for routine work — slow and expensive for simple tasks
  • Do not use Haiku for cheap-bulk — GPT-4o-mini is cheaper at similar quality for that tier
  • Do not use Sonnet for bulk — overpriced for routine work
  • Do not ignore prompt caching — for tooling that resends context, it is a 5-10× cost reduction

How to actually optimise

For an engineer running $50 to $100 per month on AI APIs:

  1. Audit your token usage — most providers offer breakdowns. Find the workload chunks that dominate cost.
  2. Route those to cheaper models — bulk to GPT-4o-mini, reasoning to o3-mini, default to Sonnet
  3. Enable prompt caching where supported
  4. Use the subscription paths (Claude Pro, ChatGPT Pro) for personal use — often cheaper than equivalent API spend for individual users, if you can stay under the new weekly caps
  5. Watch your agent loops — the Bill Prin “Hidden Cost” video is required viewing if you are using Claude Code or any agent that calls tools in a loop

The 30% savings is achievable with two hours of routing setup. Worth it.

For the broader model landscape, see our Claude vs GPT vs Gemini comparison. For the cheap-tier deep dive, DeepSeek V3 review.

Sources

Every reference behind this piece. If we make a claim, it's because at least one of these said so — or we lived it ourselves.

  1. Firsthand Modelled API spend across multiple workloads on both providers
  2. Docs Anthropic API pricing — Anthropic
  3. Docs OpenAI API pricing — OpenAI
  4. YouTube Which is Cheaper? Claude Pro vs. API — Leonardo Grigorio
  5. YouTube Claude Weekly Limits Explained: What Pro Users Need to Know — Eamonn Cottrell
  6. YouTube The Hidden Cost of Claude Code: Cost Optimization and Token Usage Monitoring — Bill Prin
  7. Blog r/ClaudeAI — Open Letter to Anthropic (1114 ups) — r/ClaudeAI
  8. Blog r/ClaudeAI — Claude weekly limits announcement (879 ups) — r/ClaudeAI
  9. Blog r/ChatGPTCoding — value of $200/month AI users (358 ups) — r/ChatGPTCoding