Posts

Hidden Costs in LLM APIs

Six costs missing from the headline rate: retries, cache writes, long-context tiers, output verbosity, batch minimums and egress limits.
Onsp
Bar chart showing one million input and one million output tokens on GPT-6 Astra costing $60 at base rates, $72.50 with a cache write and $120 once the request crosses the long-context threshold

The rate card is the starting point of an invoice, not the invoice. Five cost mechanisms account for most of the gap between what teams budget from the price table and what they are actually billed.

1. Long-context tiers

Several models raise the price for a single request above a token threshold. In this dataset the threshold is 272K tokens for the GPT-6 family, and crossing it roughly doubles the input rate.

ModelStandard inputAbove thresholdThreshold
GPT-6 Astra$10.00$20.00272K
GPT-6.1 Sol$2.00$4.00272K
GPT-6 Sol$2.00$4.00272K

The practical consequence is that one oversized request does not cost proportionally more — it costs disproportionately more. Chunking a document into two requests below the threshold is frequently cheaper than sending it whole.

2. Reasoning tokens billed as output

Reasoning models generate internal tokens before producing a visible answer, and those tokens are billed at the output rate. On a task where the answer is fifty tokens and the reasoning is two thousand, the output line is forty times larger than the visible response suggests. Budget by reasoning effort setting, not by answer length.

3. Retries

A request that times out after generating 800 tokens is still billed for those tokens on most providers. At a 5% retry rate on a large volume, that is 5% pure waste. Timeouts, malformed JSON that must be regenerated, and rate-limit rejections all contribute. Measure retry rate as a first-class cost metric.

4. The output-to-input multiple

The ratio between output and input price varies from 2.0x to 8.3x across this dataset. Teams comparing models on input price alone routinely pick a model that is more expensive for their actual token mix.

ModelOutput multiple
Grok 4.32.0x
Grok 4.63.0x
DeepSeek V4 Pro3.0x
GPT-5.28.0x
Gemini 2.5 Pro8.0x
Gemini 3.5 Flash-Lite8.3x

5. Cache writes that never hit

Where a write premium exists — $2.50 against $2.00 input on Claude Sonnet 5 — an unused cache is a 25% surcharge on that prefix. Teams enable caching, see no traffic pattern that reuses it, and quietly pay more than before.

Budgeting template

Build the monthly estimate from four lines rather than one: input tokens × input price, output tokens plus reasoning tokens × output price, cache writes × write price, and expected retries as a percentage uplift. If long-context tiers apply, split the input line into below-threshold and above-threshold volumes.

Do this in the calculator before shipping, and compare the estimate against the first real invoice. The delta is the cost of the assumptions you did not know you were making.

Related reading

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.