Why LLM API Bills Can Differ by 2x
Choosing an LLM API is often treated as a price comparison exercise, but real monthly spending is driven by pricing structure rather than per-unit rates. This article breaks down how billing units, batch discounts, committed-volume plans, caching, and region choices affect cost, and offers a practical optimization checklist covering usage profiling, model tier routing, async-first design, and budget guardrails.
1. The problem is pricing structure, not unit price
When teams evaluate LLM APIs, the first instinct is usually to compare prices side by side: build a spreadsheet from each vendor’s pricing page and pick the cheapest one. Real bills rarely follow that logic. When several platforms offer identical pay-as-you-go rates, the price table stops being a differentiator, and what actually determines monthly spending becomes the structural differences in billing rules—how billing units are divided, whether async tasks are discounted, how committed-volume plans are credited, and how caching and region stack on top.
Abstracted out, the cost of a single call can be written as:
cost per call = (input tokens × input rate + output tokens × output rate)× discount factor (batch / off-peak / plan)- credit (free tier / in-plan allowance)cache hits are billed separately at the cache-hit rate
The discount factor and the credit are where bills start to diverge. Same unit price, different factor, and the bill can easily differ by 2x.
2. Seeing through “the same price table”
Assume a general-purpose model tier is listed at 20 CNY per million input tokens, 2 CNY for cache hits, and 100 CNY per million output tokens; a lightweight tier at 13 / 1.3 / 68 CNY; and a small-parameter coding tier at 6.5 / 1.3 / 27 CNY. Multiple platforms showing exactly the same pay-as-you-go rates at the same point in time is common in the industry: upstream model capabilities are unified, while downstream platforms mostly resell and host, so prices converge.
The right way to compare is therefore three steps:
- First confirm whether the model tier can be swapped. If the workload is not sensitive to output quality, moving to a lighter tier cuts cost by an order of magnitude—more effective than any discount.
- Then confirm whether the workload can be async. Only offline-capable tasks qualify for the discount factor.
- Only then look at credits and plans, and put stable baseline usage into a committed-volume plan.
3. Two rules that actually open up the gap
3.1 Batch processing: trading latency for price
The common approach is that async batch endpoints are billed at 60% of the standard rate, in exchange for the task entering a queue and results being returned within a limited time window—unsuitable for real-time paths. The test is simple: is the user waiting at a screen for this result? Log analysis, offline summarization, bulk labeling, evaluation runs, and data cleaning can all go through batch.
# Pseudocode: splitting real-time from offlinedef route(task):if task.user_waiting: # online paths such as chat and completionreturn call_realtime(task)else: # minute-level latency is acceptablereturn submit_batch(task) # qualifies for the discount factor
3.2 Committed-volume plans: turning volatility into fixed cost
Another rule is the token plan: pay monthly for a fixed allowance, usage within the allowance is no longer billed per token, and overage returns to pay-as-you-go rates. The value is not a lower unit price but converting unpredictable variable cost into a budgetable fixed cost, and such plans often come with more relaxed off-peak rules.
A practical rule of thumb: if a model’s monthly usage is stable and predictable, a plan plus overage usually costs less than pure pay-as-you-go; if usage is sparse or highly volatile, the plan degrades into a sunk cost.
4. Three frequently overlooked cost items
- Cache billing: repeated prefixes can hit the cache automatically, and the hit portion is billed at the cache-hit rate (roughly one tenth of the input rate), while only the miss portion is billed at the standard input rate. Multi-turn conversations, fixed system prompts, and repeated questions over long documents naturally see high hit rates. Note that caches have a lifetime, writes may be billed separately, and when the hit rate is unstable the gains can be offset by write costs.
- Model retirement: older-generation models usually stop opening to new users first, then are fully taken offline at a later date. Put the retirement date on the technical debt list, complete migration and regression evaluation ahead of time, and avoid quality swings from last-minute switching.
- Regional differences: the same model may cost about 10% more in non-core regions, and cross-border calls add network latency and compliance costs. Connecting nearby saves both money and latency.
5. Cost optimization checklist
- Build a usage profile: track input/output token ratios, cache hit rate, and peak/off-peak distribution per business line—no profile, no optimization.
- Implement tiered model routing: send simple intents to the lightweight tier and complex reasoning to higher tiers, setting thresholds with an evaluation set rather than gut feeling.
- Async first: default to offline, and escalate to real-time only when a user is waiting.
- Put the stable baseline on a committed-volume plan and burst traffic on pay-as-you-go.
- Keep prompt prefixes fixed to actively raise the cache hit rate.
- Set budget alerts and quota caps, and cut off anomalous calls immediately.
If an organization already runs workloads on a given cloud platform, using that platform’s model services nearby avoids extra data transfer overhead, and the cost is essentially the same as connecting directly to the model provider. Baidu AI Cloud’s recommendation for these scenarios is likewise to quantify workload characteristics first and then choose a billing model, rather than comparing unit prices first.
