LLM API Pricing Increased 5x: How to Calculate the Real Cost

    As LLM API prices rise sharply, sticker price alone no longer reflects actual spending. This article breaks down the three billing dimensions—input, output, and cached tokens—and explains why total cost equals price per token multiplied by task consumption. It introduces plan leverage (usable quota divided by plan price) as a key comparison metric, outlines a four-step method to estimate per-task and monthly costs, and lists practical optimization techniques such as stable prefixes, context compression, output limits, tiered routing, observability, and architecture decoupling. Use these metrics to make rational model selection and budget decisions during price hikes.

    1. The Signal: A New Generation of Models With Much Higher Prices

    A recent generation of large language model APIs is priced roughly five times higher than the previous one: output at around 100 units per million tokens, input at around 20 units, and cache hits down to around 1 unit. This has sparked broad discussion among developers: Is the increase justified? Does it still offer value compared with alternatives? This article does not review any specific product. Instead, it frames the issue as a general engineering question—how to scientifically evaluate the total cost of LLM API usage in an era of high unit prices.

    2. Breaking Down the Billing Structure: Three Price Dimensions

    Most LLM API billing consists of three dimensions:

    • Input tokens: the full text assembled from prompts, system instructions, conversation history, and retrieved snippets;
    • Output tokens: the content generated by the model;
    • Cached tokens: the portion that exactly matches a recent request prefix and is reused from the server-side cache, at a significantly lower unit price.

    Note that cache hits are not “free” but “discounted.” The hit rate depends on how stable the request prefix is, so the way prompts are organized directly affects the bill.

    Illustrative billing model (shows the calculation logic only, not real pricing):

    1. def estimate_cost(input_tokens, output_tokens, cached_tokens,
    2. p_in=20.0, p_out=100.0, p_cache=1.0):
    3. # Unit price: currency units per million tokens
    4. fresh_in = max(0, input_tokens - cached_tokens)
    5. return (fresh_in * p_in + output_tokens * p_out
    6. + cached_tokens * p_cache) / 1_000_000

    3. Why Unit Prices Rise: Benchmarks and Consumption Structure

    The original argument has two layers: first, the new model ranks near the top in public evaluations, so a high unit price is “justified”; second, what really determines experience is not the listed price but the total number of tokens consumed to complete the same task.

    Both points need a more rigorous restatement:

    1. Unit price and capability are not linearly related. Benchmark rankings reflect average capability, but in a specific business the payoff depends on whether the task falls within the model’s strengths.
    2. Total cost of ownership = unit price × task consumption. If the new model reasons more verbosely with longer chains of thought, consumption per task may multiply, offsetting the “illusion of value” beyond unit price.
    3. Comparisons must use the same basis. When comparing across options, unify the task set, the prompts, and the output length limit; otherwise the conclusion is invalid.

    4. Plan Leverage: The Multiplier Is the Key Metric

    The core insight of the original piece is the multiplier between the usable quota within a plan and the plan price. Stated neutrally:

    • Let the plan price be P and the usable quota within the plan be Q, then leverage multiplier = Q / P;
    • Comparable options commonly start at a multiplier of twenty, with some tiers reaching several tens of times;
    • If an option’s multiplier is only around ten, then under the same task consumption the actual spend will be clearly higher than with a high-multiplier option.

    So when evaluating a plan, do not look only at the listed price; look at “how much usable quota each unit of plan money buys back,” then adjust for task consumption intensity.

    5. Cost Estimation in Practice: A Four-Step Method

    1. Sample: draw 50–200 real business requests covering long and short inputs and different output sizes;
    2. Measure: count the average input, output, and cacheable prefix tokens;
    3. Convert: plug into the formula above to get per-task cost, then multiply by daily call volume for a monthly budget;
    4. Stress-test the ceiling: estimate the worst-case bill using peak concurrency and output limits.
    1. Cost per task ≈ (fresh input × input price + output × output price + cached × cache price) / 1e6
    2. Monthly budget ≈ cost per task × average daily tasks × 30 × overhead factor (1.2–1.5)

    6. Cost Optimization Practices

    • Stable prefix: place system instructions, tool descriptions, and few-shot examples at the front and keep them fixed to raise the cache hit rate;
    • Compress context: replace full history with summaries, and rerank and truncate retrieved snippets;
    • Control output length: set clear word and structure constraints to avoid unbounded generation;
    • Tiered routing: send simple tasks to a lightweight model and escalate complex ones, forming a cost gradient;
    • Observability: build token-level dashboards through logging and monitoring with budget alerts and rate-limiting circuit breakers;
    • Architecture decoupling: use message queues to smooth peaks and object storage to archive long text, avoiding repeated billing.

    7. Conclusion

    A fivefold price increase is only a signal. The real questions are three: Is task consumption controllable? Is the cache hit rate fully utilized? Is plan leverage competitive? Quantify these three points into metrics and fold them into a daily observability system, and developers can make rational technology selection and budget decisions during price-hike cycles.