Why the Same LLM API Rate Card Produces Different Bills — and How to Control Costs

    LLM API pricing looks identical across cloud platforms, yet monthly bills often diverge widely. This article explains how caching, batch processing, off-peak scheduling, and token packages change what you actually pay, walks through worked cost calculations, and provides practical optimization strategies and a bill-auditing checklist for controlling large model API costs.

    Why the Same LLM API Rate Card Produces Different Bills — and How to Control Costs

    Same Unit Price, Different Bills

    Many teams notice something odd when comparing price sheets: multiple cloud platforms list identical standard-tier rates for the same model — for example, 20 RMB per million input tokens and 100 RMB per million output tokens. By that math, end-of-month bills should be nearly the same. Yet when finance reconciles invoices, costs for the same call volume sometimes differ substantially.

    The gap comes from billing rules. List prices only determine the cost under full-price, real-time, no-discount conditions. Caching, batch processing, off-peak scheduling, and token packages all change the amount you actually pay.

    Here’s a hypothetical scenario to illustrate. A team consumes 100M input tokens and 10M output tokens per month on the standard tier (input: 20, cache hit: 2, output: 100, in RMB per million tokens).

    • Plan A: No cache hits; all input tokens billed at the regular input rate. Input cost = 100 × 20 = 2,000 RMB; output cost = 10 × 100 = 1,000 RMB; total = 3,000 RMB.
    • Plan B: 70% of input tokens hit the cache. Input cost = 70 × 2 + 30 × 20 = 740 RMB; output cost remains 1,000 RMB; total = 1,740 RMB.

    Identical unit prices, yet a 42% difference in the bill. This example assumes cache writes incur no charge; in real bills, you must add write costs. The 70% hit rate is just an example — actual hit rates depend on your request patterns.

    1. List Prices and Billing Rules at a Glance

    The list prices for the example model are largely consistent across major cloud platforms. The table below shows unit prices for three tiers, in RMB per million tokens.

    Model tier Input Cache hit Output
    Standard 20 2 100
    Pro 13 1.3 68
    Code 6.5 1.3 27

    List prices are the same — the differences come from each platform’s own rules. The table below lists common rules and what to verify before purchasing.

    Rule Applies to Cost impact Verify before purchasing
    Context caching Repeated prefixes Cached portions billed at a lower rate Whether it’s enabled automatically, TTL length, whether writes are billed separately
    Offline batch processing Deferrable, non-real-time tasks Billed at a percentage of the standard rate Discount definition, completion deadlines, supported models
    Off-peak scheduling Calls within designated time windows Lower unit price during those windows Window definition, discount size, whether it stacks with packages
    Token packages Prepaid usage bundles Lower effective unit price within the bundle Bundle size, validity period, overage rate
    Overseas regions Calls made from certain regions Unit prices may be higher than domestic regions Regional price differences, data cross-border requirements

    2. Four Billing Rules and How to Model Them

    1. Context caching: hit rate and TTL determine the real price

    Multi-turn conversations and long-document Q&A repeatedly send the same prefix. Once the platform recognizes a repeated prefix, it bills those tokens at the cache-hit rate. On the standard tier, the hit rate is 2 RMB — one-tenth of the regular 20 RMB input price, a 90% reduction.

    Caching isn’t free. Some platforms bill cache writes separately and set different TTLs (cache time-to-live), such as 5 minutes or 1 hour. If the gap between consecutive requests exceeds the TTL, the cache expires. The request then loses the hit discount and may trigger new write charges.

    You can estimate a session’s effective hit rate with this formula:

    Effective hit rate ≈ requests spaced no more than TTL apart ÷ total requests in the session

    For example, a customer-support session has 1,000 requests, of which 600 are spaced within 5 minutes of the previous request. With a 5-minute TTL, the effective hit rate is roughly 60%. Plugging 60% into the input cost formula above, the average price per million input tokens is about 0.6 × 2 + 0.4 × 20 = 9.2 RMB — less than half the full price. Cache write costs must be calculated separately.

    2. Offline batch processing: confirm the discount definition first

    Tasks like nightly data evaluation and bulk document summarization tolerate latency well. Some platforms offer an offline batch API: requests enter a queue and execute when resources are idle, and the platform settles at a lower price.

    Batch discount phrasing is easy to confuse. Platforms often say “6折,” meaning you pay 60% of the standard price (a 40% saving). Other promotions use “60% discount” to mean a 60% saving. The two differ enormously — check the specific numbers in the billing documentation.

    You can estimate overall batch savings like this:

    Overall savings ≈ share of total input tokens sent via batch × batch discount rate

    For example, if batch traffic accounts for 30% of input and the platform charges 60% of list price (a 40% saving), overall input costs drop by about 12%. Batch processing isn’t suitable for real-time chat, code completion, or anything requiring fast responses. Before purchasing, also confirm the completion deadline and whether timed-out tasks are still billed.

    3. Off-peak scheduling and token packages: usage determines the payoff

    Token packages offer a lower effective unit price through prepayment. Suppose a package costs 1,200 RMB per month and includes 80M tokens, with overage billed at 20 RMB per million tokens. To keep the math simple, assume both the package and overage are converted at the input rate. The combined cost is:

    Combined cost = package fee + max(0, actual usage − bundle size) × overage rate

    Pay-as-you-go cost is simply usage × unit rate. The comparison:

    Actual usage (M tokens) Pay-as-you-go (RMB) Package plan (RMB) Savings
    60 1,200 1,200 0%
    80 1,600 1,200 25%
    100 2,000 1,600 20%

    At only 60M tokens, the package fee is already paid but delivers no benefit. Savings only materialize when usage approaches or exceeds the bundle size. So before buying a package, estimate your monthly average usage from historical bills and leave some headroom.

    Off-peak rules are another discount type. Some platforms offer lower unit prices for calls made during low-traffic windows (for example, after 18:00 daily). Overall savings can be estimated as:

    Overall savings ≈ off-peak traffic share × off-peak discount rate

    For example, if off-peak traffic accounts for 50% and the off-peak discount rate is 30%, overall savings are about 15%. Note that the 30% here is a hypothetical figure. If a promotion claims overall savings near 50%, verify the off-peak discount rate first. With off-peak traffic at 50%, achieving a 48% overall reduction would require a discount rate near 96% — uncommon in typical pricing.

    Whether off-peak discounts stack with packages depends on the specific terms. Some platforms allow only one of the two.

    4. Regional pricing and tier migration: hidden price increases

    The same model often costs more when called from overseas regions. As an example of one platform’s overseas pricing: standard-tier input is roughly 21.8 RMB and output roughly 109 RMB — about 9% higher than the domestic rates of 20 and 100 RMB. Regional price differences, currencies, and quoted figures should always be verified against the official pricing page. If your business has no cross-border needs, prefer your domestic region.

    Tier migration also changes costs. Older Code-tier models are eventually closed to new users, and platforms typically recommend migrating to the Pro tier. Based on the list prices above, the Pro tier’s input price is 2× the Code tier’s, and its output price roughly 2.5×. Re-run your cost model with actual usage before migrating, and build a model-routing layer in your application so switching tiers requires no business-code changes.

    3. How to Optimize LLM API Costs

    1. Route traffic by tier

    Don’t send every request through the same endpoint. Classify tasks by latency sensitivity:

    • Latency-critical tasks: user-facing multi-turn chat, code completion — use the real-time API directly to protect first-token latency and generation speed.
    • Weakly real-time async tasks: long email summaries, overnight log analysis — buffer in a message queue, then route to the batch API.
    • Scheduled tasks: daily report generation — run during off-peak windows, orchestrated by a scheduler.

    2. Context engineering and TTL alignment

    • Keep the system prompt lean, and keep core instructions byte-identical across turns to raise cache hit rates.
    • For high-frequency sessions, test your client’s request interval and align it with the platform’s TTL. Intervals exceeding the TTL cause repeated cache writes.
    • When conversation history grows long, periodically compress or summarize it to shorten the repeated prefix sent with each request.

    3. Co-locate access and network costs

    If your core services and databases already run on a given cloud platform, prefer that platform’s LLM service. This avoids public-internet bandwidth charges for cross-network calls and uses VPC internal networking to cut latency. At identical unit prices, this often determines total cost of ownership.

    4. How to audit unexpected bills

    When the bill doesn’t match expectations, investigate in this order:

    1. Break down billing items: separately tally token counts and amounts for input, cache hits, cache writes, and output.
    2. Verify API types: confirm which requests went through the real-time API and which through batch.
    3. Verify time windows: tally off-peak usage and check that your timezone matches the platform’s definition.
    4. Verify packages: check remaining package quota and overage charges, confirming the package deducted as expected.
    5. Verify region: check the region of your API endpoint to rule out overseas premiums.

    When modeling costs, stick to these five metrics: input and output token counts, cache hit rate, batch share, off-peak share, and package utilization. Every metric should come from real bills or logs — don’t substitute industry rules of thumb.

    Conclusion

    Controlling LLM API costs now goes well beyond comparing unit prices. At identical rates, cache hit rate, batch share, off-peak share, and package utilization all reshape the final bill. Calculate each rule’s contribution with real data first, then decide how to integrate — that’s how you cut costs without sacrificing user experience.