erabot.ai
ProductPricingCase studiesEvalBlogDocs
Book a demo

How much does the Claude API cost? What we modeled across 15 real products

TL;DR: List prices are easy to find and nearly useless for forecasting, because your bill is set by how many tokens each call carries and how often it repeats, not by the price per million. We audited 15 open-source AI products, found 1,086 LLM call sites across them, and modeled their spend. The spread between the cheapest and most expensive was wide, and it did not track project size.

How much does the Claude API cost per token?

Input and output are billed separately, output costs several times more than input, and cached input is billed at a steep discount. That structure matters more than the specific numbers.

For current per-model figures across Anthropic, OpenAI, Google and others, we keep a reference table in LLM API pricing. We are not restating prices here because they move and a stale figure on this page would be worse than none.

Three structural facts are more durable than any price:

Output is the expensive side. On our last verified table (2026-07-21) Anthropic's mid-tier model billed output at five times its input rate. An uncapped max_tokens on a verbose model is one of the fastest ways to a surprising bill.

Cached input is roughly a tenth of fresh input. The same table priced cached reads at about 10% of the normal input rate. That is the single largest lever available to most codebases.

Cache writes cost a premium. Writing the cache costs more than not caching, around 1.25x input for the short time-to-live. So a cached prefix reused many times is a large win, and one written then immediately invalidated is a small loss. Compute the break-even reuse count rather than assuming caching is free.

Why does the Claude API cost so much?

Usually because of how much context each call carries, not the price per token.

The arithmetic that catches people is that cost scales with tokens per call multiplied by calls per month. Halving either halves the bill, and most teams only ever look at the price per million. A call that re-sends a 4,000-token system prompt on every request pays for that prompt on every request, forever, unless the prompt is marked cacheable and stays stable.

The structural causes we see most often:

  • A stable system prompt or policy document re-sent uncached on every call
  • Retrieval pulling far more context than the answer uses, often because top_k is high with no reranker
  • The same input reprocessed every run with no check for whether it changed
  • A loop issuing N single-item calls where one batched request would do
  • No max_tokens cap, so a verbose model bills for completion tokens nobody reads

What does a real bill look like?

Here is where we can show rather than assert. We ran erabot's audit over 15 open-source AI products, 32,672 source files in total. 435 of those files contained LLM calls, holding 1,086 call sites. The five highest by modeled monthly spend:

ProductLanguageLLM call sitesModeled $/month
Onyx (Danswer)Python36972.60
FlowiseTypeScript10764.81
Lobe ChatTypeScript15160.00
LibreChatTS/JS9722.50
MetaGPTPython347.03

Across all 15, modeled spend totalled $233.88 a month and the audit identified $53.27 of it as recoverable, about 23%.

Two things in that table are worth more than the numbers themselves.

Size does not predict spend. Lobe Chat has 9,607 source files and modeled $60 a month. MetaGPT has 514 files and modeled $7. Onyx, the most expensive, has 3,674. What correlated was the number of LLM call sites on hot paths, which is a property of architecture rather than of project size.

Being cheap is not the same as being efficient. Several of the low-spend projects still earned a middling grade, because grade is savings as a share of spend, not absolute dollars. A project spending $3 a month with half of it wasted is less efficient than one spending $70 with a tenth wasted.

Which calls were the wasteful ones?

The audit raised 94 cost findings across the 15 products:

Finding typeCount
Cost optimization69
Caching8
Unnecessary API call8
Architecture6
Model/task mismatch3

Picking an over-powered model, the thing most cost guides lead with, was 3 of 94. Almost everything was structural.

One finding that generalises beyond this corpus: our parser found most call sites by reading the code, but an LLM pass recovered 56 more that it could not express, and 30 of those were behind a project's own wrapper function. If you are estimating your own spend by searching for anthropic.messages.create, the calls routed through your internal client are invisible to that search.

How do I find out what mine costs?

Your provider console gives the billed total. Working out which call sites produced it, and which of them are wasteful, is a different job that a dashboard cannot do, because spend data has no view of your code. We wrote about that gap in observability tells you what you spent.

erabot reads the code instead. A free scan estimates a single file in the browser; the CLI runs the full audit in your own environment under your own model keys, finds the call sites, estimates each one's monthly cost, and emits the fixes. Your source never reaches us.


Method: call-site counts, finding counts and grades are direct outputs of erabot's audit of 15 open-source AI products. Dollar figures are modeled at stated call volumes and are estimates until measured against a deployment's real usage; they are not observed bills. Price structure cited is from our pricing table as last verified 2026-07-21.

EB
erabot.ai

Scan any codebase. See exactly what you spend on AI. Get one-click fixes.

No spam. Only launch updates and cost optimization tips.

Product

  • Product
  • CLI
  • Pricing
  • Changelog
  • Docs

Resources

  • Example audit
  • Blog
  • Case studies
  • Eval

Company

  • Security
  • Privacy
  • Terms
  • Support

© 2026 erabot.ai. All rights reserved.