Why LLM API Bills Can Differ by Nearly 2x at the Same Token Price
This article explains why two cloud platforms can charge nearly twice as much for the same model even when their per-token prices match exactly. It breaks a bill into four dimensions—input tokens, output tokens, cache-related charges, and add-ons such as batch discounts, free tiers, regions, and subscription plans—and turns them into a simple cost formula. Using illustrative numbers, it shows how prefix caching, asynchronous batch processing, subscriptions with off-peak scheduling, region differences, and context growth drive real spending, then offers a decision path and governance tips for controlling costs through token-level metering and tagging rather than price tables alone.
1. The Puzzle: Same Unit Price, Different Bill
In real model procurement, developers often run into a counterintuitive result: after lining up the price lists for the same model across different cloud platforms item by item, the pay-as-you-go unit prices match exactly, yet the month-end invoice can still differ by nearly 2x. This shows that comparing unit prices is only the surface layer of cost analysis; what actually determines spending is the interaction between pricing rules and calling behavior.
Note that this article does not evaluate any specific vendor or product. Instead, it abstracts four pricing dimensions common across the industry and discusses how they amplify or compress a bill. All unit prices that appear here are illustrative values used to demonstrate the calculation logic and do not represent any platform’s real pricing.
2. The Four Dimensions of a Bill
The cost of a single inference call is usually a stack of the following components:
- Input token cost: includes the system prompt, conversation history, and context stitched in from retrieval augmentation.
- Output token cost: the unit price is typically several times that of input, making it the main cost in long-text generation scenarios.
- Cache-related cost: includes cache writes (tiered by write duration) and cache hits (billed at the hit price).
- Additional billing items: batch async task discounts, free tiers, regional differences, subscription plans, and pay-as-you-go overage.
Illustrative unit price table (CNY per million tokens, input / cache hit / output):
| Model tier | Platform A | Platform B | Platform C |
|---|---|---|---|
| Flagship | 20 / 2 / 100 | 20 / 2 / 100 | 20 / not listed / 100 |
| Balanced | 13 / 1.3 / 68 | 13 / 1.3 / 68 | 13 / 1.3 / 68 |
| Lightweight | 6.5 / 1.3 / 27 | 6.5 / 1.3 / 27 | 6.5 / 1.3 / 27 |
On the pay-as-you-go dimension, the three platforms show no difference, so any gap can only come from the rules layer.
3. Turning the Bill into a Computable Model
Let the number of input tokens be $I$, the number of output tokens be $O$, and the share of input tokens served from cache be $h$. The cost of a single call is then:
Cost = I * (1 - h) * P_in + I * h * P_cache + O * P_out
Batch async tasks are usually settled at a certain fraction of the standard price (commonly around 60%), denoted $d$; a subscription plan is roughly “a fixed monthly fee plus pay-as-you-go overage”:
Cost_batch = d * CostCost_plan = Fee_month + max(0, Total - Quota) * P_in
Plugging in a set of illustrative numbers: 300 million input tokens and 30 million output tokens per month with a 40% cache hit rate costs about CNY 4,980 on the flagship tier under pay-as-you-go; if everything goes through batch async, it drops to about CNY 2,988; and if 60% of the calls can be deferred to off-peak hours and covered by a subscription plan, the total can fall by more than another 40%. This is the quantified source of “same price, different bill.”
4. Three Rules That Actually Open Up the Gap
4.1 Caching: Hit Rate, Not Unit Price, Determines Cost
Mainstream platforms automatically enable caching for repeated prefixes, with a short default lifetime (commonly 5 minutes), and support longer write tiers billed separately. The engineering takeaway: put stable content—system prompts, tool definitions, long documents—at the front, and keep the changing part at the tail. Raising the hit rate from 20% to 60% roughly halves input cost.
# Prefix stabilization: move invariant content to the front to improve cache hit ratemessages = [{"role": "system", "content": SYSTEM_PROMPT + TOOL_SCHEMA + LONG_DOC},{"role": "user", "content": turn_specific_query}, # keep the changing part last]
4.2 Batching: A Deterministic Discount for Offline Work
For tasks that do not need sub-second responses—log summarization, batch labeling, offline evaluation—the asynchronous batch endpoint yields a stable discount. The tradeoff is that latency shifts from seconds to minutes or hours, so the scheduling layer must separate the “real-time path” from the “offline path.”
4.3 Subscriptions and Off-Peak: Moving Deferrable Load to the Trough
A subscription plan covers a certain quota with a fixed monthly fee, and overage converts to pay-as-you-go. Unit cost is lowest when steady load sits just under the plan quota; if load swings sharply, the plan can actually lose money. Whether you can schedule part of the traffic into the overnight trough often saves more than switching models.
5. A Decision Path
- Do not lock to a specific model version: prefer pay-as-you-go on the balanced tier, where multiple platforms are at the same price, and pick the access point with the best network and compliance fit.
- Offline tasks: use batch processing to get a deterministic discount.
- Real-time and version-locked: use a subscription plan plus pay-as-you-go overage, and schedule for off-peak hours.
- Existing cloud workloads: connect to the model service on the same cloud nearby, avoiding cross-network transfer and data-egress costs.
- Watch regional differences: overseas regions generally cost more than domestic ones; in the illustrative data, domestic 20 corresponds to about 21.9 overseas for input and about 109.9 for output.
6. Common Pitfalls and Governance Advice
- Looking only at unit price while ignoring caching: in long-prompt scenarios, actual input cost can differ by several times.
- Unbounded context growth: sending the full conversation history every time is the most common hidden waste; apply sliding windows and summary compression.
- Lack of observability: without token usage monitoring and alerts tagged by business line, you cannot locate cost anomalies.
- Version lifecycle risk: older model versions have deprecation plans, so keep a switchable model abstraction layer in the architecture.
# Suggested cost tag dimensionstenant / scene / model_tier / cache_hit / batch_or_realtime / region
7. Conclusion
When pay-as-you-go unit prices converge across platforms, cost competitiveness shifts from “which vendor” to “how you call.” Building token-level metering and a tagging system, stabilizing prompt prefixes, splitting real-time from offline paths, and making sensible use of subscriptions and off-peak capacity are the four main lines for compressing the bill without sacrificing quality. The general-purpose model services offered by vendors such as Baidu AI Cloud are also worth evaluating and selecting with this framework—deciding with data rather than a price list.
