Last month your API usage cost a few dollars. This month the same app costs several times more. Nothing in your code looks different, and the provider's invoice only shows a total. Where did the money go?
A pay-per-token bill is arithmetic, not mystery: tokens in, tokens out, multiplied by a price per million. When the total jumps, at least one of those numbers jumped first. This guide walks through the four usual causes (longer inputs, longer outputs, more runs, and a growing conversation history), then shows how to price each suspect prompt with the free Prompt Cost Calculator on Ovatly until the numbers explain the bill. One boundary to set at the start: the calculator is an estimating tool for planning. It does not connect to your provider account, read your usage dashboard or see your invoice. It multiplies token counts you supply by a snapshot price table, in your browser.
Contents
- Quick answer
- The four levers behind every token bill
- Why output length is the sneaky one
- How conversation history quietly inflates input
- How to hunt the expensive prompt, step by step
- Worked example: one call, then the same call at volume
- Limitations worth knowing
- Common mistakes
- FAQs
- Conclusion
Quick answer
A bill jumps when tokens or runs jump. Check four things: did any prompt get longer (more input tokens), did replies get longer (more output tokens, usually the priciest per token), did the number of calls grow, and is a chat feature resending a longer history with every message? To find the culprit, paste each suspect prompt into the Prompt Cost Calculator, enter a realistic output count and your real run count, and compare the estimates. The prompt whose counts grew is the one that moved the bill.
The four levers behind every token bill
Every API charge in the snapshot table is built from the same parts: an input price and an output price per million tokens, the token counts of one call, and how many times that call runs. A jump has to come from one of four places.
Longer inputs. Someone pasted a bigger document into the prompt, added a longer system prompt, or started attaching more context to each request. Input tokens are the cheaper side of the bill, but they are charged on every call.
Longer outputs. The model started writing more: longer summaries, fuller explanations, bigger code files. Output tokens are usually priced several times higher than input tokens. In the snapshot table, GPT-4o is listed at $2.50 per million input tokens and $10.00 per million output tokens, so one output token costs as much as four input tokens at those rates.
More runs. A feature got popular, a retry loop fired, or a batch job quietly doubled. A call that costs a fraction of a cent looks harmless until it runs ten thousand times.
A growing history. Chat-style calls resend the conversation so far with each new message. Turn one is short; turn thirty carries everything said before it, even though the user only typed one short line.
Why output length is the sneaky one
Input length is visible: you can see the prompt you sent. Output length is decided by the model, after your code has run, and it drifts. A small prompt change ("explain your reasoning", "be thorough") can double the average reply length without anyone noticing, and because output tokens carry the higher price, the bill feels it immediately. It is also why a call's true cost cannot be known in advance: output length is always a guess until the call is made. For hunting purposes, measure a few real replies with a token counter and use the average, then also run the worst case, the maximum output your API call allows.
How conversation history quietly inflates input
In a stateless call, the input is the prompt. In a chat, the input is the prompt plus the whole conversation history, resent every turn. A support bot that starts with a 1,000 token exchange can be sending 10,000 input tokens by the twentieth reply, on every reply after that too. Nothing about the user's messages changed; the input grew on its own. If your bill jumped after a chat feature shipped or conversations started running longer, history is the first suspect, and measuring it means counting a full late-stage conversation, not just the latest message.
How to hunt the expensive prompt, step by step
- List your suspects: every distinct prompt or call type your app makes, and note roughly how many times each runs in the period the bill covers.
- Open the Prompt Cost Calculator and choose the model the suspect runs on, from the snapshot table.
- Paste the prompt and click Count input tokens, or type the counts directly if you already know them. For a chat call, paste the full resent history, not just the last message.
- Enter the output tokens you expect, measured from real replies where you can, and the number of identical runs for the period.
- Click Estimate cost and read the breakdown, shown to 4 decimal places: input cost, output cost and total.
- Repeat for each suspect, then compare each estimate against what that call type used to cost. The one whose inputs, outputs or runs grew is your answer.
Worked example: one call, then the same call at volume
The calculator's own worked example uses GPT-4o at its snapshot prices of $2.50 per million input tokens and $10.00 per million output tokens. One call with 1,000 input tokens and 500 output tokens costs 1,000 / 1,000,000 x $2.50 = $0.0025 for the input, plus 500 / 1,000,000 x $10.00 = $0.0050 for the output: $0.0075 in total.
Now run that identical call 10,000 times, the way a modest feature does in a month: $0.0075 x 10,000 = $75. Manageable, but no longer invisible.
Then let the history effect in. Suppose the same feature is a chat, and by the later turns each call resends 10,000 input tokens instead of 1,000, while the reply stays at 500 output tokens. The input side alone is now 10,000 / 1,000,000 x $2.50 = $0.0250 per call, and the call total is $0.0300, four times the original, with no change to the user's behaviour at all. That is the shape of most unexplained bill jumps: a small per-call change, multiplied by volume. All of these figures use the snapshot rates labeled on the tool itself: "Snapshot: November 2026. Prices and limits change; verify with the provider before budgeting."
Limitations worth knowing
The calculator estimates; it does not audit. Real bills can differ from any estimate: providers may add charges for caching, tools, images or minimums, and output length is always a guess until the call is made. The snapshot prices were recorded in November 2026 and will drift out of date, so verify current rates before acting on a large discrepancy.
One row deserves a special note. The open-weights Llama entry is priced at $0 because you run it yourself; your real cost is your own hardware or hosting, which this calculator does not estimate. A $0 estimate there does not mean the calls are free. And the calculator can only price what you paste into it, so build your suspect list from your code and your provider's usage breakdown rather than from memory.
Common mistakes
- Testing the prompt, not the call. For chat features, the resent history is part of the input. Counting only the latest message understates the cost by design.
- Guessing the output count once. Reply lengths drift. Measure several real replies, and run the maximum-output worst case before concluding a prompt is cheap.
- Forgetting the runs multiplier. A fraction of a cent per call is the normal case. The bill is written by the run count, so estimate with your real volume.
- Blaming the price first. Providers do change prices, but a sudden one-month jump is far more often a counts problem. Check the counts before the rates.
- Treating the estimate as the invoice. The breakdown tells you which prompt is expensive and why. Your provider's dashboard is still the record of what you were charged.
FAQs
Are these prices current? They were recorded in the November 2026 snapshot and are labeled as such. Providers change prices, so check the provider's pricing page before committing a budget.
Why is the total so small? Per-token prices are fractions of a cent for a single short prompt. Costs become meaningful at volume, which is why the tool can multiply by a number of runs.
How do I know my output token count in advance? You cannot know it exactly. Estimate from similar past replies (the Token Counter can measure one), or set the maximum output your API call allows, to get a worst case.
Does the calculator call any API? No. It multiplies your token counts by the snapshot prices in your browser.
Can this calculator tell me which prompt caused my bill jump? Not directly. It has no access to your account or your bill. What it can do is price any prompt you paste into it, so you can test your suspects one by one and find which one's counts explain the jump.
Conclusion
A jumped bill is a counting problem before it is a pricing problem. List the call types, price each one with its real input, a measured output and its true run count, and the expensive prompt identifies itself. The Prompt Cost Calculator makes each of those tests take seconds. Its sibling guide shows the same arithmetic from the other side: How to Compare the Cost of Two Models for the Same Task. For more guides like this, see the AI and Prompt Tools guides.