How-to · Provider costs

Anthropic vs OpenAI Billing Compared

By Ghiles Asmani, founder of Weckr

You run both. Claude handles one feature, GPT handles another, and at the end of the month you get two bills that do not speak the same language. The rates differ, the usage fields differ, and the caching rules differ enough that a napkin comparison quietly lies to you.

This is the founder to founder breakdown of how Anthropic and OpenAI actually bill, where they diverge, and which one wins for which kind of traffic. Same underlying idea on both sides, tokens times a price, but the details are where your margin leaks.

Both bill per token, and that is where the agreement ends

Anthropic and OpenAI charge the same way at the top level. You pay for tokens, input and output are priced separately, and output almost always costs several times more than input. If you want the Anthropic side on its own, how Anthropic billing works covers the meters in detail. Beyond that shared skeleton the two pricing models pull apart on rates, on cache mechanics, and on the exact field names in the response.

The separation of input and output matters more than founders expect. A summarization feature that reads a long document and writes two sentences is input heavy. A chatbot that writes long replies is output heavy, and on the output side the price gap between the cheap tier and the flagship tier is enormous. Know which side of the ledger your feature lives on before you compare providers.

Model price comparison, per million tokens

Here are the current published rates paired by tier so you can read them across. Verify each number on the provider pricing pages before you rely on it, because both companies reprice over time.

Tier         OpenAI                        Anthropic
             model        in / out         model              in / out
-----------------------------------------------------------------------------
Cheap        gpt-4o-mini  0.15 / 0.60      Claude Haiku 4.5   1 / 5
Workhorse    gpt-4.1      2 / 8            Claude Sonnet 4.6  3 / 15
Flagship     gpt-5.5      5 / 30           Claude Opus 4.8    5 / 25

All figures in USD per 1,000,000 tokens. Current as of July 2026.
Confirm on the OpenAI and Anthropic pricing pages before relying on any number.

Read the table by column, not by row. At the cheap tier OpenAI is dramatically lower, gpt-4o-mini at 0.15 input versus Haiku at 1. At the flagship tier the lines cross: input matches at 5, but Opus undercuts gpt-5.5 on output, 25 versus 30. The workhorse tier splits the difference, with gpt-4.1 cheaper than Sonnet on both sides.

So there is no single cheaper provider. If most of your calls are short and cheap, OpenAI wins at the bottom. If you live at the flagship tier and generate a lot of output, Opus is the cheaper flagship. For the wider field see DeepSeek vs OpenAI vs Gemini cost.

Usage reporting: the field names do not match

Both providers hand you token counts on every response, but the keys are different. If you sum them without mapping, you will silently miscount. Here is what OpenAI returns:

// OpenAI chat completion response
const res = await openai.chat.completions.create({ model: 'gpt-4.1', messages })

console.log(res.usage)
// {
//   prompt_tokens: 812,
//   completion_tokens: 143,
//   total_tokens: 955,
//   prompt_tokens_details: { cached_tokens: 512 }
// }

And here is the same information from Anthropic, under different names:

// Anthropic messages response
const message = await anthropic.messages.create({ model: 'claude-sonnet-4-6', max_tokens: 1024, messages })

console.log(message.usage)
// {
//   input_tokens: 812,
//   output_tokens: 143,
//   cache_read_input_tokens: 512,
//   cache_creation_input_tokens: 0
// }

Map them one to one before you do math. OpenAI prompt_tokens is Anthropic input_tokens. OpenAI completion_tokens is Anthropic output_tokens. OpenAI reports cached reads inside prompt_tokens_details.cached_tokens, while Anthropic splits reads and writes into cache_read_input_tokens and cache_creation_input_tokens. Note that OpenAI gives you total_tokens for free and Anthropic does not, so you add input and output yourself.

Dashboards and admin APIs: neither shows your users

Both providers give you org level and account level totals through a console and an admin or usage API. You can slice by model, by key, and by day on both. What you cannot get from either is cost per your end user.

The reason is structural, not a missing feature. Every request from your backend arrives under one API key, so from the provider side it all looks like your app, one tenant. There is no field on the wire that says this spend belongs to a specific customer on a specific plan. That dimension only exists on your side, which is the same gap covered in Claude API cost per user and OpenAI cost per user.

Cache pricing: automatic versus explicit

Caching is where the two billing models feel the most different, and it is worth real money on repeated prompts. The shared idea is that a cache read is far cheaper than paying full input price again for the same tokens.

OpenAI: automatic, no write charge

OpenAI caches the static prefix of any prompt over 1024 tokens automatically. You change nothing in your code, and on the older models there is no separate charge to write the cache. A cache hit shows up as cached_tokens and is billed at roughly a 90 percent discount, about 0.1x the input rate. It is the closest thing to free money in LLM billing.

Anthropic: explicit breakpoints, a write premium

Anthropic makes you opt in. You place cache_control breakpoints on the blocks you want cached, such as a long shared system prompt. The first write costs a premium of about 1.25x the input rate, then every later read is discounted to roughly 0.1x input, the same 90 percent as OpenAI. So Anthropic caching costs a little up front and pays back only if the same prefix is reused enough times.

The practical rule: a long system prompt reused across many calls is a clear win on both. On OpenAI you get it for free, on Anthropic you pay a small write tax first. If a prefix is used once and thrown away, Anthropic caching can cost you more than it saves, while OpenAI caching never hurts.

Batch API: both cut the rate in half

Here the two providers agree. Both OpenAI and Anthropic offer about 50 percent off standard token rates for batch work you submit asynchronously and collect later, typically within a day. If a job does not need a real time answer, nightly report generation, backfills, bulk classification, batching it is the cheapest single lever on either platform.

Which is cheaper for which workload

Stop asking which provider is cheaper and ask which is cheaper for this feature. Three patterns cover most of it.

Long shared system prompts, such as a big instruction block or a fixed knowledge base repeated on every call, favor whichever caching model fits your flow. If you want zero code and no write tax, OpenAI automatic caching wins. If you already structure prompts around explicit breakpoints and reuse them heavily, Anthropic caching lands in the same place after the first write.

Short cheap chats, high volume and low tokens per call, favor the cheapest model tier outright, and that is gpt-4o-mini at 0.15 input. The absolute rate dominates when every call is tiny, so the bottom of the OpenAI lineup is hard to beat here. If GPT is your heavier side, here is how to reduce your OpenAI costs.

Output heavy work, where the model writes far more than it reads, is dominated by the output rate. Compare 30 for gpt-5.5 against 25 for Opus 4.8 and 8 for gpt-4.1 against 15 for Sonnet 4.6. Whichever model you pick, the output column is the number that sets your bill, so weight your comparison there.

See both in one place with Weckr

Neither dashboard shows cost per user, and the two usage objects use different field names, so a fair comparison across providers is something you build yourself. Weckr does that layer for you.

Weckr wraps your OpenAI, Anthropic, and Gemini clients in two lines and normalizes the token counts, mapping prompt to input and completion to output, so cost per user lines up across all three in one dashboard. Cost is recomputed server side from current pricing, so your numbers do not drift from the real bill when a provider reprices. Explore it on seeded data with no signup at the live demo, and see the two line wrap in the Weckr docs.

FAQ

Is Claude or GPT cheaper?

It depends on the workload, not the brand. At the cheap tier OpenAI gpt-4o-mini is far cheaper than Claude Haiku 4.5 on paper (0.15 vs 1 per million input). At the flagship tier the two lines cross: gpt-5.5 and Claude Opus 4.8 share the same 5 per million input, but Opus is cheaper on output at 25 vs 30. Output volume usually decides the real bill, so price the model on the traffic mix you actually run.

What is the difference between Anthropic and OpenAI usage fields?

The numbers mean the same thing, the keys differ. OpenAI returns prompt_tokens, completion_tokens, total_tokens, and prompt_tokens_details.cached_tokens. Anthropic returns input_tokens, output_tokens, cache_read_input_tokens, and cache_creation_input_tokens. Map OpenAI prompt to Anthropic input and OpenAI completion to Anthropic output before you add them together.

How does caching pricing differ between the two providers?

OpenAI caches prompts over 1024 tokens automatically with no code change and no separate write charge on the older models. Anthropic requires you to place explicit cache_control breakpoints and charges a write premium of about 1.25x input the first time. Both then discount cache reads by roughly 90 percent, about 0.1x input on the newer models. So OpenAI caching is free to turn on, and Anthropic caching costs a little up front but pays back on repeated reads.

Does either provider offer a batch discount?

Yes. Both OpenAI and Anthropic offer about 50 percent off standard token rates for batch or non realtime work that you submit asynchronously and collect later. If a job does not need an instant answer, batching it is the single cheapest lever on both platforms.

How do I see cost per user across Anthropic and OpenAI together?

Neither dashboard knows about your end users, and the two usage objects use different field names, so you normalize both yourself and aggregate by user id. Doing it by hand means two pricing tables and two token accounting rules. Weckr wraps OpenAI, Anthropic, and Gemini and normalizes token counts, so cost per user lines up across all three in one dashboard.

Keep reading

Compare the bill you actually get, not the brand

Anthropic and OpenAI bill on the same tokens times price skeleton, but the rates cross by tier, the usage fields differ, and the caching rules reward different habits. Pick the provider per feature on the traffic you really run, and normalize both so you can compare them honestly. This is one step in the complete guide to AI cost and margin management. See your real per user cost across providers at the live demo.

See the dashboard with real data, no signup needed.

Try the demo →