Five-Fold LLM API Price Increase? Calculate the Cost per Task First
A new LLM API price hike has sparked debate among developers. This article explains why unit prices alone do not show what a task costs. It shows how to calculate cost per task from uncached input, cache-hit input, and output tokens, how cache hit rates and prepaid subscription multiples change the math, and what to check before choosing a model.
1. Why the Price Change Sparked Debate
According to a published report, a domestic LLM provider set the API price for its new flagship model at 100 CNY per million output tokens, 20 CNY per million input tokens, and 1 CNY per million cached input tokens. The report says this is roughly five times the price of the previous generation. After the news spread, many developers argued that the cost would be hard to bear.
Discussions like this usually focus on unit price. Unit price matters, but it only answers “how much does each token cost?” It does not answer “how much does it cost to complete one task?” To judge how a price change affects you, look at unit price together with your usage.
2. Unit Price Is Only the Starting Point
A price per million tokens is a reference point, and it can easily shape an intuitive judgment. The problem is that models generate very different numbers of tokens. A model with a lower unit price but verbose answers may consume more tokens for the same task. A model with a higher unit price but concise answers does not necessarily cost more per call.
When selecting a model, fix the task first, then compare costs. The task might be one code generation, one document summary, or one customer service reply.
3. How to Calculate the Cost per Task
Split the cost into three parts: uncached input, cache-hit input, and output.
Cost per task = uncached input tokens ÷ 1,000,000 × input price + cache-hit tokens ÷ 1,000,000 × cache price + output tokens ÷ 1,000,000 × output price
Multiplying the output price by the total token count gives a result that deviates from actual spending. Input tokens usually far outnumber output tokens. The cache-hit price is also one-twentieth of the standard input price.
Consider a hypothetical scenario. A task has 8,000 input tokens in total, of which 6,000 hit the cache and 2,000 do not. The model produces 1,500 output tokens. Using the prices in the report:
- Uncached input: 2,000 ÷ 1,000,000 × 20 CNY = 0.040 CNY
- Cache hit: 6,000 ÷ 1,000,000 × 1 CNY = 0.006 CNY
- Output: 1,500 ÷ 1,000,000 × 100 CNY = 0.150 CNY
- Total: 0.196 CNY
Now assume a second model, Model B, with an input price of 10 CNY, a cache price of 0.5 CNY, and an output price of 50 CNY. The input is the same, but Model B produces 3,000 output tokens. Its cost is 0.020 CNY + 0.003 CNY + 0.150 CNY = 0.173 CNY.
This example shows that a model with a higher unit price can have a lower cost per task when its output is shorter. Model B has lower unit prices, but its doubled output brings its cost close to the first model’s. Which option is more economical depends on the actual output length. The prices and token counts above are examples only. Calculate with your own figures.
4. The Effect of Cache Hit Rate
Cache discounts apply only when a request hits the cache. The hit rate depends on how your application is structured. Fixed system prompts, long knowledge base prefixes, and repeated tool definitions tend to hit the cache easily. Scenarios where every request carries a large amount of new content rarely hit it.
Using the 8,000-token input from the example above, here are the input costs at different hit rates:
- 10% hit rate: 8,000 × (0.1 × 1 + 0.9 × 20) ÷ 1,000,000 ≈ 0.145 CNY
- 50% hit rate: 8,000 × (0.5 × 1 + 0.5 × 20) ÷ 1,000,000 ≈ 0.084 CNY
- 90% hit rate: 8,000 × (0.9 × 1 + 0.1 × 20) ÷ 1,000,000 ≈ 0.023 CNY
Input costs fall noticeably as the hit rate rises. In this example, however, output cost stays fixed at 0.150 CNY and remains the largest part of the cost per task. Before optimizing the cache, confirm that output length is under control. Some platforms also apply rules on cache lifetime, minimum length, or storage fees. Check the relevant API documentation for those details.
5. How to Calculate the Prepaid Multiple for Subscriptions
The value of a subscription plan can be measured with a prepaid multiple:
Prepaid multiple = equivalent pay-as-you-go quota included in the plan ÷ monthly fee
The report mentions two domestic plans. Using this formula:
- For the 199 CNY per month plan: if the equivalent quota is 1,200 CNY, the multiple is about 6×. If it is 2,800 CNY, the multiple is about 14×.
- For the 699 CNY per month plan: if the equivalent quota is 50,000 CNY, the multiple is about 72×. If it is 100,000 CNY, the multiple is about 143×.
The report gives the 699 CNY plan a quota of 50,000 to 100,000 CNY, but it also says the plan’s multiple is lower than that of leading international products. Both statements cannot be true at once. If the quota figures are accurate, this tier’s multiple is clearly higher than the 20× to 50× range the report cites for international products. The report does not cite a source for that international range, so it needs separate verification.
When you calculate a subscription, confirm three things: whether the equivalent quota includes cache-hit tokens, whether the quota works across models, and whether it resets monthly. Different definitions change what the same multiple means.
6. Model Capability and Cost per Task
Leaderboard rankings show how a model performed on specific tests. They do not directly show the cost of a single task. The report says the new model ranks highly in public evaluations, but it does not name the benchmarks, give test dates, or state specific ranks. This article therefore does not treat rankings as evidence that the pricing is reasonable.
A more useful measure is how many tokens the same task consumes on different models. If the new model produces more concise output on your workload, its higher unit price may be offset. If its output is longer, the cost per task will rise. Only testing on your own workload can confirm which applies.
7. Model Selection Checklist
Before you integrate a model, check the following items:
- Cost per task: Sample 20 to 50 typical requests. Record the uncached input, cache-hit input, and output tokens for each, then calculate the average.
- Cost ceiling: Set the maximum acceptable cost for one task, then check whether each candidate model meets it.
- Cache hit rate: Measure the share of total input made up by fixed prefixes, and record the actual hit rate during testing.
- Output length: Record the average output token count and its distribution, paying particular attention to the share of very long responses.
- Subscription coverage: Calculate the prepaid multiple using the formula above, and confirm the quota definition, validity period, and the models it covers.
- Version changes: Recalculate after every model upgrade. Do not reuse old data.
8. Conclusion
The API unit price is only one part of the cost. To judge whether a model is worth its price, examine the uncached input, cache-hit input, and output usage for each task separately. Then factor in the subscription terms and the structure of your own workload.
