LLM API Price Cuts: How to Calculate the Real Cost
A headline announcing that an LLM API is now one quarter of its original price is not a budget input. This article explains why list prices and actual bills diverge, breaks down the three variables that drive real spend—call timing under peak/off-peak pricing, prefix cache hit rate, and failed or retried requests—and outlines practical steps for building a cost baseline from the official pricing page, splitting budgets per feature, and tracking usage as an observable metric.
Start With the Conclusion: The Cut Is Real, but “One Quarter” Is Not a Budget Number
A model vendor recently announced that the API price for a flagship model has moved from a limited-time discount to a permanent price, described publicly as one quarter of the original list price. Taken at face value, the math is clean: the three billing items—output, input, and cache hits—all scale by exactly the same ratio.
The catch is that the price list was replaced after it took effect. The model subsequently moved to time-of-day pricing with peak and off-peak tiers. The off-peak price is indeed lower than the original, but the peak price is higher, and the per-token price for cache-hit input during peak hours is more than three times the original. Peak hours happen to cover the window when most people are at their desks during the day.
So multiplying the discount ratio from the announcement into an annual budget will systematically understate spend. This is not the vendor fudging numbers. A quote and a bill simply live on different layers: a quote is a unit price, while a bill is the result of convolving that unit price with your actual call behavior.
Why a Price List Is Not a Bill
Any usage-based service can be abstracted into the following form:
total cost = Σ (call volume of feature i × unit price of the matching billing item × time-of-day factor) + failed and retried overhead
The formula has four variables, and a press release typically tells you only one of them. Worse, the four are not independent: heavy daytime development pushes up both the time-of-day factor and the retry rate, while sloppy prompt construction lowers the cache hit rate and inflates input token consumption at the same time.
A common misconception is reading “unit price down” as “cost down by the same proportion.” In practice, once unit prices drop, teams tend to call more often, extend context, and add automated jobs. Volume rises, and total cost may stay flat or even increase. This is the classic rebound effect in cost engineering, and it has to be modeled explicitly in a budget rather than assumed away by holding usage constant.
The Three Variables That Actually Determine the Bill
1. Time of Day
Time-of-day pricing converts load pressure into a price signal. Figuring out which tier you fall into is straightforward: aggregate historical call timestamps by hour and check whether the peak in request volume lands inside the interval marked as peak. For most teams, it does.
Mitigations include scheduling batch offline work—data cleaning, bulk summarization, regression evaluations—into off-peak windows through a message queue or scheduled jobs, and splitting interactive requests and batch requests into two separate channels with their own timeout and retry policies.
2. Cache Hit Rate
The unit price for prefix cache hits is typically far below that of uncached input, but it requires a stable request prefix. Long, fixed content such as system prompts, tool definitions, and few-shot examples belongs at the very front of the prompt and should not be randomized. Concatenating timestamps, random IDs, or user nicknames into the system prompt invalidates the entire prefix.
# Recommended: stable prefix first, volatile content last[system: fixed role definition + tool schema + output constraints] ← cacheable[context: retrieved snippets for this turn / user input] ← not expected to be cached
Hit rate should be monitored as a first-class metric rather than reverse-engineered from the bill after the fact. Instrument the client and record the token share of hits versus misses per feature.
3. Failures and Retries
Tokens from failed calls are billed as usual, which is exactly why retry cost needs its own line. A 75% price cut does not survive an average of three retries per request. The controls are engineering controls: distinguish retryable errors (rate limits, timeouts, server-side errors) from non-retryable ones (invalid parameters, blocked content) and apply exponential backoff only to the former; set a retry budget cap and a circuit-breaker threshold; cap the maximum generation length on long outputs so a single runaway generation cannot consume a full day’s quota.
Three Practices for Getting the Cost Right
First, budget only from the official pricing page as of the current day, and treat it as a configuration value rather than a hard-coded constant, fetched by a scheduled job with alerts on change. Second, confirm your own call-time distribution before deciding which traffic can shift to off-peak. Third, split accounting by feature, one budget line per feature, with retries and cache hits broken out as separate columns.
Supporting infrastructure worth setting up: a usage dashboard per feature built on log and monitoring services, with daily and monthly budget thresholds and tiered alerts; model routing at the gateway layer to send low-difficulty requests to a smaller model; and version control for prompts, since prompt changes directly affect both cache hit rate and token consumption.
Two capability directions are also worth watching: consoles beginning to surface quota consumption, which moves cost visibility from the end-of-month bill to real time; and server-side retrieval add-ons that are no longer billed separately, which lets previously separate line items be merged and the budget model simplified accordingly.
Summary
Price changes are an external variable; usage structure is the internal one. Make time of day, cache hit rate, and retries observable metrics, bind the budget to live data from the official pricing page, and split it by feature—then a vendor’s pricing changes will not knock you off course. If you use the relevant model services from Baidu AI Cloud, the same advice applies: build your cost baseline from actual figures in the console and on the official pricing page rather than from any ratio quoted in promotional material.
