LLM API Pricing Changes: How to Recalculate Your Actual Costs
LLM API price cuts do not translate directly into equivalent savings. This article explains how to model uncached input, cached input, and output costs; compare historical pricing consistently; and evaluate scheduling, caching, output efficiency, and model migrations using cost per acceptable result. Example calculations show why workload composition matters more than headline discounts.
1. Why Lower Unit Prices May Not Restore Your Previous Bill
When LLM API prices change, developers can easily assume that if most rates return to earlier levels, total costs should follow.
In practice, a model request can involve several billing categories. Uncached input, cache-hit input, and model output may each have different rates. The same task may also cost different amounts depending on when it runs. If even one rate remains above its historical level, the final bill may not return to where it was.
This is especially relevant to long-form generation, academic writing assistance, report preparation, and multi-turn analysis, where output can account for a large share of spending. If input and cached-input rates fall while output remains more expensive than before, a partial price rollback is not the same as a return to historical total costs.
To evaluate a pricing change, answer three questions:
- Which billing categories account for most of your workload?
- What will the same volume of work cost under the new rates?
- How many calls are actually needed to produce results of equivalent quality?
The first two determine the calculated API cost. The third determines the actual business cost.
2. Establish a Consistent Usage Model
In token-based billing, tokens are the units a model uses to process text. They are not equivalent to characters or English words. Token counts vary with text, language, and tokenization, so budgets should rely on actual usage records whenever possible rather than simple character conversions.
A basic cost model separates usage into three categories:
- Uncached input, U: Input not billed at the cache-hit rate.
- Cache-hit input, H: Input that meets the service’s caching conditions and is billed at the cache-hit rate.
- Output, O: Model output usage as defined by the service’s billing documentation.
If the corresponding prices are Pu, Ph, and Po, all expressed in CNY per million tokens, the base cost is:
C = (U × Pu + H × Ph + O × Po) / 1,000,000
A critical requirement is that U and H must not overlap.
Some usage records provide both total input tokens and cache-hit input tokens. In that case, using total input as U could count cached tokens twice. Only after confirming the reporting definitions should you calculate:
Uncached input = Total input − Cache-hit input
If the service has additional charges, include them separately. This simplified formula does not replace the provider’s complete billing rules.
3. Compare a Pricing Matrix, Not a Single Rate
The following example illustrates how different billing categories affect total cost. These figures are illustrative, are not current service quotes, and do not replace official billing documentation.
| Billing category | Off-peak rate before adjustment | Off-peak rate after adjustment | Change |
|---|---|---|---|
| Uncached input | CNY 1.50 per million tokens | CNY 1.00 per million tokens | Down approximately 33.3% |
| Output | CNY 4.50 per million tokens | CNY 4.00 per million tokens | Down approximately 11.1% |
| Cache-hit input | CNY 0.05 per million tokens | CNY 0.02 per million tokens | Down 60% |
Cached input has the largest percentage reduction, but it does not necessarily deliver the largest absolute savings.
A percentage reduction describes a change in unit price. Actual savings depend on both the price difference and the amount of usage. Even a 60% reduction may have little impact if that category was already a small part of the bill.
Suppose a set of tasks uses:
- 8 million cache-hit input tokens;
- 1 million uncached input tokens;
- 1 million output tokens.
At the previous rates:
Cost = 8 × 0.05 + 1 × 1.50 + 1 × 4.50 = CNY 6.40
At the adjusted rates:
Cost = 8 × 0.02 + 1 × 1.00 + 1 × 4.00 = CNY 5.16
The total reduction is approximately 19.4%, not the 60% reduction in cached-input pricing or the 33.3% reduction in uncached-input pricing.
Output now costs CNY 4.00, or approximately 77.5% of the total. For this workload, output length, repeated generation, and task decomposition deserve more attention than further marginal optimization of cached-input costs.
4. Determine Whether Costs Have Returned to Historical Levels
Historical comparisons require a fixed usage mix.
Let C₀ represent cost at the historical baseline rates and C₁ represent cost at the new rates:
Cost change = (C₁ − C₀) / C₀
For this comparison to isolate pricing, both calculations must use the same uncached input, cache-hit input, output, and distribution across billing periods.
If the newer workload uses longer contexts, generates more content, or moves from off-peak to peak hours, the bill reflects both pricing changes and changes in usage behavior. It cannot be attributed entirely to the rate adjustment.
Historical cost shares provide another useful way to assess the impact.
Suppose uncached-input and cached-input prices return fully to their historical levels, but the output rate remains twice as high. With usage unchanged:
The percentage increase in total cost equals output’s share of the historical bill.
For example, if output previously accounted for 30% of spending, doubling only its rate increases the total bill by 30%.
This explains why the same pricing adjustment can bring one application close to its previous costs while leaving another noticeably more expensive: their output cost shares differ.
5. Total Token Counts Are Not Enough to Verify a Bill
A total token count paired with cost estimates for different pricing periods can be useful, but it is usually insufficient to verify the calculations independently.
The total does not show:
- How much was uncached input;
- How much was cache-hit input;
- How much was output;
- Which billing period applied to each portion;
- Whether the amount includes failed attempts, retries, or other charges.
Two workloads with identical total token counts can have very different costs.
Engineering teams should retain request-level usage records and aggregate them under consistent rules. For long-running requests that cross a pricing boundary, confirm whether the provider assigns the rate based on request start time, completion time, or another rule. Do not assume how this works.
Historical comparisons should also distinguish between cost recalculated using historical rates and the amount actually paid. Discounts, promotional credits, and billing precision can cause those figures to differ.
6. Schedule Around Peak Pricing Without Compromising Deadlines
If a service explicitly charges twice as much during peak hours as during off-peak hours, moving an otherwise identical workload to off-peak hours can theoretically halve the corresponding API charges.
That does not mean every task should wait for the lowest-priced window.
A better approach is to classify workloads by their timing requirements.
Real-Time Interactions
Online question answering and immediate assistance should prioritize responsiveness and availability. Materially delaying user requests to save on API fees is generally not an appropriate trade-off.
Near-Real-Time Tasks
Document processing that can tolerate a wait of several minutes may use a maximum queue time, allowing execution in a more favorable window without exceeding the task’s deadline.
Offline Batch Processing
Overnight summarization, historical document labeling, and bulk quality checks are typically the strongest candidates for off-peak scheduling.
Low-price windows may also attract heavy batch traffic. If concentrated submissions lead to rate limiting, timeouts, and repeated retries, the savings can disappear. Scheduling therefore needs queues, concurrency limits, retry backoff, and deadline management.
7. Optimize Caching for Reuse, Not Longer Prompts
Lower cached-input prices do not make longer inputs inherently economical. The goal is to reuse stable, necessary content effectively across requests.
Common practices include:
- Separating stable task instructions from frequently changing user content;
- Keeping shared prefixes consistent where the caching mechanism supports this;
- Avoiding random identifiers and frequently changing timestamps within reusable content;
- Retaining only the background material required for the current task.
Whether these practices improve cache hits depends on the service’s matching rules, cache lifetime, and eligibility conditions. Sending identical content repeatedly at the application level does not automatically qualify it for cached-input pricing.
Identical text also does not mean a business result can be safely reused. Where permissions, freshness, or data isolation matter, correctness and access boundaries must take priority over cache-hit rates.
8. Reduce Unnecessary Generation When Output Dominates Costs
Applications with high output spending can focus on three areas.
First, define the required result clearly.
If a task needs only a classification, score, or a few fields, specify that output structure. Avoid generating lengthy background explanations that the application does not need.
Second, use staged workflows where appropriate.
For complex documents, generate an outline or key conclusions first, then expand after confirming the direction. This may require more calls, but it can reduce the waste of regenerating an entire document. Validate the benefit against real tasks.
Third, reduce repeated generation.
Formatting errors, missing context, and unclear acceptance criteria can cause the same task to be submitted multiple times. Improving first-pass usability may be more valuable than simply shortening every response.
Shorter output is not always better. If compression removes supporting evidence, leaves the result incomplete, or breaks downstream parsing, the API savings may be smaller than the resulting rework cost.
9. Evaluate Model Changes Separately from Pricing Changes
A pricing adjustment may coincide with the release of a new model version or the retirement of an older one. These should be evaluated as separate changes.
Even if the endpoint and request format remain compatible, different versions may behave differently in quality, latency, output-format consistency, and rate limiting.
Before migrating, prepare a test set that represents real workloads and check:
- Whether key conclusions are accurate;
- Whether long-context information is used correctly;
- Whether structured output remains consistent;
- Whether time to first response and total completion time meet requirements;
- Whether timeout, failure, and retry rates change.
A safer rollout starts with a small share of traffic, expands in stages, and retains an actionable rollback plan. If access to a version is temporary, confirm its availability period and subsequent migration requirements. Short-term availability should not be treated as a long-term commitment.
10. Measure Cost per Acceptable Result
The price of an individual request is a technical metric, not a complete business metric.
A cheaper option that requires repeated attempts, manual editing, or regeneration can ultimately cost more than a higher-priced option that produces reliable results.
Use the following measure:
Cost per acceptable result = (Model-call costs, including retries, + Necessary human-review costs) / Number of acceptable results
Track completion time and quality acceptance rates alongside cost so that savings do not undermine delivery.
A practical process has four steps:
- Collect representative historical requests. Retain uncached-input, cache-hit input, output, and execution-time information.
- Apply old and new rates to the same usage mix. This isolates the effect of pricing.
- Evaluate operational changes separately. Test scheduling, context management, and output strategies without mixing their effects into the pricing comparison.
- Monitor continuously. Track cost, quality, latency, and failure rates, and recalculate regularly.
LLM pricing changes are not just a test of how quickly a team can read a rate card. They test whether the team has an explainable, auditable cost model that can be improved over time. Only by evaluating pricing structure, workload composition, and result quality together can you determine how much a price cut actually saves.
