Your Claude API bill is decided by output tokens, not input tokens. Output is priced higher per token than input, and most applications generate more output than they consume — agents, chat products and content pipelines all emit long responses from short prompts. Input only becomes the dominant cost when you push large documents into a long context window.
That single fact explains most "why is my bill so high" questions. The rest of the variance comes from three levers: which model tier you route to, how much text you generate per request, and whether you are paying full price for a repeating prompt prefix that could be cached.
This page gives you the mechanism and the arithmetic — with ratios rather than quoted rates, because vendor rates change and a stale number in a blog post is worse than no number. For current per-token rates, always read Anthropic's pricing page directly.
Four things are priced separately, and they are not interchangeable:
Anthropic publishes current rates for each of these on its pricing page. We deliberately do not reproduce them here: they change, and a copied number without a date is how sites end up confidently wrong.
What matters is the shape of the cost function:
Every optimisation you will ever make is a change to one of the four terms.
Two multipliers stack.
Multiplier one: output costs more per token. Generation is more compute-intensive than reading, so every major vendor prices output above input. The ratio varies by model, but it is always more than 1.
Multiplier two: you generate more tokens than you send. An agent sends a short goal and receives a plan plus tool calls, then repeats. A chat product sends a transcript and receives a reply. Even a summarisation task reads one document and writes a summary — but in that case the ratio flips, which is the exception we cover below.
Combine the two and output dominates. Here is the arithmetic in cost units rather than dollars, so the ratios stay true no matter what the current rates are.
Example A — chat or agent workload (illustrative):
Example B — document summarisation (illustrative):
Same pricing, opposite conclusion, because the token ratio changed. This is why generic advice like "cut your output length" is right for chat products and wrong for summarisation pipelines.
The practical rule: compute your own input/output ratio before optimising anything. If output is more than about 60% of your cost units, work on generation length and model tier. If input dominates, work on context size and caching.
| Workload | Token shape | Term that dominates | First lever |
|---|---|---|---|
| Chat product, agent loop | output ≫ input | output rate × output volume | cap max_tokens, drop to a smaller tier |
| Document Q&A with a long context | input ≫ output | input rate × input volume | retrieve less, cache the stable prefix |
| Batch classification or extraction | both small, many calls | model tier | batch endpoint plus a small model |
| Bulk summarisation | input > output per call, high call count | whichever side is larger — measure | batch endpoint first, then model tier |
Long context inverts the ratio without changing the price list.
If you paste a 100,000-token document into every request and ask for a 300-token answer, input is roughly 99% of your token volume. At that point the input rate is your bill, and the levers change: retrieve fewer documents, trim the system prompt, cache the stable prefix, or move the retrieval step to a cheaper model and only call the frontier model for the answer.
Two specific traps in long-context work:
Batch APIs run requests asynchronously over a longer window in exchange for a discount on the tokens processed that way. Anthropic publishes the current discount on its pricing page — check it there rather than trusting a figure from a guide.
What matters for your model is the trade, not the percentage:
The right way to use batch pricing is to split your workload by latency requirement first, then route the flexible half to the batch endpoint. Most products have more batchable work than they think — and more user-facing work than they can batch.
Prompt caching meters two new things: writing a prefix into the cache, and reading it back.
The economics are a break-even calculation, and it has exactly one variable that matters: how many times you reuse the prefix.
(write premium) + (reads × read rate) is less than (reads + 1) × full input rate for the same prefix.In words: caching is a bet that you will reuse the prefix more than once or twice. A prefix used once is a loss. A prefix used twenty times is a large win. Static system prompts, tool definitions and long reference documents used across many calls are the classic case.
Two caveats before you build around it:
Five steps, using data you already have.
usage object from real responses. A Claude API response reports input tokens, output tokens, and — when caching is on — cache creation and cache read tokens separately. Log these per request; averages hide the outliers that dominate the bill.Keep the spreadsheet. Re-run it when rates change, when you change models, or when the bill moves more than 20% without a matching usage change.
In rough order of impact for a typical application:
max_tokens to what the product actually needs; enforce output format so the model stops padding. Output is the expensive token.Levers 1 through 5 change your usage. Lever 6 changes your rate. They stack, and it is worth doing the usage work first — a 30% discount on a badly-shaped workload is still a badly-shaped workload.
Tapix AI is a gateway, not a vendor: it prices frontier models — Claude included — up to 30% below the official list price, with the list price shown beside ours on the pricing page so the line is checkable rather than asserted. Billing is per token from prepaid credit, with no monthly fee, non-expiring credit, a $10 minimum and no card at signup, and failed requests are not billed. It is a rate lever, not a replacement for the usage work above — and if you need a contract, a DPA or an SLA, buy from Anthropic directly instead.
Why is my Claude API bill higher than I estimated?
Almost always output volume or model tier. Output tokens cost more than input and usually outnumber it, and a frontier model called for a classification task multiplies the rate. Pull the per-request usage object and split input from output before assuming the pricing is wrong.
Does input or output cost more on the Claude API?
Output. Every major vendor prices generation above reading, because generating is more compute-intensive. The practical consequence is that output volume is the term to control for chat, agent and content workloads, while input volume matters most for long-context and retrieval work.
Does prompt caching always save money?
No. It saves when a stable prefix is reused many times. Writing a cache entry costs more than ordinary input, so a prefix used once is a loss and one reused repeatedly is a significant win. Cache lifetime and prefix stability both determine whether you actually collect the saving.
Is batch processing cheaper?
It is discounted relative to synchronous requests, and Anthropic publishes the current rate on its pricing page. The trade is latency, not capability — it suits backfills, nightly jobs, evaluation runs and bulk summarisation, and it is unusable for anything a user is waiting on.
How do I lower Claude API costs without hurting quality?
Route by task: small models for classification, extraction and routing; the frontier model only where output quality actually differs. Then cap output length, cache stable prefixes, and move asynchronous work to batch. Rate arbitrage — paying below list for the same model — is the last lever, not the first.
Can I use the Claude API for less than list price?
Yes, through a reseller or gateway that buys upstream and passes part of the discount on. Tapix AI prices frontier models up to 30% below official list. The check is whether the provider publishes the vendor list price next to its own and preserves the model identifier — if it will not, treat the discount as unverified.
Price the output token first. Compute your own input/output ratio in cost units. Then decide whether you are optimising generation length, context size, caching, batching — or simply paying too much per token.
If it is the last one, the pricing page shows the per-model comparison against official list, and how to tell whether a cheap LLM API is actually cheap covers the checks that apply to any provider, ours included.