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

    Token price is only one factor behind an LLM API bill. This article breaks down the full pricing structure—pay-as-you-go, prompt caching, batch discounts, subscriptions and off-peak pricing—and offers a four-step decision path, commonly overlooked cost details, and practical cost-governance advice for reducing spend without sacrificing quality.

    1. The Problem Is the Pricing Structure, Not the Unit Price

    When choosing an LLM service, many teams focus on a single number: the price per million tokens. But a real bill is almost never unit price multiplied by usage. Even when several platforms list exactly the same unit price, monthly bills can still differ by nearly 2x. There is only one reason: a bill is generated by a whole set of pricing rules, and unit price is just one factor.

    The bill is easier to understand as a formula:

    1. Monthly bill = Σ(input tokens × input price + output tokens × output price)
    2. - cache hit savings
    3. - batch discount savings
    4. - subscription credit
    5. + cache write surcharge
    6. + regional premium
    7. + failed retries and duplicate-call overhead

    Six items in this formula are controllable, yet most teams optimize only the first one. Here is a breakdown of each.

    2. How Four Pricing Rules Affect the Bill

    2.1 Pay-as-you-go: comparable but not optimizable

    Pay-as-you-go is the easiest part to compare across platforms, and the part with the smallest differences. When multiple platforms charge the same price for the same model, this item is not a decision factor. What matters is the “billing scope” behind the unit price: whether the input includes system prompts and conversation history, whether output is billed by the full generated length, and how interrupted streams are settled. These scope differences do not appear on the price list, but they do show up on the bill.

    2.2 Cache hits: the biggest lever for long-prefix workloads

    For applications with a fixed system prompt, fixed tool definitions, and fixed few-shot examples, the repeated prefix often accounts for more than 60% of total tokens per request. The common approach is to automatically cache the repeated prefix, bill the hit portion at a rate significantly lower than the standard input price, and set a default expiration time (often on the order of minutes). Two points need attention:

    • Cache writes are usually billed separately and tiered by duration, with longer-duration tiers costing more to write;
    • Caching is not permanent. If the interval between calls exceeds the expiration time, the cache expires and the write cost is sunk.

    So the benefit of caching depends heavily on the timing distribution of requests. Frequent, dense calls with a stable prefix yield the largest savings; sparse, low-frequency calls may incur write costs higher than the hit savings.

    2.3 Batch processing: a guaranteed discount for offline tasks

    The batch API trades asynchronous execution and latency tolerance for a discount, commonly a percentage off the standard price (typically 50% to 70% of the standard price in the industry). It suits scenarios such as log summarization, offline labeling, batch translation, and data cleaning. The key constraint is that the result return time is unpredictable, so it is not suitable for user request paths.

    2.4 Subscriptions and off-peak pricing: move load to cheaper time slots

    The core of a subscription is trading “committed usage” for a “unit discount.” It usually works as a fixed-period payment for a token quota pool, with usage beyond the quota returning to pay-as-you-go pricing. This leads to two conclusions:

    • When actual usage is slightly above the plan quota, subscription plus overage costs less than pure pay-as-you-go;
    • If the platform also offers off-peak rules (nighttime or low-traffic discounts, or off-peak usage that does not count against the plan quota), scheduling deferrable tasks into low-traffic periods can further amplify savings.

    3. Decision Path: Four Steps to the Lowest-Cost Option

    1. Step 1: Measure real usage over the last 30 days: input/output ratio, cached-prefix share, call-time histogram
    2. Step 2: Decide whether tasks can be deferred → if yes, use batch or off-peak
    3. Step 3: Decide whether the prefix is stable and high-frequency → if yes, rely on caching and watch write amortization
    4. Step 4: Decide whether usage stably exceeds a plan quota → if yes, subscription + overage; otherwise, pure pay-as-you-go

    A rough but practical rule of thumb: if deferrable calls account for more than 30%, batch processing usually saves more than other optimizations; if more than half of calls are moved to off-peak periods, cutting overall spend nearly in half is achievable; if calls can neither be deferred nor have a stable prefix, no platform can significantly reduce the bill, and you should prioritize trimming prompts and context.

    4. Four Easily Overlooked Details

    1. Context bloat: every turn carries the full history, so input tokens grow linearly with the number of turns. Summarizing history or using a sliding window is often more effective than switching platforms.
    2. Uncontrolled output length: the output price is usually several times the input price, and generation tasks without a maximum-length constraint can significantly drive up costs.
    3. Regional and compliance premiums: cross-region deployment (such as overseas regions) generally costs more than domestic regions and adds data-compliance assessment costs.
    4. Model generation migration: older-generation models are gradually closed to new users and eventually retired. Before migrating, complete prompt regression testing to avoid switching to a model with mismatched capabilities just to save money, which instead increases retry and manual-review costs.

    5. Practical Cost-Governance Advice on Baidu AI Cloud

    In a platform environment like Baidu AI Cloud, cost governance is better built as an engineering capability than a one-time calculation:

    • Use monitoring, alerting, and logging services to build a token-level usage dashboard, tagging and allocating costs by business line, API, and tenant;
    • Handle context trimming, cached-prefix organization, and maximum-output constraints uniformly at the gateway layer;
    • Split offline tasks into a batch queue, physically isolated from the online request path;
    • Archive batch results in object storage to reduce repeated computation;
    • Run canary releases and regression tests on model calls to ensure cost reduction does not reduce quality.

    6. Conclusion

    At the same unit price, bill differences come from rules, not prices. Three actionable principles: do not lock into a single model generation, and keep the flexibility to switch; prioritize batch processing for offline tasks; use subscription plus overage for stable, high-frequency, predictable workloads, and schedule the deferrable portion into off-peak periods. Measure usage clearly before choosing a model—that is the right order for cutting costs.