TL;DR
Your AI bill is almost never high because the model got expensive. It is high because your application sends more requests, and much larger requests, than anyone on the team thinks it does. In roughly that order: an agent loops more times than intended, every step re-sends the entire conversation, retries go unlogged, retrieval fetches far more context than the answer needs, and a frontier model is quietly doing clerical work.
The fastest way to find yours is to look at the shape of the bill first. A one-off spike, a permanent step up, a curve that compounds, and a number that was always high are four different diseases with four different fixes, and the shape narrows it down before you read a single line of code.
Almost none of this shows up in a demo. All of it shows up on the invoice.
Bill climbing faster than you can explain? We run cost reviews that end in an architecture change, not a list of tips. See how we build AI agents that survive their own invoice.
Key Takeaways
- The model's price per token is rarely the reason a bill is high. The number and size of requests almost always is.
- Diagnose by shape first: a spike, a step, a compounding curve and a permanently high number have different causes.
- One agent run can cost 19x to 50x a single completion, because every step re-sends the whole accumulated context.
- Retries are the most common invisible cost. A failing tool call retried three times bills three times and appears once in your logs.
- AI costs scaling with users faster than the user count itself is an architecture problem, not a pricing problem.
- Instrument cost per completed task before changing anything, or you will optimise the workload you remember rather than the one you pay for.
In April 2026 a four-person startup published an invoice for $113,421.87 for a single month of model inference. The founder of Swan AI posted it as a badge of honour. Read the three months in order and it looks less like a milestone: February $27,690, March $51,217, April $113,421.
You are probably not at six figures. But you opened your provider dashboard, found an AI bill too high to wave away, concluded your LLM costs are too high for what the feature earns, and could not immediately say which part of the product produced the number. Unexpected AI costs are almost never mysterious once measured; they are just unmeasured. That is the actual problem, and it is a measurement problem before it is a cost problem.
First, what shape is your bill?
Before you touch a prompt, look at the last ninety days and decide which of four shapes you are looking at. This narrows the cause faster than any code review, because each shape can only be produced by a small number of things.
An AI cost spike that returns to normal is nearly always a loop that ran away once, or a backfill somebody kicked off and forgot. A step that never comes back down is a release: a prompt got longer, a default changed, a model was swapped. A compounding curve is the healthiest-looking and the most dangerous, because it means your costs are tied to your success. Always high means nothing broke, which is the hardest news, because it means the architecture is the problem.
The seven causes, most common first
This is the order we actually find them in. It is not the order most articles list them in, because most articles start with the model and the model is usually innocent.
1. Your agent loops more times than you think
If any part of your product runs an agent, this is the first place to look and usually the last place you need to.
An agent that is allowed to keep trying will keep trying. Without a hard iteration cap it will grind through fifteen steps on a task that needed four, and each of those steps is a billable call. The demo finished in three steps because the demo input was clean. Production inputs are not clean.
The tell: your cost per completed task has a long tail. Most runs are cheap and a small fraction cost thirty times the median. Look at the distribution, not the average, because the average hides exactly this.
The fix: a hard ceiling on steps per run, plus a graceful failure above it. An agent that cannot fail loudly will fail expensively.
2. Every step re-sends the entire conversation
This one surprises people who have not looked closely at an agent trace, and it is the reason agent workloads cost what they do.
A twelve-step run does not send twelve similar requests. It sends twelve progressively larger ones, because each step carries the system prompt, the tool definitions, every prior thought and every tool result that came before it. Step twelve pays for steps one through eleven all over again. Total input tokens grow with the square of the step count, not in a straight line, which is why one agent run commonly costs 19x to 50x a single completion.
The tell: input tokens dwarf output tokens, by a factor of ten or more.
The fix: stop carrying the full transcript. Summarise past turns beyond a threshold and drop tool results once they have been consumed. The full arithmetic, and what each control is worth, is in AI agent costs; the wider sequence is in our guide to LLM cost optimization.
3. Retries nobody is logging
The most expensive line on many invoices does not appear in the application logs at all.
A tool call that fails schema validation gets retried. A timeout gets retried by the SDK. A malformed JSON response gets one more attempt. Each of those is billed in full, and most logging setups record the outcome of the operation rather than every attempt inside it, so three billed calls show up as one successful event.
The tell: provider-reported request counts are meaningfully higher than the number of operations your own logs claim.
The fix: count attempts, not outcomes. Then put a circuit breaker on the pattern where the agent retries the same failing call with the same arguments, which is the single most common cause of a spike.
4. Retrieval is fetching far more than the answer needs
If you built anything on top of your own documents, check the retrieval settings before you check anything else.
A pipeline configured to return the top twenty chunks when the top four would answer the question pays five times over on every single query. Worse, oversized retrieval usually makes the answer worse, because the relevant passage is buried among sixteen near-misses. This is one of the rare changes that cuts cost and improves quality at the same time.
The tell: input tokens per query are roughly constant and large regardless of how simple the question was.
The fix: lower top-k until quality measurably drops, then go back one step. Most teams find the floor is far lower than their default. The three cost centres behind this are broken down in RAG cost optimization.
5. A frontier model is doing clerical work
Now, finally, the model itself.
Most of what a product does all day is not hard reasoning. It is classification, extraction, routing, tagging, and short templated rewrites. NVIDIA's 2025 research on small language models in agentic systems puts a small model at 10x to 30x cheaper than its large sibling on exactly that kind of narrow work, and often just as accurate, because a specialist beats a generalist on its home turf.
The tell: a single model handles every call in your system.
The fix: route. Small model by default, escalate to the frontier model only when confidence is low, a schema fails, or a tool call will not parse. One caution: a weak model that fails and retries three times costs more than one strong call, so measure cost per completed task rather than price per token.
6. Output is longer than anyone reads
Output tokens cost roughly four to five times what input tokens cost on every major provider, which quietly makes response length a pricing decision rather than a style one.
If your prompts do not cap length, do not ask for structured output, and run at a chatty default temperature, you are paying a premium on text the user skims and the parser discards.
The tell: output tokens per call are far above what the interface actually displays.
The fix: set max_tokens deliberately, request structured output instead of prose wherever the consumer is code, and stop asking for explanations nobody reads.
7. You are paying full price for the same tokens on every call
Last, and cheapest to fix.
If every request begins with the same system prompt, rulebook, tool definitions or reference document, you are paying full input price to re-read identical tokens all day. Every major provider now bills cached tokens at roughly 10% of the standard input rate. There is a small write premium, so it pays off above a modest hit rate, and it silently breaks if a timestamp sneaks into the prefix.
The tell: a large, byte-identical span at the start of most requests.
The fix: turn on caching and order your prompt so the stable content comes first. The mechanics, the per-provider pricing and the break-even math are in the prompt caching guide.
Symptom to cause to fix
| What you are seeing | Most likely cause | First thing to do |
|---|---|---|
| Bill spiked once, then returned to normal | A runaway loop or a forgotten backfill | Find the longest runs that week; add an iteration cap |
| Bill stepped up and stayed up | A release changed a prompt, model or default | Diff prompts and model config against the last cheap week |
| Bill compounds faster than signups | Context grows per user; no caching | Trim carried context, cache the stable prefix |
| LLM costs too high from day one | Architecture: wrong model tier, oversized retrieval | Route narrow work to a small model; cut top-k |
| Input tokens 10x output tokens | Carried context in a multi-step agent | Summarise past turns; drop consumed tool results |
| Provider call count above your own | Unlogged retries | Count attempts, not outcomes; add a circuit breaker |
| Cost per query flat and large on easy questions | Retrieval returning too many chunks | Lower top-k until quality drops, then step back |
| Output tokens above what the UI shows | No length discipline | Cap max_tokens; ask for structured output |
Find yours in an afternoon
Reading about causes narrows the field. Putting your own numbers in narrows it further. The diagnostic below estimates what your workload costs today and then applies the five cost levers in sequence, so the output is which lever is worth your next sprint rather than a list of everything you could theoretically do.
The model loops with tools. Every step re-sends the conversation.
Model calls it takes to finish one job.
Finished outcomes, not raw API calls.
Refine the inputsHide the detail
System prompt, tools, fixed docs.
Genuinely new input each step.
Output usually costs 4x to 5x input.
Representative mid-2026 list prices. Overwrite them with your actual rates.
A best case. It assumes every lever lands cleanly and quality holds. Treat the first one or two as plannable and the rest as direction.
Biggest first move on your numbers: $4,877 a month.
The levers, in order, on your numbers
- 1Measure cost per completed taskno saving
- 2Fix the application layersaves $4,877/mo
- 3Right-size the modelsaves $4,106/mo
- 4Make each request cheapersaves $1,548/mo
- 5Decide where inference runssaves $556.18/mo
Whatever it tells you, do the measurement first anyway. Attach a cost record to every model call capturing input tokens, output tokens, cached tokens, the model used and the feature that triggered it, then aggregate by cost per completed task. One week of that data beats any amount of guessing, and it is the only way to be sure you are fixing the workload you actually pay for rather than the one you happen to remember.
When the bill is high and also correct
Not every high bill is a bug. Sometimes the system is doing exactly what it should and the number is simply large.
The question that settles it is not "is this expensive" but "does this cost less than what the user pays us for it". A feature that costs $0.40 per use inside a $99 plan used twice a month is fine. The same feature used four hundred times a month is not a cost problem, it is a pricing problem, and no amount of caching fixes a broken unit economic.
This is also why cost per user is the number to put on a dashboard rather than total spend. Total spend going up is ambiguous; it might just mean you are winning. Cost per user going up is never ambiguous.
How we run this diagnosis at HorizonLux
HorizonLux is a software development company that specialises in AI, and we use AI throughout our own delivery, so we are on both sides of this: we build the systems that generate these invoices and we pay the ones our own tooling produces.
When a client asks us this question, we do not start with their prompts. We start with three things, in this order, and it usually takes less than a day:
- The shape of the last ninety days, because it eliminates most of the list above before anyone opens an editor.
- Provider request counts against application event counts. When those two disagree, the gap is retries, and retries are the most common cause of the spike shape.
- The distribution of cost per completed task, not the average. The average tells you what a normal run costs. The 95th percentile tells you what is actually on your invoice.
Only after those do we look at models and prompts. It is the same ordering as the five levers, for the same reason: fixing the model choice underneath a broken loop just makes the wrong thing cheaper.
What to do this week
- Plot ninety days of spend and name the shape. Ten minutes, and it eliminates most of this list.
- Compare provider request counts to your own event counts. The difference is retries you are not seeing.
- Find your longest agent run this month and ask whether it should have been allowed to run that long.
- Log cost per completed task, tagged by feature, and look at the 95th percentile rather than the mean.
- Cap iterations and add a circuit breaker on repeat failures, before changing any model.
- Then, and only then, look at model choice, caching and batching. The full sequence is in our guide to LLM cost optimization.
An AI bill that surprises you is a measurement failure before it is an engineering one. Every cause above is ordinary, none of them requires exotic tooling to find, and all of them are cheaper to fix than to keep paying for. The teams who get this under control are not the ones with the best prompts. They are the ones who decided to look.
Want the diagnosis done properly? We run a fixed-scope AI cost review that ends in an architecture change and a number, not a list of tips. See how we approach AI development, or tell us what your invoice looks like.
Frequently asked questions
Why is my AI bill so high?
Almost always because your application makes more calls, and much larger calls, than the team believes. In order of frequency: an agent loops more times than intended, every step re-sends the whole conversation, retries go unlogged, retrieval fetches more context than the answer needs, and a frontier model handles work a small one could do. The model's price per token is rarely the actual cause.
Why is my OpenAI bill so high all of a sudden?
A sudden spike that returns to normal is nearly always a runaway loop or a forgotten batch job, not a pricing change. Look for the longest-running tasks in that window and compare the provider's request count to your own event count for the same period. A gap between them means retries. A spike that steps up and stays up is different: that is a release which changed a prompt, a default or a model.
How do I find what is burning through tokens?
Attach a cost record to every model call at the point of invocation, capturing input tokens, output tokens, cached tokens, the model used and the feature that triggered it. Then aggregate by feature and by completed task, and look at the 95th percentile rather than the average. Token burn concentrates in a small number of pathological runs, and averages hide exactly those.
Why are my AI costs scaling faster than my users?
Because context grows per user while headcount does not. Engaged users hold longer conversations, and every additional turn re-sends the accumulated history, so cost per user rises with engagement rather than staying flat. If your bill curves upward while your user count climbs in a straight line, the gap between those lines is an architecture problem: trim carried context, summarise old turns and cache the stable prefix.
How much does it cost to run an LLM in production?
There is no useful per-month figure for the cost of running an LLM, because the same feature can differ more than tenfold between two teams on identical model pricing. Production LLM cost is decided by how many calls one completed outcome takes, how much context each call carries, which model tier serves it, and whether repeated tokens are cached or batched. Estimate your own with cost per completed task rather than any published benchmark.
Are my AI costs out of control, or just large?
Ask whether the cost of a completed task sits comfortably below what a user pays you for it. If it does, a large bill is just a large business. If it does not, the problem may be pricing rather than engineering, and no amount of caching will fix a feature that loses money on every use. Track cost per user, not total spend: total spend rising is ambiguous, cost per user rising never is.
Should I switch to a cheaper model to bring the bill down?
Not as a first move, and not across the board. A weak model that fails and retries three times costs more than a single strong call, and it spends latency and engineering attention on top. Fix the loop and the carried context first, since those savings are quality-neutral, then route narrow work such as classification and extraction to a small model while keeping the frontier tier for real reasoning.
Sources
- "Startup CEO says he's proud his 4-person team racked up a $113,000 monthly AI bill" (Business Insider, via Yahoo News, April 2026)
- Erik Sherman, "The AI Giants See A Potential Meltdown," Forbes (May 27, 2026)
- "Small Language Models Are the Future of Agentic AI," NVIDIA Research (Belcak et al., 2025)



