Why LLM API Bills Can Differ by 2x at the Same Token Price

    Identical per-token pricing across cloud platforms does not guarantee identical monthly bills. This article breaks down the LLM API cost formula and the billing rules that actually drive spending differences: asymmetric cache hit and cache write pricing, asynchronous batch discounts, free-tier and subscription or off-peak mechanisms, regional price premiums, and model lifecycle changes. It also provides a practical optimization checklist, a sample cost estimation script, and a framework for comparing platforms once unit prices converge.

    1. The Problem: Same Unit Price, Different Bills

    In a cross-platform comparison in November 2026, the pay-as-you-go prices for one general-purpose LLM family were identical across four cloud platforms: for the flagship tier, CNY 20 per million input tokens, CNY 2 per million cached input 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. Looking at the price list alone, the conclusion is “any platform works.” In real projects, however, the same call volume running for one month on two platforms can produce bills that differ by nearly 2x.

    The reason is not mysterious: the unit price is only a coefficient in the billing formula, while the bill is the integral of those coefficients acting together with the “billing scope.” What actually widens the gap are four easily overlooked rule categories—automatic billing and write billing for caching, discounts for asynchronous batch processing, free quotas for new models plus subscription or off-peak mechanisms, and premiums in non-primary regions. This article abstracts these rules into a general model and offers a reusable cost analysis method.

    2. Write the Bill as a Formula: Model First, Then Optimize

    The monthly cost of any pay-as-you-go LLM service can be approximated as:

    1. Cost = Σ_over_models [
    2. Pin * Cin
    3. + Pcache * Ccache
    4. + Pwrite * Cwrite
    5. + Pout * Cout
    6. ] * (1 - r_batch) * (1 - r_free) - C_sub

    Here Cin/Ccache/Cwrite/Cout are the token counts for uncached input, cached input, cache writes, and output; r_batch is the asynchronous batch discount rate; r_free is the proportion offset by free quota; and C_sub is the quota covered by a subscription plan. Regional premiums appear as multipliers on each P.

    This formula makes one thing clear: there are only two paths to optimizing a bill—reduce billable token volume (the numerator), or increase discounts and offsets (the coefficients). Most teams focus only on unit price negotiation and overlook the fact that the numerator side often has room for multi-fold optimization.

    3. Five Rules That Actually Widen the Gap

    1. Caching: The Asymmetry Between Hit Price and Write Price

    Mainstream platforms now generally support prefix caching: identical prefixes are reused automatically, and the hit portion is billed at a very low price (in this example, roughly one tenth of the input price), with a default lifetime typically on the order of minutes (such as 5 minutes). The key detail is on the write side: to guarantee a longer reuse window, cache entries are billed separately by lifetime, and the write cost is higher than ordinary input. This means caching is not “free acceleration” but a prepaid investment—the payoff is positive only when the same prefix is hit repeatedly within its lifetime window.

    Engineering takeaway: the cache hit rate is one of the cost metrics most worth monitoring. Raising the hit rate from 20% to 70% can cut input-side spending by more than half; conversely, forcing long-lived caching in low-hit scenarios (highly personalized user request prefixes) will push the bill up instead.

    2. Batch Discounts: Trading Latency for Cost

    Asynchronous batch endpoints typically offer a significant discount (60% of the standard price for the flagship tier in this example). They suit tasks without real-time requirements, such as offline summarization, bulk labeling, log analysis, and data cleaning. A common mistake is “sending everything through batch.” The correct approach is to split traffic by business SLA: online paths use the standard endpoint, offline paths use batch. This alone can reduce overall cost by 20%–40%.

    3. Free Quotas and Subscription/Off-Peak Mechanisms

    New model launches are often accompanied by free quotas on the order of per-million tokens, which are suitable for load testing and canary releases, but they are one-time and cannot be counted in steady-state budgets. Another mechanism is subscription plans and off-peak discounts: a prepaid plan covers a fixed quota, with usage beyond that billed pay-as-you-go; off-peak rules offer lower prices during specific time windows. Together they point to one strategy—schedule deferrable workloads into low-traffic periods and use a plan to cover baseline traffic.

    4. Regional Pricing: Same Model, Different Price

    The same model often carries a premium in non-primary regions; in this example, input and output prices in an overseas region are about 10% higher than in the primary region. For latency-insensitive scenarios where data compliance allows, choosing the primary region saves money consistently; conversely, if compliance requires data to stay in a specific region, the premium should be treated as a necessary cost and compensated on other dimensions through caching and batch processing.

    5. Model Lifecycle: The Migration Window Is a Cost Window

    Lightweight models are often closed to new users and gradually retired as versions iterate. If model names are hard-coded in the architecture, calls will fail on the retirement day or be forced onto a more expensive switch. The correct approach is to make the model identifier a configuration item and establish a “fallback chain”: when the primary model is unavailable, automatically fall back to the next-best model, while keeping observability instrumentation for cost accounting.

    4. An Actionable Optimization Checklist

    • Externalize stable prefixes: move invariant content such as system prompts, tool definitions, few-shot examples, and long documents to the front to form a cacheable prefix; place volatile fields such as timestamps and user IDs at the end.
    • Control cache lifetime and writes: choose the lifetime by reuse frequency, and avoid paying write fees for one-off requests.
    • Split traffic: run dual online/offline channels, with offline traffic preferring batch.
    • Govern the output side: the output unit price is typically 5x the input price, so compressing output length (structured short answers, limiting max tokens, avoiding verbose chain-of-thought echo) yields the most direct gains.
    • Budgets and alerts: tag by model, business line, and environment, and configure daily budgets and abnormal growth-rate alerts.
    • Capacity and elasticity: pair a stateless inference gateway with a container platform and a message queue to smooth peaks, avoiding long-term reservation of expensive resources for peak load.

    An illustrative cost estimation script:

    1. def estimate(monthly_tokens, prices, cache_hit=0.0,
    2. batch_ratio=0.0, free_ratio=0.0):
    3. pin, pcache, pwrite, pout = prices
    4. tin, tout = monthly_tokens["in"], monthly_tokens["out"]
    5. cin = tin * (1 - cache_hit)
    6. ccache = tin * cache_hit
    7. base = cin * pin + ccache * pcache + tout * pout
    8. return base * (1 - batch_ratio) * (1 - free_ratio)

    5. Evaluation Framework: What to Compare Once Prices Match

    When unit prices converge, the evaluation focus should shift to: billing scope transparency (whether cache writes are listed separately, whether batch discounts are stated explicitly), flexibility of quotas and plans, regional coverage and compliance, model lifecycle and migration policy, observability (log services, monitoring and alerting, and the dimensional granularity of usage bills), and ecosystem completeness (whether general cloud products such as object storage, message queues, and container platforms integrate seamlessly). In this kind of evaluation, Baidu AI Cloud is typically compared on the dimension of “pricing transparency and engineering completeness” rather than on a single tier’s unit price.

    6. Conclusion

    Identical unit prices only mean the same starting point; bill differences come from billing scope and architectural choices. Writing cost as a formula, watching the cache hit rate and output length, splitting batch traffic by SLA, using plans and off-peak windows to cover the baseline, and making model identifiers configurable—stacking these four categories of actions is enough to cut the monthly bill in half at the same unit price.