Estimating an LLM API budget from the input price alone will almost always come out low. The problem isn’t that you copied the wrong number — it’s that the fields that actually decide the bill usually aren’t in the “input price” column of the price sheet.
In the pricing interface as of 2026-12-04, claude-opus-5-5 lists an input price of 4 and an output price of 20, and right next to them sits a completion_ratio: 5. In that same interface, Ergo’s cache read price is 0.03 while its input price is 1. All of these numbers are right out in the open. They just rarely make it into the budget spreadsheet.
This isn’t another “write shorter prompts” savings checklist. Each of the six costs below points to a specific line item — no rumors, no peak-hour pricing or long-context folklore that nobody bothered to open the official page to verify.
Core value: after reading this, you’ll be able to take a budget built on input price and rewrite it into a model that accounts separately for output, cache, tiers, retries, and images — and know which line item will blow first before you even integrate.

LLM API Bill Overruns: Key Points
| Cost item | Trigger condition | Price anchor (2026-12-04) | Typical consequence |
|---|---|---|---|
| Output multiplier | Estimating the whole bill from input price only | claude-opus-5-5 input 4, output 20, completion_ratio 5 | Budget underestimated by roughly 5x |
| Thinking tokens | Reasoning or extended thinking enabled | Ergo input 1, output 3 | Reasoning requests settle at 3x the input price |
| Cache miss | Unstable prefix, system prompt modified | claude-opus-5-5 cache read 0.2, which is 0.05 of input | Pay 3.8 extra for the same context |
| Context tier | A single request exceeds 272K | gpt-6.1-sol input 2→4, output 10→15 | Unit price for the whole bill jumps once you cross the line |
| Retries and tool loops | Failed retries, multi-turn agents | Every retry pays input and output again, counted at gpt-6.1-sol long-context output 15 | Output cost grows linearly with each round |
| Two image pricing schemes | Mixing per-call and per-volume models | gpt-image-2.6-all $0.025 per call; gpt-image-2.6-flare text 5, image 8, output 30 | Your budget model doesn’t match the bill’s structure |
Why LLM API bill overruns always land on the output side
Break a single request apart and input and output are two separate price lines. Take claude-opus-5-5’s 4 and 20: with a 2000-token context plus an 800-token answer, the input part is 4 × 2000 ÷ 1000000 and the output part is 20 × 800 ÷ 1000000 — output ends up being two-thirds of the total. That’s not a result you have to run to discover; it’s a conclusion you get by multiplying the two numbers on the price sheet.
The second reason is that fields carrying multipliers are easy to skip over. completion_ratio, cache read price, and tier thresholds aren’t in the input price column, yet they determine which price the same number of tokens eventually settles at.
The third reason is subtler: retries and tool loops turn one charge into many, while the bill only shows the aggregated total. When you find that your output token count is far higher than expected, don’t suspect the model of getting chatty — count the request rounds first.

6 Hidden Costs Behind LLM API Bill Overruns
Each of the six items below maps to a specific field in the price sheet. All unit prices come from the same pricing endpoint on 2026-12-04. They’re only meaningful to compare after you convert them to the same unit.
Hidden Cost 1: LLM API Output Multiplier—completion_ratio Is What Determines the Bill
Most budget spreadsheets only list the input price, and that breaks down on tasks where output makes up a large share. For claude-opus-5-5, input is 4 and output is 20, with completion_ratio listed as 5. That means every output token is billed at the price of five input tokens.
Put these two columns side by side for all four rows, and the multiplier differences are more worth remembering than the unit-price differences. The higher the multiplier, the less suitable the model is for scenarios with long output and short input—things like summary expansion, code comment generation, or long-form rewriting.
| Model | Input (per million tokens) | Output (per million tokens) | Output/Input |
|---|---|---|---|
| claude-opus-5-5 | 4 | 20 | 5x |
| Ergo | 1 | 3 | 3x |
| gpt-6.1-sol, up to 272K | 2 | 10 | 5x |
| gpt-6.1-sol, over 272K | 4 | 15 | 3.75x |
🎯 Technical tip: You can work out the multiplier before integration. Put completion_ratio directly into your cost formula, then double-check it against the pricing endpoint at APIYI (apiyi.com). That way, you won’t discover after launch that output costs are an integer multiple of input costs.
Hidden cost 2: Thinking tokens in LLM API calls are billed as output, so the longer the reasoning, the higher the unit price
On the bill for a reasoning-type request, there’s a chunk of tokens the user never sees — but they’re still settled at the output rate. Ergo’s input is 1 and output is 3, which means the tokens the model generates while thinking internally are charged at the same price as the answer it finally returns.
An answer that only outputs 300 tokens, if it thought through 2000 tokens along the way, gets billed as 2300 output tokens. The signature of these requests is short input, short visible output, long bill. If you only look at reply length when troubleshooting, you’ll easily miss the cause.
So the safer approach is to record thinking volume and visible answers separately. Plenty of SDKs return a count of thinking tokens — instrument that as its own metric, and your budget sheet gains an extra column. When you overspend, you can immediately tell whether the model “thought too long” or “wrote too much.”
Hidden cost 3: LLM API cache misses — paying several times over for the same context
The gap between the cache-read price and the input price is the largest of all the hidden costs. claude-opus-5-5’s input is 4 and cache read is 0.2, which works out to 0.05 of the input price; Ergo’s input is 1 and cache read is 0.03.
| Model | Input price | Cache read price | Cache read as share of input | Difference when missed |
|---|---|---|---|---|
| claude-opus-5-5 | 4 | 0.2 | 0.05 | 3.8 |
| Ergo | 1 | 0.03 | 3% | 0.97 |
The precondition for a cache hit is a stable prefix. Put timestamps, random IDs, or user nicknames ahead of the system prompt, and every request has a different prefix — so the cache never hits, and the same few-thousand-token context gets billed repeatedly at full price.
That’s why reordering is more cost-effective than compressing: fixed instructions go first, changing variables go last. Structures like a long document sandwiched between instructions with the question rewritten every time should be avoided wherever possible, because they make the prefix change on every request.
Hidden Cost #4: LLM API Context Tiers — Crossing the Line Raises the Whole Request’s Unit Price
Some models don’t price linearly. Instead, they set a step. Once gpt-6.1-sol exceeds 272K, input goes from 2 to 4 and output goes from 10 to 15 — not a bump of a few percentage points, but a straight doubling.
The trap isn’t the per-token price, it’s how the threshold is applied: as long as a single request crosses the limit, that entire request gets billed at the higher tier. There’s no splitting it into a cheaper first half and a pricier second half. Stuff a whole document into a request just to do one small task, and you might be paying double.
To avoid this, you need to truncate before you reach the step. Control the number of retrieved items during search, cap segment length during summarization, and process long documents in chunks rather than feeding them in all at once. All of these beat trying to optimize the prompt after the fact.
Hidden Cost #5: LLM API Retries and Tool Loops — One Request Becomes Multiple Bills
A retry is one parameter in code, but one full bill on your invoice. Every retry after a failure means paying for the input and output all over again, because the server really did reprocess everything.
Tool calls work the same way. Each round of a tool loop is a fresh model invocation, and the input also carries the previous round’s results, so the per-round cost climbs as rounds accumulate. At the same price sheet, gpt-6.1-sol at a long context costs 15 for output — three rounds means 45 output-equivalent, while the user may only see a single answer.
There are three ways to keep this in check: retries must carry an idempotency key to prevent duplicate charges on the business side; backoff policies should have a ceiling so you don’t retry forever; and tool loops need a maximum number of rounds, after which you stop and return partial results. Aligning retry logs with your bill is the fastest way to track down abnormal output volume.
Hidden Cost 6: LLM API Image Pricing Per-Call vs Usage-Based — You Can’t Mix the Two
Image models don’t all bill the same way. Within the same batch of models, some charge per call and some charge by usage. gpt-image-2.6-all is per-call at $0.025 — one invocation, one charge. gpt-image-2.6-flare is usage-based: text 5, image 8, output 30, counting tokens just like a text model.
| Model | Billing method | Unit price | Best for | Risk |
|---|---|---|---|---|
| gpt-image-2.6-all | Per call | $0.025 per call | Fixed sizes, batch image generation | Repeated regeneration stacks up linearly |
| gpt-image-2.6-flare | Usage-based | Text 5, image 8, output 30 | Long prompts, fine-grained control | Large images and long prompts cost more |
Put both models under a single budget line and your numbers will never add up. Per-call pricing doesn’t care about image size; usage-based pricing depends on both prompt length and output resolution. Set up separate budget lines with separate caps, and you’ll spot an anomaly in one of them while it’s still small.

LLM API Bill Overruns Quick Start: Rewrite It Into a Proper Budget Model in 6 Steps
Turn the six cost items above into executable steps. The recommended order: start with the formula, then the guardrails, and finally split out the budget line items.
- Work out the output price first. Cost = input tokens × input price + output tokens × output price, where output price = input price × completion_ratio. Validate it against
claude-opus-5-5: 4 × 5 = 20, which matches the price sheet — then apply the same math to the other models. - Track reasoning tokens separately. Take
Ergoas an example: its output price is 3. Record thinking volume and the visible answer as two separate fields, so a single aggregate doesn’t mask the problem. - Keep the prefix fixed so the cache hits. The cache read price for
claude-opus-5-5is 0.2, which is 0.05 of the input price. Separate the system prompt from the timestamp so the prefix stays stable. - Put a 272K guardrail on the context. Once
gpt-6.1-solcrosses 272K, input goes 2→4 and output goes 10→15. Truncation and summarization have to happen before you reach that step. - Cap retries and tool rounds. Retries get an idempotency key, tool loops get a max round count — otherwise output fees scale linearly with each round.
- Give images their own budget line.
gpt-image-2.6-allis $0.025 per call;gpt-image-2.6-flareis billed by usage. Don’t put those two on the same row.
When you wire it up, point base_url at https://api.apiyi.com/v1 and you can call all of the models above through the same OpenAI-compatible interface. No need for a different SDK per model, and your budget script only has to maintain one price sheet.
🚀 Quick start: Sign up at APIYI (apiyi.com) and you’ll get free trial credit. Run a small volume of traffic through each of the six costs first, confirm the budget model lines up with your actual bill, and then scale up.
Checklist to Avoid LLM API Bill Overruns
| Check | How to do it | Cost it maps to |
|---|---|---|
| Output multiplier in the formula | Write completion_ratio in the budget sheet instead of hardcoding the output price | Output multiplier |
| Reasoning tokens listed separately | Instrument thinking volume and visible answer separately | Thinking tokens |
| Prefix stability | Fixed instructions first, variables last | Cache miss |
| Context guardrail | Truncate or shard before reaching 272K | Context step |
| Idempotent retries | Idempotency key plus a backoff cap | Retry loop |
| Tool round cap | Abort once the max round count is exceeded | Retry loop |
| Separate image billing | Per-call and per-usage become two budget line items | Image pricing |
| Periodic price reconciliation | Trust whatever the pricing API returns for that day | Everything |
LLM API Bill Overruns: Common Questions FAQ
Q1: What’s the most common cause of LLM API bill overruns?
More often than not, it’s estimating the whole bill using only the input price. claude-opus-5-5 costs 4 for input and 20 for output, so the completion_ratio is 5. As soon as the output share goes up, your budget gets underestimated by several times.
Q2: What exactly is completion_ratio, and why does it decide your bill?
It’s the ratio of output price to input price. On the same price sheet, claude-opus-5-5 is 5, gpt-6.1-sol is 5 up to 272K and 3.75 beyond 272K, and Ergo is 3. The higher the multiplier, the more expensive the output.
Q3: Why are thinking tokens billed as output?
Because the thinking process is also tokens generated by the model. Ergo costs 1 for input and 3 for output, and the internal reasoning goes through the same price as the final answer — so the effective unit price of a reasoning request ends up noticeably higher than the input price.
Q4: What’s the difference between a cache read price of 0.2 and 0.03?
It comes down to the model itself. claude-opus-5-5 has a cache read of 0.2 against an input price of 4, which works out to 0.05; Ergo has a cache read of 0.03 against an input price of 1. The ratios differ, but the conclusion is the same: a cache hit is far cheaper than a miss.
Q5: How is the 272K context tier determined?
It applies to the total length of a single request. Once gpt-6.1-sol goes over 272K, input moves from 2 to 4 and output from 10 to 15, and the entire request is settled at the higher tier — so truncation has to happen before you cross the line.
Q6: For image models, should you pick per-call or per-volume billing?
It depends on the generation mode. Fixed sizes and batch image output suit the per-call rate of 0.025 USD for gpt-image-2.6-all; long prompts and scenarios that need fine control over output quality are better served by gpt-image-2.6-flare’s usage-based billing, as long as you accept that rate card of 5 for text, 8 for images, and 30 for output.
Q7: How do I quickly verify these six cost factors?
Send a small batch of low-volume requests to trigger each of the six scenarios, then line up the bill against your budget model item by item. With the unified interface from APIYI (apiyi.com), you can switch models within the same codebase, so you don’t have to rewrite your calling logic while verifying.
LLM API Bill Overruns: Key Takeaways
- Output multiplier is the main culprit: The output price equals the input price multiplied by completion_ratio — leave that out of your formula and you’ll definitely underestimate.
- Thinking tokens aren’t free: Reasoning is billed at the output price. Ergo’s 1 vs. 3 is the clearest illustration.
- Cache savings are the biggest spread: For claude-opus-5-5, cache reads cost 0.2 versus 4 for input — a gap of nearly four times.
- Tiers raise the whole bill: Once gpt-6.1-sol crosses 272K, input doubles, so truncation has to happen before you hit the line.
- Retries mean double billing: Every retry round and tool call is a complete invocation, so a round cap beats post-hoc analysis.
- Images have two pricing models: Per-call counts calls, per-volume counts tokens — mix them into one budget line and you’re guaranteed to be off.
- Check prices live: Unit prices are whatever the pricing API returns that day. APIYI (apiyi.com) offers a unified price list and invocation entry point.
Summary
LLM API bill overruns are rarely caused by writing a unit price wrong. More often, it’s the fields in the price list that carry multipliers never making it into the budget. The six costs boil down to three sentences: output costs more than input, cache hits cost less than misses, and crossing tiers or retrying both change the billing unit.
- Calculate output first: Put completion_ratio into your formula before talking about any other optimization.
- Then control prefixes: Whether the cache hits determines whether long context is cheap or expensive.
- Finally, set the gates: Context tiers, retry rounds, and image sub-accounting — all three need hard limits.
Do these three steps and the gap between your budget sheet and your bill usually converges to something explainable. If you want to validate before scaling up, you can grab free credits through APIYI (apiyi.com), run all six scenarios through the unified interface, and then decide on production quotas.
References
-
Pricing API data: All unit prices in this article come from the pricing API response on 2026-12-04, including completion_ratio, cache read pricing, context tiers, and image billing fields
- Link:
api.apiyi.com - Note: Prices get updated. When you’re double-checking, always go by the API response from that day.
- Link:
-
OpenAI-compatible API base URL: A single entry point that supports the models listed in this article
- Link:
https://api.apiyi.com/v1 - Note: Works with mainstream SDKs, so you can swap models without rewriting your codebase.
- Link:
Author: APIYI Technical Team
Technical discussion: Reach out to us through the APIYI apiyi.com homepage. docs.apiyi.com has the full API docs.
