LLM API Price Cuts: How to Calculate Real Inference Costs Beyond Sticker Prices

    When LLM providers announce price cuts of 60% or more, developers often rush to calculate migration savings. That math is only useful if you understand what actually drives inference costs. This article breaks down the two levers behind any cost reduction—unit price and token usage—explains why percentage drops can't simply be multiplied together, clarifies how high-reasoning modes and cached-input pricing really work, and provides a practical workflow for building your own cost evaluation pipeline with logging, a private benchmark, and code-based cost calculation.

    As large language models iterate faster, most providers have shifted their launch messaging from parameter counts to cost-effectiveness. When a vendor announces that a new model reduces per-task costs on some benchmark by more than 60%, many developers immediately start estimating migration savings. That exercise is useful—but only if you understand what actually determines cost, and under what conditions that headline number was produced.

    1. Cost Is Determined by Unit Price and Usage Together

    API billing is straightforward: total cost = call volume × unit price. Call volume splits into input tokens and output tokens, and unit price has separate input and output rates as well. So there are only two ways total cost can go down: the unit price drops, or the same task consumes fewer tokens. Both can happen at once.

    You need to look at these two levers separately to understand what a promotional number is made of. A unit-price cut is the “list-price side” of the ledger—you can verify it directly on the vendor’s pricing page. A usage change is the “consumption side,” which you can only measure in your own call logs. Looking only at list prices tends to overstate the benefit; looking only at usage may cause you to miss structural changes in pricing.

    2. Percentage Reductions Can’t Simply Be Multiplied

    Many articles use formulas like “unit price down 20%, usage down 10%, so total cost down 28%.” That arithmetic only holds when input and output rates drop by the same amount and usage changes identically for both token types. In practice, that’s rarely the case.

    Suppose a model’s input price drops 20%, its output price drops 10%, while input tokens decrease 5% and output tokens increase 10%. You must calculate each component separately:

    New cost = new input tokens × new input price + new output tokens × new output price

    The result often differs noticeably from a naive multiplication of percentages. The numbers above are illustrative only, to show the calculation method. Real figures should come from the vendor’s published pricing and your own logs.

    3. Higher Reasoning Effort Usually Increases Token Consumption

    Some models offer high-reasoning or deep-thinking parameters. These make the model perform more reasoning before producing an answer, in exchange for higher answer quality. The reasoning process itself generates additional tokens, so enabling these modes typically increases reasoning tokens and cost.

    Some articles describe high reasoning effort as a way to reduce redundant output—which contradicts how the mechanism works. Higher reasoning effort means the model does more computation, not less. Whether it’s worth enabling depends on whether the quality gain covers the added cost.

    If you want to control costs, more reliable methods include: compressing prompts by removing repeated background information; constraining output format to limit answer length, such as requiring only specified JSON fields; setting a maximum output token count; turning off deep reasoning for simple extraction tasks; and reusing stable prefixes to benefit from caching. The effect of each method should be validated with your own data.

    4. Vendor Benchmarks May Not Represent Your Workload

    The cost-reduction figures vendors publish usually come from their own evaluation sets. The task distribution, prompt lengths, and expected outputs in these sets may differ from general business scenarios. Even if the evaluation is entirely honest, the results only reflect performance under that particular task distribution.

    Third-party evaluations offer another perspective, but you still need to see clearly what they measure. Before citing one, confirm the benchmark name, test date, model version, and scoring methodology. A score missing this information is hard to use for procurement decisions.

    To judge whether a benchmark applies to you, ask a few questions: Are the task types similar to my business? Is the input length distribution similar? Does the output require strict structure or logic? Does the evaluation include multi-turn dialogue or tool calls? If any item clearly doesn’t match, the benchmark score is reference material at best.

    Here’s a typical example. If your business is dominated by long-document summarization, where every request carries a large amount of new content, caching yields little benefit, and outputs may be long—so the output price has a larger impact on total cost. If your business sends large volumes of similar requests sharing the same system prompt, the value of caching rises significantly. The same model can have completely different cost structures under these two workloads.

    5. The Cached-Input Price Only Applies to Cache Hits

    The extremely low input prices circulating in the community are often misunderstood as applying to all input tokens. The cached-input price only applies to the portion of input tokens that actually hit the cache; the rest is still billed at the standard input rate.

    The caching mechanism works roughly like this. When a model processes a prompt prefix, it computes a key-value cache (KV Cache), a step that takes time and resources. When multiple requests share an identical prefix and it is still within the provider’s validity window, subsequent requests can reuse the computed results, so the provider offers a lower rate for them. The prefix-matching method, validity duration, minimum cacheable length, and whether cache writes incur separate charges are all determined by the provider—refer to the official documentation.

    Therefore, you cannot substitute the cached price for the standard input price in your evaluation. First measure your real cache hit rate, then compute a weighted cost based on the hit/miss ratio. When the hit rate is low, the cached price has very little impact on total cost.

    6. Build Your Own Cost Evaluation Workflow

    Step 1: Build a private evaluation set. Extract several hundred requests from real business traffic, covering long and short texts, single-turn and multi-turn dialogue, different domains, and different difficulty levels. For each sample, record the input, the expected output, and the scoring result. During evaluation, record both quality scores and token consumption—the two must be looked at together.

    Step 2: Log usage details for every call. Logs should include input tokens, output tokens, cached input tokens, model version, and the cost computed with a unified formula. If your SDK doesn’t return the cache field, mark that in the log and bill it at the standard input rate—this yields a conservative cost estimate.

    Step 3: Calculate cost with a unified function. The code below illustrates the approach. Prices are read from configuration rather than hard-coded. Field names should be verified against the documentation of the SDK version you use.

    1. from dataclasses import dataclass
    2. @dataclass
    3. class Price:
    4. input_per_m: float # standard input price, per million tokens, in the configured currency
    5. cached_input_per_m: float # cached input price; same as input_per_m if caching is unsupported
    6. output_per_m: float # output price, per million tokens
    7. def calculate_cost(usage: dict, price: Price) -> float:
    8. cached = usage.get("cached_input_tokens", 0)
    9. uncached = usage["input_tokens"] - cached
    10. total = (
    11. uncached * price.input_per_m
    12. + cached * price.cached_input_per_m
    13. + usage["output_tokens"] * price.output_per_m
    14. )
    15. return total / 1_000_000
    16. def call_llm_api(client, prompt: str, model: str, price: Price, logger):
    17. response = client.chat(
    18. model=model,
    19. messages=[{"role": "user", "content": prompt}],
    20. )
    21. # Field names depend on your SDK version's docs; fall back to 0 if missing,
    22. # i.e., everything is billed at the standard input rate
    23. usage = {
    24. "input_tokens": response.usage.input_tokens,
    25. "output_tokens": response.usage.output_tokens,
    26. "cached_input_tokens": getattr(response.usage, "cached_input_tokens", 0),
    27. }
    28. cost = calculate_cost(usage, price)
    29. logger.info({"model": model, "cost": cost, **usage})
    30. return response.content

    When the cache field is missing, the function bills at the standard input rate—the result skews high but never underestimates cost. Whether caching is enabled should be confirmed against the relevant parameter in the provider’s API documentation.

    Step 4: Tune reasoning parameters per task. Extraction and classification tasks usually call for low reasoning effort with constrained output format. General Q&A and summarization use default settings with a maximum output length. For complex reasoning and code generation, compare quality with high reasoning on versus off in your evaluation, and keep it only when the quality gain is clearly meaningful.