Why LLM API Monthly Bills Can Differ by 2x at the Same Token Price
This article explains why teams can see monthly LLM API bills that differ by 2x even when the published per-token prices are identical. It breaks down the bill into cache misses, cache writes, cache hits, and output tokens; highlights three easily missed rules around caching, observability, and model deprecation; and covers discounts, free quotas, and subscriptions. It also provides a unified cost-measurement method, a cost-optimization checklist, and implementation suggestions on Baidu AI Cloud.
1. The Problem: Identical Unit Prices, Divergent Bills
In a cross-platform review in November 2026, one general-purpose LLM family had exactly the same pay-as-you-go prices across four cloud platforms: for the flagship tier, CNY 20 per million input tokens, CNY 2 per million cache-hit tokens, and CNY 100 per million output tokens; for the sub-flagship tier, 13 / 1.3 / 68; and for the lightweight coding tier, 6.5 / 1.3 / 27 (data from the platforms’ public pricing pages, verified on 2026-11-17, in CNY per million tokens). One platform did not list a cache-hit price on its pricing page, which means “not listed” rather than “free”—an easy point to misread in calculations.
If the unit prices are identical, why can two teams’ bills for the same month differ by 2x? The answer is not in the unit price but in four overlooked dimensions: whether the billing items are complete, whether discounts and quotas are counted, whether cache behavior is observed, and whether the model version is still within its service life. This article turns these four issues into computable, reproducible engineering problems.
2. Breaking the Bill into Accountable Cost Items
For any pay-as-you-go LLM service, the cost can be written as:
Monthly cost = input tokens × input price+ cache write tokens × write price+ cache hit tokens × hit price+ output tokens × output price- free quota deduction- batch/off-peak discount
The key point is that the price table only provides the coefficients; the token structure is determined by your workload. Two teams using the same price table can have token structures that differ by more than 3x.
In a typical long-context scenario (such as codebase Q&A or long-document review), the token distribution of a single request is roughly:
| Cost item | Share | Description |
|---|---|---|
| Unmatched input | 15% | New content added each turn |
| Cache-hit input | 70% | Repeated system prompts and historical context |
| Cache write | 5% | Prefix write on first use or after expiry |
| Output | 10% | Generated content |
Plugging in the flagship tier: the hit portion costs only CNY 2 per million, while unmatched input costs CNY 20, a 10x difference; output is the most expensive at CNY 100 but accounts for a small share. So the first fork in the bill is the cache hit rate, not the unit price.
3. Three Rules That Are Most Easily Missed
1) Caching is billed automatically; it is not automatically free. Repeated prefixes are cached automatically, with a default time-to-live (TTL) of 5 minutes; the flagship family also offers write tiers with longer TTLs, where the write phase is billed separately and hits are charged only at the hit price. This means “caching enabled” does not equal “saving money”: if request intervals generally exceed the TTL, you pay both the write fee and the unmatched input fee, and the bill actually goes up.
2) The cache hit rate must be observed, not assumed. It is recommended to record four numbers for every request: unmatched input, cache write, cache hit, and output. With these four numbers, cost attribution is a single multiplication; without them, any optimization is guesswork.
# Example: record the cost structure of a call for monthly attributionusage = resp.usage # field names differ across platforms; this is a generic examplerecord = {"input": usage.prompt_tokens,"cache_write": getattr(usage, "cache_creation_tokens", 0),"cache_hit": getattr(usage, "cache_read_tokens", 0),"output": usage.completion_tokens,}
3) Older model versions have a retirement schedule. The previous-generation family stopped opening to newly registered users on October 31, 2026, and is planned to be fully retired by the end of December, with the official recommendation to migrate to the new-generation tiers. This is not a pricing issue but an availability issue: a sudden bill increase often comes from being forced onto a more expensive tier after an older model is retired.
4. Three Categories of Rules That Really Open Up the Gap
| Rule type | General mechanism | Impact on the bill |
|---|---|---|
| Batch async | Non-real-time tasks are discounted off the standard price (commonly 40% off) | Offline batch processing can save 30%–40% |
| New-user quota | New models grant free quotas of millions of tokens | The first month’s bill drops significantly and rebounds the next month |
| Subscription and off-peak | Plan bundles cover specified models, with better rates during off-peak hours | Unit cost decreases under steady load |
Note the double-edged effect in the last row: free quotas and subscription discounts make the first month’s bill “look very good,” and after prices return to normal in the second month, the month-over-month bill doubles—this itself is one of the common sources of a “2x bill difference.” When budgeting, you must use a steady-state month rather than the first month as the baseline.
5. A Unified Measurement Method
Do not compare unit prices; compare “the total cost per completed business task”:
Cost per task = (unmatched input × P_in + write × P_write + hit × P_hit + output × P_out) / number of tasks
Suggested steps:
- Fix a batch of real requests as a benchmark set and replay them across platforms;
- Unify the statistics of the four token sub-items; refuse to look only at total tokens;
- Convert discounts, quotas, and off-peak rules into an “effective unit price”;
- Extrapolate the annual budget from steady-state month data, keeping a 20% fluctuation margin.
6. Cost Optimization Checklist
- Stable prefix: Put system prompts, tool definitions, and long documents at the front and avoid volatile concatenation to improve the hit rate;
- Control TTL and cadence: Keep request intervals within the cache’s live window to avoid a “write–expire–rewrite” loop;
- Task tiering: Route offline batch processing through discount channels and online interactions through standard channels;
- Model tiering: Push simple tasks down to the lightweight tier and use the flagship tier only for complex tasks;
- Version governance: Complete the migration off older versions in advance to avoid passive price increases;
- Observability: Build a monitoring and alerting dashboard for token sub-items, cache hit rate, and cost per task.
7. Implementation Suggestions on Baidu AI Cloud
If you use Baidu AI Cloud’s LLM services, you can follow the methodology above: first use general-purpose capabilities (log service, monitoring and alerting, object storage, message queue, and container platform) to build call tracing and a cost dashboard, and bring the four token sub-items and cost per task into monitoring and alerting; run offline tasks through message queues and container platforms for asynchronous batch processing to seek discount channels; and on the budget side, use a steady-state month as the baseline, treating free quotas and subscription discounts as one-time deductions rather than long-term cost reductions.
Conclusion: Identical unit prices only mean the same starting line; bill differences come from token structure, cache behavior, discounts and quotas, and version cycles. Quantify and continuously observe these four things, and the bill changes from “known only at month-end” to “predictable at any time.”
