The good news before we start
A shocking bill feels random, like the cost just decided to run away from you. It did not. AI spend is boringly mechanical: tokens in, tokens out, times a price.
That means the cause is sitting in your usage data right now, waiting to be sorted. Let us go through the five things that put it there.
1. You are using a big model for a small job
This is the most common one by a mile. A flagship model like gpt-4o is doing work that gpt-4o-mini would handle just fine, and you are paying roughly fifteen to twenty times more per token for the privilege.
Summaries, tagging, extraction, short replies, routing: most of these do not need the smartest model on the market. They need a fast cheap one. Our breakdown of when the mini model is enough shows where you can downgrade safely and where the flagship actually earns its price.
2. You never set an output token limit
Output tokens usually cost more than input tokens, and by default the model will happily write until it decides it is done. Without a max_tokens limit, a prompt that should return two sentences can return six paragraphs.
Multiply that overrun across every call and it adds up quietly. Setting a sane output cap per feature is a thirty second change that often shaves a real percentage off the bill.
3. A bug is sending duplicate or retry calls
Sometimes the bill is not a pricing choice, it is a straight up bug. A retry with no backoff, a double submit on the frontend, a webhook that fires twice: any of these turns one call into many.
This is actually the best case, because you just fix it and the cost vanishes. The trick is spotting it, and it shows up as bursts of near identical calls from the same user in a tight window.
4. No per user caps, so a few power users are the bill
AI cost is rarely spread evenly across your users. It follows a power law: a small handful of heavy users generate most of the spend, and everyone else barely registers.
If you have no caps, those few people set the size of your bill, and on a flat plan they can quietly cost you more than they pay. This is the exact pattern behind why power users hurt your AI margins, and it is worth understanding before it eats a quarter of your revenue.
5. Your system prompt is billed on every single call
This is the sneaky one that almost nobody notices. Every call sends your entire system prompt as input tokens, and you pay for it every time, not once.
Say your system prompt is 1,000 tokens and you make 100,000 calls a month. That is 100 million input tokens spent purely on repeating the same instructions, before a single user word is processed. On gpt-4o that is around $250 a month of pure overhead. On gpt-4o-mini it is closer to $15. Long system prompts are not free, and they scale with every request.
A quick example of how fast this compounds
Numbers make it concrete. Imagine an endpoint that normally handles 2,000 calls an hour, each about 1,500 tokens, on gpt-4o.
Now a transient error creeps in and your retry logic fires six attempts per request with no backoff. Those 2,000 calls become 12,000, and your token volume for that hour jumps from 3 million to 18 million. Left running overnight, a small retry bug turns a normal day into a bill that makes you feel exactly how you feel right now.
None of the individual calls looked wrong. The compounding did the damage, and the aggregate total never pointed at the loop.
How to tell which one is yours
You do not have to guess. Pull your usage or your logs and sort three ways.
- By model. If the flagship model dominates spend, cause one is probably yours.
- By user and timestamp. Bursts of repeated calls point at cause three. A few users owning most of the total points at cause four.
- By tokens per call. Unexpectedly large calls point at cause two or a heavy system prompt, cause five.
Within a few minutes of sorting, one of these lights up. For a deeper walkthrough of the OpenAI side specifically, see how to reduce OpenAI costs without breaking your product, and to turn the account total into a per customer view, read OpenAI cost per user.
Catch this pattern automatically next time
Finding the cause by hand works once. Doing it every month is a tax on your time you should not have to pay.
Weckr watches for these patterns for you. You wrap your existing client, and it tracks cost per user and per feature, flags the loops and retry storms in real time, and enforces caps so an outlier cannot run the bill up.
import { Weckr } from '@weckr/sdk'
const wk = new Weckr({
apiKey: process.env.WECKR_API_KEY,
plans: { free: 0, pro: 29 },
})
const response = await wk.chat(openai, {
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: prompt }],
userId: user.id,
feature: 'chat',
plan: user.plan,
})You can see it running on seeded data with no signup at the live demo, sanity check any feature against the break even calculator, or read the full system in the guide to AI cost and margin management.
FAQ
Why is my OpenAI bill suddenly so high?
There are five usual causes, roughly in order of how often they are the culprit: you are using a big model like gpt-4o for a task a small model could do, you never set an output token limit so responses run long, a bug is firing duplicate or retry calls, you have no per user caps so a few power users drive most of the spend, and your system prompt is being billed on every single call. Diagnose by sorting your usage by model, by user, and by endpoint.
Does the system prompt get billed on every API call?
Yes. Every call sends your full system prompt as input tokens, and you pay for it each time, not once. A 1,000 token system prompt across 100,000 calls a month is 100 million input tokens spent purely on repeating the same instructions. On gpt-4o that is around $250 a month before the user even says anything.
How much cheaper is gpt-4o-mini than gpt-4o?
At 2026 prices gpt-4o-mini is roughly 15 to 20 times cheaper per token than gpt-4o on input, and far cheaper on output too. For summaries, classification, extraction, and most routine tasks the mini model is more than good enough, so moving those features over is often the single biggest cut you can make.
How do I know if a bug is inflating my OpenAI bill?
Look for the same request firing repeatedly in a short window. A retry with no backoff, a double submit on the frontend, or an agent with no stop condition will send many calls where you expected one. Sort your logs by user and by timestamp and look for bursts. If one user made 400 near identical calls in ten minutes, that is your bug.
How do I stop OpenAI cost surprises going forward?
Watch cost per user and per feature instead of one total, set an output limit and a spending cap before launch, and get alerted the moment usage spikes rather than at month end. When the cost has a breakdown attached, the cause is obvious in minutes instead of hidden until the invoice.
Keep reading
See the cause, not just the total
Tonight you had to go digging because the bill was one number with no explanation attached. That is the part worth fixing for good.
Weckr attaches a story to every dollar: which user, which feature, which model. Wire it in once and the next spike explains itself. Start with the demo.