How to Evaluate Your True LLM Costs After Significant Price Increases

    After several providers raised the per-token prices of their premium models, developers are asking whether the listed prices reflect their actual spending. This article breaks down the three pricing tiers—input, output, and cache-hit tokens—explains why sticker prices and real costs often diverge, and shows how to build a per-successful-task cost model with sample Python code to measure your true expenses.

    How to Evaluate Your True LLM Costs After Significant Price Increases

    1. Background

    Recently, several providers have adjusted their model pricing, with some premium models’ output prices rising several times compared to the previous generation. Developer discussions around these changes usually focus on two questions: Is the price increase reasonable? And does the listed price represent what you actually pay?

    These two questions need to be answered separately. The listed price is the billing standard published by the provider, usually expressed as a rate per million tokens. Your actual spending depends on how you use the model, your payment plan, and quota rules. A gap between the two is common, so you need to understand the billing structure before drawing conclusions.

    2. Understanding the Three Token Pricing Tiers

    Most LLM services bill by tokens. A token is the basic unit of text the model processes. Chinese and English are tokenized differently, and the same content can produce different token counts across models. Billing usually involves three tiers.

    Billing Item What It Covers Cost Behavior
    Input price Everything sent to the model Grows linearly with context length
    Output price Content the model generates Usually significantly higher than input price
    Cache-hit price Portions matching a recent request’s prefix Usually far lower than the regular input price

    2.1 Input Price

    Input tokens include system instructions, conversation history, retrieved document chunks, tool definitions, and tool results. One thing developers often overlook: every call re-sends all of this content. Even if a user sends a single sentence, an application with a large system prompt can still incur a high input token count.

    2.2 Output Price

    Output tokens are generated one at a time. Each token requires a computation over everything generated before it, so the per-token compute cost of output is higher. For tasks requiring long answers, code generation, or multi-step reasoning, output is often the largest line item on the bill.

    2.3 Cache-Hit Price

    When a request’s prefix exactly matches a recent request, the server can reuse previously computed intermediate results—a mechanism commonly known as prefix caching or prompt caching. The matched portion is billed at a lower rate, while the unmatched portion is billed at the regular input rate. Cache hit rate is therefore a key metric affecting cost.

    3. Common Reasons Behind Price Increases

    Price increases for premium models in the industry are usually related to the following factors:

    1. Inference compute cost. LLM inference consumes significant accelerator resources; hardware depreciation, electricity, and data center costs are baked into the price.
    2. Model size and deployment overhead. Larger parameter counts require more memory and bandwidth per inference, and parallel deployment becomes more complex.
    3. Service quality guarantees. Low latency, high availability, and rate limiting all require additional infrastructure investment.
    4. Supply and demand. When demand for a model class exceeds available compute, providers adjust through pricing or quotas.

    External observers usually cannot determine the weight of each factor. The more reliable way to judge whether a price change is reasonable is to compare it against your own usage and quality data—not just the announcement.

    4. The Gap Between Listed Prices and Actual Spending

    4.1 Subscription Quotas Are Not Equivalent to Usage-Based Pricing

    Many developer tools offer subscription plans that include a usage quota, measured in request counts, tokens, or time windows. A subscriber’s effective unit price depends on two variables: the subscription fee, and the total tokens actually usable within the plan.

    Effective unit price = Subscription fee / Total usable tokens within the plan

    When your usage approaches the plan’s cap, the effective unit price approaches or even drops below the pay-as-you-go rate. If the quota runs out before being fully used, or you only consume a small fraction, the effective price rises sharply. The same subscription fee means completely different things for heavy users and light users.

    4.2 Quota Resets Create Availability Fluctuations

    Quotas usually reset daily or weekly. The reset timing changes your available budget for each period. Concentrating usage right after a reset gets more value from the quota; using it near the end of a cycle risks hitting rate limits or exhausting the quota. When evaluating subscription value, calculate averages over a full reset cycle rather than judging by a single day.

    4.3 Multiple Quota Pools Are Billed Separately

    Some services separate quotas for chat interfaces and coding assistant tools. The remaining amount in one pool says nothing about another pool’s availability. For budgeting, list the consumption and limits of every quota pool separately, then aggregate into a total cost. Looking at only one pool easily leads to overestimating available quota.

    4.4 Hidden Token Consumption

    In real applications, token consumption often exceeds intuitive estimates for reasons including:

    • Agents calling tools repeatedly, carrying full context at every step;
    • Long raw tool outputs placed into prompts without truncation;
    • Automatic retries after failed requests, billing the same task multiple times;
    • Some models’ reasoning processes consuming output tokens;
    • Long system prompts repeated in every call.

    As a result, the true cost of one user request is usually far greater than the cost of a single model call.

    5. Building a Per-Task Cost Model

    Looking only at the price of a single call cannot reflect an application’s real economics. A better metric is the cost per successful task: the total cost of completing a business task divided by the number of successfully completed tasks. This accounts for retries and failures, and reflects quality factors.

    The calculation logic:

    1. From call logs, record each call’s input tokens, cache-hit tokens, and output tokens;
    2. Compute each call’s cost using the respective rates;
    3. Sum all call costs to get total cost;
    4. Divide total cost by the number of successful tasks.

    The following example code demonstrates this process. Prices are placeholders; replace them with the actual published rates.

    1. from dataclasses import dataclass
    2. @dataclass
    3. class PriceTable:
    4. input_per_m: float # Price per million input tokens (placeholder)
    5. cached_per_m: float # Price per million cache-hit tokens (placeholder)
    6. output_per_m: float # Price per million output tokens (placeholder)
    7. @dataclass
    8. class CallLog:
    9. input_tokens: int # Total input tokens, including cache hits
    10. cached_tokens: int # Number of tokens served from cache
    11. output_tokens: int # Number of output tokens
    12. def call_cost(log: CallLog, price: PriceTable) -> float:
    13. uncached = log.input_tokens - log.cached_tokens
    14. if uncached < 0:
    15. raise ValueError("Cached tokens cannot exceed input tokens")
    16. total = (
    17. uncached * price.input_per_m
    18. + log.cached_tokens * price.cached_per_m
    19. + log.output_tokens * price.output_per_m
    20. )
    21. return total