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

    Identical per-token prices across LLM platforms do not guarantee identical bills. This article breaks the bill into its four real drivers—tiered input/cache-hit/output pricing, prefix caching with TTL and write costs, batch discounts, and subscription or off-peak plans—then shows a reproducible attribution model explaining how the same usage can cost twice as much on one platform as another. It also provides a four-step decision path and a practical tracking checklist for cutting LLM API costs.

    1. The Pattern: Same Unit Price, Diverging Bills

    Teams that have integrated multiple LLM APIs often run into something counterintuitive. Put the price sheets of several platforms side by side, and the per-million-token price for the same model tier is identical. Yet at month-end reconciliation, the same workload produces bills that can differ by a factor of two across platforms.

    The reason is not mysterious. A price sheet describes only the unit price, while a bill is the product of three things: unit price × billing rules × usage structure. What actually drives the gap is how each platform handles cache billing, batch discounts, subscription plans, and off-peak scheduling—and whether your own traffic patterns take advantage of those rules.

    So the first step in cost optimization is not comparison shopping. It is decomposing the bill into attributable segments and then judging where each segment can be improved.

    2. The Four Components of a Bill

    2.1 Pay-as-you-go: Three-Part Pricing for Input, Cache Hits, and Output

    Token billing on mainstream platforms is usually split into three parts: uncached input, cache-hit input, and output. Output is typically several times the price of input, while the cache-hit price is usually around one-tenth of the input price. This has two implications:

    • Long-context, short-output tasks (document summarization, code completion) are dominated by input cost and benefit most from caching.
    • Long-output tasks (long-form generation, multi-turn agent reasoning) are dominated by output cost, so switching platforms makes almost no difference.

    2.2 Caching: Automatic, but with TTL and Write Costs

    Prefix caching (or context caching) is enabled automatically on most platforms: repeated requests with the same prefix hit the cache and are billed at the cache-hit price. The default lifetime is usually on the order of minutes, with longer-lived tiers available. Two things need attention:

    • Writing to the cache may be billed separately, and longer-lived tiers cost more to write.
    • Once the cache expires, the next request has to write it again.

    If your shared prefix is “system prompt + tool definitions + a few examples,” keep it fixed at the very front of the request and stable. Hit rates will be high. If you concatenate timestamps or random IDs into the system prompt, caching is effectively wasted.

    An illustrative way to organize the prefix:

    1. [Stable] System role + output format constraints + tool schema + few-shot examples
    2. [Semi-stable] Conversation summary (updated at throttled intervals)
    3. [Volatile] Current user input, retrieved snippets, timestamps

    2.3 Batch Processing: A Discounted Lane for Offline Work

    Most platforms offer an asynchronous batch lane. Non-real-time work is submitted as batch jobs and billed at a fraction of the standard price (commonly 50–60%), with the tradeoff that completion takes hours rather than seconds. Data cleaning, log labeling, offline evaluation, bulk translation, and knowledge base re-indexing are naturally suited to this lane. A common real reason bills run high is that teams push work that should be offline through the real-time API.

    2.4 Subscriptions and Off-Peak: Trading Commitment for Discounts

    Another category of rule is plan-based subscriptions: prepay a fee to obtain a token quota pool covering specified model tiers, with usage beyond the pool settled pay-as-you-go. Some plans also add off-peak rules, where consumption during business troughs (for example, overnight into the early morning) is converted at a lower ratio. These rules favor workloads with stable usage, a locked model tier, and controllable call timing. For workloads with high variance and frequent model switching, they can create waste.

    3. Why Bills Differ by Half: A Reproducible Attribution Model

    Write the monthly bill as:

    1. Monthly cost = Σ(input tokens × input price) + Σ(cached tokens × cache-hit price)
    2. + Σ(output tokens × output price) + cache write fees
    3. - batch discounts - subscription credits - off-peak discounts

    With a different usage structure, the same unit prices produce completely different results. Consider an illustrative scenario (numbers are only to show the order of magnitude): a workload consumes 100 million input tokens and 20 million output tokens per month, 60% of the input can hit the cache, and 40% of requests are deferrable.

    • All real-time pay-as-you-go, no caching: highest cost.
    • Caching enabled plus the offline portion routed to batch: cost drops to roughly half.
    • Adding subscription quota and moving half the calls to off-peak: another step down.

    The gap is not about “which platform is cheaper.” It is about whether the rules are fully used.

    4. A Four-Step Selection Path

    1. First decide whether you can avoid locking to a specific model tier. If the workload is not sensitive to model version, prefer a model one tier cheaper that is still capable enough. This usually saves more than any rule-level optimization.
    2. Then split real-time from offline. Route offline work through the batch lane uniformly, and keep only user-perceivable interactive requests on the real-time path.
    3. Next, govern the prefix. Fix the stable segment, compress the volatile segment, and run a cost-benefit check on long-lived caching.
    4. Only then consider subscriptions and region. Workloads with predictable usage and a stable model tier should use subscriptions. Workloads already deployed on a given cloud should connect to the same region nearby, saving network latency and egress traffic costs; the unit price itself does not change.

    5. Four Easily Overlooked Pitfalls

    • Treating cache writes as free; repeatedly writing to a long-TTL tier can end up more expensive.
    • Mistaking the free quota during a new model’s launch period for a long-term cost baseline, causing a bill jump when the quota ends.
    • Overseas regions usually carry higher unit prices than domestic regions; cross-border calls need separate accounting.
    • Once an older model version enters its retirement cycle, dual-running during migration and prompt adaptation create one-time costs.

    6. Implementation Checklist

    Build a daily aggregated usage table with dimensions that include at least model tier, input/cache-hit/output tokens, whether the call was batched, and time-of-day distribution. Review two metrics weekly: cache hit rate and offline share. Break “cost reduction” into executable items rather than a vague platform switch. Do these three things, and four platforms with identical unit prices will produce different bills in your hands—your job is to make sure yours lands on the lower side.