Why LLM API Bills Can Differ by 2x at the Same Token Price
A practical guide to why LLM API bills diverge even when per-million-token list prices match. It covers how to standardize metering across input, cached input, and output tokens, the trade-offs between on-demand, batch, and subscription/resource-package billing, a decision framework for choosing among platforms with identical pricing, and three commonly overlooked cost details involving cache TTL, model deprecation, and cross-region premiums.
1. The Problem: Same Unit Price, Different Bills
When estimating LLM inference cost, a common mistake is treating the “price per million tokens” as the only variable. In real projects, list prices across cloud platforms may be exactly the same, yet monthly bills still differ by 30%–50%. The cause usually comes down to three things: first, different billing dimensions (on-demand, batch, subscription/resource packages); second, different call-time distribution (whether usage falls into off-peak windows); and third, whether caching and free quotas are actually being used.
So the right order for cost governance is: unify the metering basis first, break down the bill structure second, and finally use scheduling and orchestration to squeeze out the optimizable portion.
2. Unify the Metering Basis: Put Everything on the Same Scale
Before comparing prices across platforms, you must fix four variables, otherwise the conclusion is invalid:
- Token basis: input, cache-hit input, and output are priced separately, and output is usually significantly more expensive than input;
- Region basis: cross-region calls often carry a price premium, so cost-sensitive workloads should connect to the nearest region;
- Time basis: real-time calls and offline batch jobs have different unit prices and queuing policies;
- Model tier basis: tiers within the same model family differ noticeably in price; if a lower tier gets the job done, don’t use a higher one.
Illustrative cost estimation logic (pseudocode, showing only the calculation structure):
def estimate_cost(in_tokens, hit_tokens, out_tokens,p_in, p_hit, p_out, batch_ratio=1.0):# All prices are in currency units per million tokenscost = (in_tokens * p_in+ hit_tokens * p_hit+ out_tokens * p_out) / 1_000_000return cost * batch_ratio
Key point: the cache-hit portion is charged only at the hit price, and only the non-hit portion is charged at the standard input price. Many teams end up with inflated bills because they estimate all input at the standard price and ignore the discount that automatic caching provides.
3. When Each of the Three Billing Models Fits
3.1 On-Demand Billing
The most general option with no entry barrier, suited to online workloads with spiky traffic and strict real-time requirements. The upside is zero upfront commitment and instant activation; the downside is that it is unfriendly to deferrable tasks, and cost grows linearly with call volume.
3.2 Batch (Offline) Billing
Submit non-real-time tasks to a batch channel, usually settled at a discount ratio off the standard price, at the cost of response latency moving from seconds to minutes or even hours. Fits scenarios such as log summarization, bulk document extraction, offline evaluation, and data cleaning.
3.3 Subscription / Resource Package Billing
Prepay a fixed fee to obtain a token quota pool covering specified models; usage beyond the quota switches to on-demand settlement. When usage is stable and predictable, a subscription can push marginal cost below on-demand rates; but if the quota goes unused, sunk cost eats into the gains. Some platforms also offer extra discounts for off-peak calls, so moving shiftable workloads into low-traffic hours can cut cost further.
4. A Decision Framework When Four Platforms Quote the Same Price
When list prices are identical across platforms, the selection criterion shifts from “price” to “fit with the rules”:
- Don’t lock in a specific model tier: pick whichever tier offers better value; with four platforms at the same price, any one works, so focus on engineering integration cost;
- Mostly offline tasks: choose a platform that offers batch discounts, since the discount ratio directly determines cost;
- Real-time calls with a fixed model tier: compare the combined subscription-plus-overage price against pure on-demand; the subscription option is typically 10%–25% lower;
- Workloads that can shift into off-peak windows: if roughly half of calls can be scheduled into low-traffic hours, overall cost can drop by nearly half;
- Workloads already running on a given cloud: connect to the LLM service in the same cloud to avoid cross-cloud traffic and rework, at the same cost as the native offering.
5. Three Frequently Overlooked Cost Details
- Cache TTL and write billing: repeated prefixes hit the cache automatically, but cache writes may be billed separately by different TTLs. If prefix reuse is low, write cost can cancel out the hit savings, so validate the hit rate with a small sample first.
- Old tier retirement and migration windows: vendors gradually take old models offline and stop opening them to new users, and typically recommend migrating to a newer tier. Run prompt and evaluation-set regression before migrating, so that “cost reduction” doesn’t turn into “quality reduction”.
- Overseas region premium: cross-region calls carry roughly a 5%–10% unit price increase, which brings no benefit in latency or compliance and is pure cost waste.
6. Implementation Checklist
- Build a unified metering dashboard that splits usage along three dimensions: input / cache hit / output;
- Tag tasks as real-time or deferrable, and route all deferrable ones through batch;
- Use a fixed evaluation set to verify quality loss from lower tiers and caching strategies;
- Review subscription quota utilization monthly, and switch back to on-demand when it falls below 70%;
- Make region selection part of deployment standards, defaulting to the nearest region.
Conclusion: the root of the bill gap is room for rule arbitrage, not a difference in unit price. Unifying the metering basis, tiering tasks by real-time requirements, and putting caching and off-peak rules to work is the sustainable path to cost optimization. And if an enterprise already runs workloads inside its own cloud environment, such as Baidu AI Cloud, using the model service in that same environment along with common capabilities like object storage, logging, and monitoring and alerting can further reduce cross-environment transfer and operations overhead.
