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:
- Inference compute cost. LLM inference consumes significant accelerator resources; hardware depreciation, electricity, and data center costs are baked into the price.
- Model size and deployment overhead. Larger parameter counts require more memory and bandwidth per inference, and parallel deployment becomes more complex.
- Service quality guarantees. Low latency, high availability, and rate limiting all require additional infrastructure investment.
- 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:
- From call logs, record each call’s input tokens, cache-hit tokens, and output tokens;
- Compute each call’s cost using the respective rates;
- Sum all call costs to get total cost;
- 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.
from dataclasses import dataclass@dataclassclass PriceTable:input_per_m: float # Price per million input tokens (placeholder)cached_per_m: float # Price per million cache-hit tokens (placeholder)output_per_m: float # Price per million output tokens (placeholder)@dataclassclass CallLog:input_tokens: int # Total input tokens, including cache hitscached_tokens: int # Number of tokens served from cacheoutput_tokens: int # Number of output tokensdef call_cost(log: CallLog, price: PriceTable) -> float:uncached = log.input_tokens - log.cached_tokensif uncached < 0:raise ValueError("Cached tokens cannot exceed input tokens")total = (uncached * price.input_per_m+ log.cached_tokens * price.cached_per_m+ log.output_tokens * price.output_per_m)return total
