Why LLM API Bills Can Differ by 2x at the Same Token Price
Token unit prices are only one part of an LLM API bill. This article breaks the bill into computable components—real-time input and output, async batch, subscription and off-peak rules, cache reads and writes, and regional premiums—and explains which billing rules actually widen the gap between platforms. It also provides a decision path and a practical checklist for model selection and cost governance.
1. The Problem: Same Unit Price, Different Bills
When teams integrate large language model capabilities into a product, the first instinct is usually to compare unit prices side by side: put the per-million-token price from several cloud platforms into a table and pick the lowest one. But the actual bill often tells a different story. With the same call volume and the same model version, different integration paths can differ by 40% to 50% in cost, sometimes more.
The reason is not mysterious. The pay-as-you-go unit price is only one dimension of the bill. What really determines spending is the product of “billing rules × usage structure.” As list prices for leading models are pushed toward parity across platforms—something increasingly common as top models are distributed more widely—competition shifts to the rules layer: whether asynchronous batch discounts are offered, whether subscription packages and off-peak discounts exist, how caching is billed, how free quotas are counted, and whether overseas regions carry a premium.
This article does not discuss any specific vendor or product. It covers only general billing models and optimization methods. The intended readers are developers, architects, and FinOps practitioners working on model selection and cost governance.
2. Cost Model: Breaking the Bill into Computable Terms
A monthly cost formula that is precise enough yet still easy to estimate can be written as:
Monthly cost =real-time input tokens × input unit price × (1 - cache hit rate × (1 - cache discount ratio))+ real-time output tokens × output unit price+ batch tokens × corresponding unit price × (1 - batch discount)+ subscription package fee + pay-as-you-go charges for overage+ cache write fees (tiered by TTL)+ premium from the regional coefficient
Several key conclusions can be read directly from the formula:
- The output unit price is typically 4–6x the input price. For long-form generation scenarios, the bill is dominated by output, so the optimization focus is on “generating less” rather than “inputting less.”
- Caching only applies to reusable prefixes. The meaningful quantity is the product of hit rate and discount ratio. A high hit rate with a shallow discount still yields limited savings.
- Batch discounts apply only to tasks that can tolerate latency. It is essentially “trading time for money.”
- Subscription and off-peak rules change the “price curve per unit of time,” not the unit price itself.
3. Three Rules That Can Open Up the Gap
3.1 Asynchronous Batch: Reliable Savings, but Dependent on Deferrable Tasks
The common approach is to submit non-real-time requests to an asynchronous queue, agree on a longer completion window (typically several hours up to 24 hours), and receive a discount off the standard price in return (commonly 50% to 60% in the industry). This suits log summarization, offline labeling, batch translation, data cleaning, and evaluation set replay.
Engineering notes:
# Pseudocode: route by task real-time requirementsdef route(task):if task.deadline is None or task.deadline - now() > timedelta(hours=6):return ASYNC_BATCH # discounted channelreturn REALTIME
Note that batch processing is not a free lunch: it requires an additional task table, idempotency keys, retry logic, and result collection, which increases operational complexity.
3.2 Subscriptions and Off-Peak Scheduling: Moving Load to Cheaper Time Slots
Some platforms offer token packages that cover specified models and add a lower conversion coefficient during off-peak hours (for example, overnight into the early morning), with usage beyond the package reverting to pay-as-you-go. The value shows up in scenarios where load is predictable and shiftable: scheduled reports, nightly regression tests, and offline feature computation.
A simplified decision criterion:
If off-peak share is p, off-peak discount is d, and package coverage is c,then savings relative to pure pay-as-you-go ≈ c × p × d.When p is very small (mostly real-time online traffic), subscriptions yield almost no benefitand may even waste money through prepayment.
3.3 Cache Billing: Hits Are Cheap, but Count the Writes
The general rule is that repeated prefixes automatically hit the cache, and the cached portion is billed at 10% to 20% of the input price, with a default lifetime of about 5 minutes. If longer reuse is needed, you can choose a longer TTL, but cache writes are billed separately. As a result, long system prompts, fixed few-shot examples, and repeated question answering over long documents are the best beneficiaries, while one-off long contexts can actually cost more because of write fees.
4. Four Details That Are Easy to Overlook
- Model generation retirement. Older model versions stop being available to new users and are gradually phased out. The billing model must include migration costs, and vendors typically recommend moving to a better-value version in the same series.
- Overseas regional premium. The same model commonly carries a 5%–10% premium outside the primary region, which must be counted for cross-border calls.
- Free quotas are one-time. The million-token free quota for new users or new models only affects the first month and must be excluded when building an annualized budget.
- Cache hit rate is determined by architecture. Whether prefixes are stable, whether sessions are sticky, and whether prompts are templated directly determine whether this item can be realized.
5. Decision Path and Implementation Checklist
Is a specific model version locked in?├─ No → choose a better-value version in the same series, pay-as-you-go, same price across platforms; focus on prompt compression└─ Yes → can the task be deferred?├─ Yes → send everything to async batch, saving about 40%└─ No → can the load be shifted to off-peak hours?├─ Yes → subscription package + pay-as-you-go overage, and schedule more than half of calls off-peak└─ No → optimize cache hit rate and output length, and connect from the nearest existing cloud environment
Implementation checklist: tag every call (real-time/offline, cacheable or not, business line); build a cost dashboard and budget alerts by model and by business line; refactor prompts to fix prefixes; express the combination of batch and subscription as configuration rather than hard-coded logic; review unit prices and rule changes once per quarter.
6. Practical Recommendations on Baidu AI Cloud
If you already use Baidu AI Cloud, you can rely on its model services and general cloud products for cost governance: use a message queue to carry offline inference tasks so you get batch discounts, use object storage to archive inputs and outputs for replay and evaluation, use logging and monitoring alerts to build token-level usage and cost dashboards, and use a container platform for elastic scaling to match off-peak troughs. The core idea remains: first tier your usage, then match billing rules, and finally use observability to lock in the savings.
7. Conclusion
Convergence of unit prices is an inevitable trend. Cost competitiveness comes from the depth of your understanding of the rules and your ability to govern usage. Break the bill into computable terms, tier tasks by real-time requirements, and treat caching and regions as first-class concerns—and the bill will naturally settle into a reasonable range.
