Evaluating LLM API Cost: How to Model Limited-Time Discounts and Cache Price Cuts

    This article presents a vendor-neutral framework for evaluating LLM API pricing changes, including limited-time discounts and cache price reductions. It explains why comparing per-million-token prices alone can be misleading, how to unify billing units, and how to split input into cache-hit and cache-miss components. With a single-call cost model, illustrative pricing tiers, cache hit rate analysis, sensitivity testing, and guidance on choosing between prepaid packages and pay-as-you-go, developers can turn promotional claims into verifiable numbers.

    1. Why Discounts and Cache Price Cuts Require Recalculation

    Limited-time discounts and cache price reductions are common pricing strategies for LLM APIs. A lower unit price seems to guarantee lower cost, but the actual bill depends on three variables: input length, output length, and the share of input that can be reused from cache. Comparing only the price per million tokens often leads to the wrong conclusion.

    Cache billing usually splits input into two parts: the cache-hit portion is charged at a lower price, while the cache-miss portion is charged at the standard price. Output is priced separately. The real cost of a call is therefore the sum of three terms, not one unit price multiplied by total tokens.

    This article does not target any specific product. Instead, it abstracts a general measurement framework that helps developers make verifiable judgments when facing limited-time discounts, cache price cuts, prepaid packages, and similar promotions.

    2. Unifying Billing Terms: The Prerequisite for Comparison

    The most common source of error in cross-option comparison is inconsistent terms. Fix the following four items first:

    1. Pricing unit: Convert everything to “per million tokens” and avoid mixing “per thousand tokens” and “per ten thousand tokens.”
    2. Input split: Define the cache-hit price and the cache-miss price explicitly.
    3. Output price: Record it separately; do not merge it with input.
    4. Package conversion: If credits or quota packs are used, first convert to “1 token = how many credits,” then convert to currency.

    Illustrative conversion logic (pseudocode):

    1. credit_per_token = package_credits / package_price # tokens purchasable per unit of currency
    2. cost_per_call =
    3. input_hit * price_hit
    4. + input_miss * price_miss
    5. + output * price_out

    Only when the terms are unified are the resulting numbers comparable.

    3. Single-Call Cost Model: Splitting Input into Hit and Miss

    Let the input per call be I, the cache hit rate be h, and the output be O:

    1. input_hit = I * h
    2. input_miss = I * (1 - h)
    3. total = I + O
    4. cost = input_hit * p_hit + input_miss * p_miss + O * p_out

    Example parameters (values are for demonstration only and are not any real quote): budget of 40, input of 51,000 tokens per call, output of 5,100 tokens, hit rate of 56%.

    • Hit input: 51,000 × 56% ≈ 28,560
    • Miss input: 51,000 × 44% ≈ 22,440
    • Output: 5,100
    • Total per call: 56,100 tokens

    Plugging in different price tiers yields the cost per call, the number of calls the budget supports, and the total usable tokens:

    Tier Hit price Miss price Output price Cost per call Calls Total tokens
    Tier A (low) 0.2 1 2 ≈0.0384 ≈1,043 ≈58.51M
    Tier B (mid-low) 0.25 3 6 ≈0.1051 ≈381 ≈21.36M
    Tier C (mid) 1 3 6 ≈0.0748* ≈535 ≈30M
    Tier D (high, list price) 1 12 24 Significantly higher Noticeably lower Noticeably lower

    *Note: Tier C reflects a package conversion of “1 token = 2 credits” and is used only to demonstrate the conversion method.

    The conclusion is straightforward: with the hit rate unchanged, the cache-miss input price and the output price have the largest impact on total cost. A change in the hit price from 0.2 to 0.25 has limited effect on total cost.

    4. Cache Hit Rate: The Real Dividing Line

    The cache hit rate is the most sensitive variable in the model. With other parameters fixed, raising the hit rate from 56% to 80% increases the share of hit input and reduces the miss portion, lowering total cost; the reverse raises it.

    Engineering practices to improve the hit rate:

    • Stable prefix: Place unchanged content such as system prompts, tool definitions, and long documents at the very front of the request, and avoid changing it on every call.
    • Reduce prefix jitter: Do not insert volatile fields such as timestamps, random IDs, or request sequence numbers into the fixed prefix.
    • Batching and ordering: Keep request order stable within the same session and avoid concurrent rewrites of a shared prefix.
    • Sensible splitting: Separate the “stable segment” from the “changing segment”; the longer the stable segment, the greater the reuse benefit.

    Illustrative structure:

    1. [Stable prefix: system prompt + tool schema + long document] ← aim for a hit
    2. [Changing segment: current user input] ← usually a miss

    When the hit rate is low, the benefit of a cache price cut is offset by the miss portion. Only when the hit rate is high does the cache price cut show a clear effect.

    5. Sensitivity Analysis: Which Variables to Watch

    Run three-tier sensitivity tests rather than computing a single point:

    1. Hit rate tiers: 40% / 60% / 80%, and observe the total cost curve.
    2. Input-output ratio: two extremes, short input with long output, and long input with short output.
    3. Call frequency: average daily calls multiplied by cost per call, yielding a monthly budget.

    Rules of thumb:

    • Long input, short output, high reuse (e.g., coding assistants, document Q&A) → cache hit rate is the primary metric.
    • Short input, long output (e.g., generation tasks) → output price carries the most weight.
    • Low call frequency → the absolute benefit of a discount is limited; there is no need to change the architecture for a discount.
    • High call frequency → unit price differences are amplified; packages and pay-as-you-go need to be re-converted and compared.

    6. Packages vs. Pay-as-You-Go

    A prepaid package is essentially “prepay for a discount.” It suits scenarios with predictable, low-volatility usage; pay-as-you-go suits scenarios with high volatility and uncertain peaks. How to decide:

    1. If forecast monthly usage × pay-as-you-go unit price > package price, and usage volatility is low → package is better
    2. If usage is highly volatile or has long-tail peaks → pay-as-you-go is more stable

    Watch out for differences in credit conversion (e.g., 1 token = 1 credit or 2 credits). Comparing without converting is a common decision error.

    7. Using Limited-Time Discounts Correctly

    A limited-time discount is a time window, not a long-term cost. Recommendations:

    • Use the discount window for load testing and migration validation, rather than stockpiling credits all at once.
    • Build a cost dashboard tracking three core metrics: hit rate, cost per call, and monthly total volume.
    • Set budget alerts to avoid cost rebound after the discount period ends.
    • Keep the architecture replaceable: wrap the call layer uniformly and isolate model and billing differences in configuration, so switching is easy at any time.

    8. Conclusion

    Evaluating discounts and cache price cuts comes down to three steps: unify terms, split hit and miss, and run sensitivity analysis. The hit rate determines the real benefit of a cache price cut, the output price sets the cost ceiling for generation tasks, and call frequency determines the choice between packages and pay-as-you-go. Quantify these three things, and any “limited-time offer” can be reduced to comparable numbers rather than marketing language.