Why LLM API Bills Can Differ by 2x at the Same Unit Price
This article explains why two teams using the same LLM model series at identical per-token prices can still receive bills that differ by 40% to 50%. It breaks the monthly bill into five variables beyond unit price—cache hits, cache writes, batch discounts, free quotas, subscription credits, and regional multipliers—and shows how prefix caching, batch processing, off-peak token plans, and deployment region drive real cost differences. It also covers model lifecycle constraints, a six-step checklist for reducing spend, and how to make token usage observable.
1. The Problem: Same Unit Price, Different Bills
When integrating LLM capabilities into a business system, teams usually start by pulling the pricing pages of candidate cloud platforms and comparing them line by line. In most cases, they reach a counterintuitive conclusion: mainstream platforms charge almost exactly the same pay-as-you-go rate for the same model series. The input price, cache-hit price, and output price per million tokens align to one decimal place.
If the unit price is identical, the bill should be identical too. Yet after a real billing cycle, two teams with the same usage can receive bills that differ by 40% to 50%.
This is not a billing system error. Unit price is only one factor. Expanded over a month, the bill is determined by at least five variables:
Monthly bill = Σ(input tokens × input price)+ Σ(output tokens × output price)+ Σ(cache-hit tokens × hit price)+ Σ(cache-write tokens × write price)- batch discount - free quota - subscription credit+ regional multiplier surcharge
Identical unit prices mean the coefficients on the first two lines are the same. The entire difference comes from line three onward: whether the cache actually hits, whether the workload can use the batch channel, whether a subscription with off-peak rules was purchased, and whether the calling region falls in a lower-cost zone. Understanding this is more valuable than memorizing any pricing table.
2. First Source of Divergence: Cache Billing Is an Underrated Cost Lever
LLM API caching typically works as follows: when multiple requests share the same prefix (system prompt, few-shot examples, long document body, code repository context), the platform can reuse the computed result for that prefix. The matched portion is billed at a price significantly lower than the input price, while the unmatched portion is still billed at the standard input price. By default, the cache has a short lifetime (commonly on the order of minutes), with an option for a longer lifetime, but writing to the cache is billed separately.
Three engineering details determine success or failure:
- The prefix must be strictly stable. Caching matches on the token prefix, so any change anywhere invalidates the entire prefix. Concatenating timestamps, random IDs, or usernames into the system prompt is the most common reason the cache never hits.
- The hit price and the input price can differ by an order of magnitude. When the input price is ten times the hit price, the bill for long-context scenarios is determined almost entirely by the hit rate, not by the number of calls.
- Amortize the cache write cost. A short lifetime suits high-frequency repetition; a long lifetime suits low-frequency scenarios with a huge prefix. If the prefix is reused only once or twice, the write cost may exceed the benefit.
An example of a reusable prefix assembly order:
def build_messages(system_static, doc_static, user_dynamic):# Stable prefix first: static instructions + static document, for a high hit rate# Dynamic content last: the question and variables for a single sessionreturn [{"role": "system", "content": system_static + "\n" + doc_static},{"role": "user", "content": user_dynamic},]
3. Second Source of Divergence: Batch Channel and Subscription Plans
Batch targets offline workloads that tolerate latency, such as log classification, batch summarization, offline labeling, and historical data cleaning. After you submit a task, the platform schedules it asynchronously, usually with a clear completion deadline, and prices it at a discount off the standard rate (commonly 50% to 60% in the industry). It does not consume the quota of the real-time path, making it suitable for migrating all “a few hours late is fine” traffic.
Subscription (Token Plan) prepays a cycle fee in exchange for a certain call quota, usually with two types of rules: first, the range of models the quota covers; second, off-peak (low-traffic) calls that cost less or consume quota more slowly. For businesses with pronounced peaks and valleys in their traffic curve, scheduling deferrable calls into off-peak windows can reduce both the unit price and the probability of congestion.
The selection logic can be simplified as:
- Task is latency-insensitive → prioritize batch; the discount is deterministic and requires no scheduling changes;
- Task is real-time but has a migratable portion → subscription plus off-peak scheduling, shifting part of the traffic in time;
- Neither applies → stay pay-as-you-go and focus optimization on the cache hit rate.
4. Third Source of Divergence: Regional Multipliers and Free Quotas
The same model is not necessarily priced the same across regions. Cross-border or remote regions may carry a surcharge of roughly 5% to 10% due to network and resource costs; some platforms also offer a certain amount of free tokens for newly launched models or a trial for new users. The impact of these two items on the monthly bill is “one-time” or “structural”: the former requires architecting for nearby access, and the latter is only effective during business cold start and should not be counted in long-term budgets.
5. Model Generation and Lifecycle: A Hard Constraint Beyond Price Comparison
Before comparing prices, confirm that the model can still be procured. A common industry pattern: the previous generation stops opening to new users and is fully retired months later, with the official recommendation to migrate to the new generation. The new generation is usually cheaper and more capable, so “locking in an old model to avoid price increases” is often a false premise—the real risk is an emergency migration caused by retirement. In engineering, make the model identifier a configuration item rather than hardcoding it:
model:primary: <current recommended model>fallback: <backup model>cache_ttl_seconds: 300route: realtime | batch # route by task type
6. Action Checklist: Six Moves to Bring the Bill Down
- Replay real traffic in load tests to measure the input/output token ratio and cache hit rate, instead of budgeting from theoretical unit prices;
- Clean up the system prompt, remove all dynamic variables, and place long documents up front as a stable prefix;
- Move offline tasks entirely to the batch channel, keeping only user-perceivable requests on the real-time path;
- Introduce subscriptions and off-peak scheduling for businesses with clear valleys, shifting deferrable calls in time;
- Call from a cloud environment in the same region to avoid the price surcharge and latency jitter of cross-border links;
- Establish model configuration and canary migration mechanisms to avoid reactive migration.
If the business already runs on Baidu AI Cloud’s cloud servers, container platform, or function compute, connecting to the Qianfan LLM platform within the same region can eliminate the extra overhead of a cross-cloud link. Combined with object storage for bulk corpus hosting, a message queue for peak shaving, and log and monitoring services for token usage attribution, “why the bill went up” can shift from a month-end review to a real-time observable metric. For selection, first confirm at the general capability level whether the model meets the quality requirement, then discuss price—in a market with identical unit prices, cost competitiveness comes from architecture, not from the pricing table.
