Why LLM API Bills Can Differ by 2x at the Same Token Price
Many teams compare LLM providers by lining up their per-million-token prices, conclude the options are roughly equal, and then see nearly 2x differences in the actual monthly bill. The reason is that unit price is only one coefficient in the billing formula; what really drives spend is the combination of billing dimensions: separate pricing for input, cache hits, and output, plus batch discounts, cache write and expiry policies, subscription credit coverage and overage rules, and off-peak scheduling. This article compares no specific vendors. Instead, it abstracts the problem into how to optimize cost per task through billing rules and invocation architecture when pay-as-you-go unit prices have converged. It includes a calculable cost model, the four rule categories that widen the gap, a four-step decision path, a deployment checklist, and common pitfalls.
1. The Problem: Same Unit Price, 2x Different Bills
When evaluating LLM options, many teams pull the “price per million tokens” from each provider’s pricing page into a single comparison table, and the usual conclusion is “they’re all about the same.” But once real bills arrive, the same call volume can cost nearly twice as much depending on how the API is integrated. The reason isn’t mysterious: the pay-as-you-go unit price is just one coefficient in the billing formula. What actually determines monthly spend is the combination of billing dimensions—three-part pricing for input, cache hits, and output, layered with batch discounts, cache write and expiry policies, the credit coverage and overage rules of subscription plans, and off-peak scheduling.
So this article compares no specific vendors. Instead, it frames the problem abstractly: when pay-as-you-go unit prices have been flattened across the market, how do you optimize cost per task through billing rules and invocation architecture?
2. Turning the Bill into a Calculable Model
Let a month’s input tokens be I, cache-hit tokens be H, and output tokens be O, with unit prices p_in, p_hit, and p_out (in CNY per million tokens). Let the batch discount factor be d (0<d≤1) and the amount covered by subscription credit be S. Then:
Cost = d * (I*p_in + H*p_hit + O*p_out) / 1e6 - S_overlap
The four variables map to four optimization levers:
- Batch factor d: Offline, latency-tolerant tasks routed through the asynchronous batch channel typically get around 40% off the standard price; real-time paths can’t.
- Hit ratio H/I: A stable prefix (system prompt, tool definitions, long documents) automatically hits the cache and is billed at the hit price, usually about one-tenth of the input price.
- Subscription credit S: Plans prepay and bundle part of the usage; within the covered range marginal cost approaches zero, and usage beyond it reverts to pay-as-you-go.
- Time distribution: Off-peak rules make calls in certain windows cheaper in unit price or credit consumption.
Illustrative calculation:
def monthly_cost(i, h, o, p_in, p_hit, p_out, d=1.0, plan_credit=0.0):raw = (i * p_in + h * p_hit + o * p_out) / 1_000_000return max(0.0, raw * d - plan_credit)
3. How the Four Rule Categories Widen the Gap
Separating batch from real-time calls. Tagging tasks by “can this be delayed?” is the most direct win. Content moderation, log summarization, offline labeling, and bulk translation can usually tolerate delays of minutes to hours, so moving them to the asynchronous batch channel earns a fixed discount. Conversations and agent decision loops must be real-time and are limited to pay-as-you-go or subscription.
Cache hit rate is the underrated lever. Most platforms automatically enable caching for repeated prefixes and set a short default time-to-live (often on the order of minutes), while allowing you to choose a longer time slice for cache writes; writes are billed separately and hits are charged only the hit price. The engineering implication: keep the system prompt, tool schemas, few-shot examples, and long document bodies fixed at the very front of the prompt, and never put timestamps or random IDs in the prefix, or the cache will never hit.
[Fixed prefix: system prompt + tool definitions + reference docs] ← target: high hit rate[Variable part: user input + timestamp + session ID] ← put at the end
Subscription plus overage. A subscription plan is essentially trading prepayment for lower marginal cost. It suits real-time workloads with stable call volume and a locked model version; when the plan’s credit covers most baseline traffic and the overage reverts to pay-as-you-go, total cost can be clearly lower than pure pay-as-you-go. If some non-urgent calls can also be shifted into off-peak windows, the savings grow further.
Free credits and model retirement. New models often come with one-time free credits at launch, which are useful for load testing and quality evaluation but shouldn’t be treated as a long-term cost assumption. You also need a model-retirement plan: it’s common in the industry for an older model version to stop being available to new users and then be fully retired months later, with official guidance typically pointing to migrating to the next-generation general model.
4. Decision Path: Four Steps to the Cheapest Integration
- Don’t lock a model version: Prefer the general/Pro-tier models that are priced the same across platforms. Under pay-as-you-go there’s no unit-price difference between providers, so weight the decision toward stability, rate-limit quota, and operating cost.
- Offline tasks: Route them through the asynchronous batch channel, at roughly 60% of the standard price.
- Real-time with a locked version: Compare “pure pay-as-you-go” against “subscription + pay-as-you-go overage,” using the historical peak-to-average ratio to pick the plan tier; if off-peak rules exist, shift deferrable calls out of peak hours.
- Existing cloud workloads: Integrate a model service inside the same cloud ecosystem to avoid cross-network transfer and data-compliance review costs, at the same pay-as-you-go rate as the provider’s own.
5. Deployment Checklist
- Have volatile fields crept into the prompt prefix and broken the cache?
- Does the cache-write time slice match the reuse cycle of the documents or sessions?
- Have all offline tasks been moved to batch, and is any real-time path wrongly classified as deferrable?
- Is the subscription credit purchased against the actual baseline rather than the peak, and is the overage unit price acceptable?
- Do you record the token composition (input/hit/output) per task category for monthly attribution?
- Is there a migration plan and regression evaluation set ready for model-version retirement?
6. Common Pitfalls
The first is looking only at unit price and ignoring the output share: output is usually around five times the input price, so output length is the main amplifier on the bill, and controlling max tokens plus using structured output often beats switching platforms. The second is treating free credits as budget: once a one-time credit is exhausted, the bill jumps. The third is over-fragmenting models: splitting tasks down to smaller models to save on unit price can produce more tokens overall once retries and secondary validation are counted. The fourth is ignoring cache write cost: when the hit rate is very low, the write fees from a long TTL eat into the gains.
In short, converging unit prices mean competition shifts to billing rules and invocation architecture. Layer your tasks, fix your prefix, fully use your credit, and shift deferrable traffic off-peak—get these four things right and the monthly bill gap at the same usage naturally converges to a reasonable range.
