LLM API Pricing Jumped 5x? How to Calculate the Real Cost
A practical framework for understanding LLM API pricing after a sharp price increase: how to break down input, output, cache-hit, and cache-write billing, why the input-to-output ratio determines the real impact, how effective cost per accepted task compares to nominal unit price, how subscription credit leverage changes the true cost, and which context-engineering and budget-governance practices reduce spending in a vendor-neutral way.
1. The Signal Behind a Sudden Unit-Price Jump
A general-purpose LLM API recently raised its public prices significantly. Compared with the previous generation, the output-side unit price increased roughly fivefold, reaching the order of 100 CNY per million tokens, with input around 20 CNY and cache hits around 1 CNY. Pricing for leading models in the industry is typically another order of magnitude higher.
For developers, the real issue is not whether it is “expensive” but that the cost structure has been reshuffled. Applications that relied on cheap prices to pile up call volume may see gross margin turn negative overnight, while agent-style applications that depend on long context and repeatedly replay the same prefix may actually benefit from the extremely low cache-hit price. To judge the true impact of a price increase, you need a reusable cost model rather than a gut comparison of unit prices.
2. Breaking Down the Billing Dimensions: Four Prices You Cannot Mix
Mainstream APIs generally split billing into four categories, and understanding the differences is the prerequisite for doing the math:
- Input tokens: the prompts, system instructions, conversation history, and retrieved document fragments you send.
- Output tokens: the content the model generates, usually several times the input unit price and the main cost driver.
- Cache-hit tokens: the portion identical to the prefix of a previous request, often priced at only a fraction of normal input.
- Cache write/storage: some offerings charge extra for the initial cache write or for retaining the cache, which needs to be confirmed separately.
A schematic cost function looks like this:
def cost(input_tok, output_tok, cache_hit_tok, price):return (input_tok * price["in"] / 1_000_000+ output_tok * price["out"] / 1_000_000+ cache_hit_tok * price["cache"] / 1_000_000)
The key point: the input-to-output ratio (I/O ratio) determines how hard a price increase actually hits. Summarization and rewriting tasks produce far more output than input and are hit hardest by output price increases. Code completion and long-document Q&A take in far more than they generate, and their prefixes are highly repetitive with a high cache-hit ratio, so the effective increase is heavily diluted.
3. Why the Higher Price Can Be Justified: Benchmarks vs. Real Utility
The source notes that the new-generation model ranks near the top of public evaluations. From an engineering standpoint, a higher capability ranking does translate into quantifiable substitution gains:
- Fewer retries and less manual rework: a higher first-attempt success rate compresses the cost of multiple calls into one.
- Shorter chains: stronger reasoning reduces multi-stage orchestration such as “large model decomposes, small model executes,” lowering total token consumption.
- Replacing more expensive options: as long as the higher-priced model still costs significantly less than the next tier up, it remains a cost-effective choice on the budget sheet.
So evaluating a price increase means looking not at unit price but at cost per unit of effective output:
effective cost = total spend / tasks that passed acceptance
A cheap model that needs three retries may have a higher effective cost than an expensive model that succeeds on the first try.
4. The Overlooked Lever: Plan Multipliers Decide Real Value
The most valuable observation in the source is the distinction between “nominal unit price” and the “plan redemption ratio.” For a subscription model, this can be abstracted as:
redemption leverage L = usable credit inside the plan (CNY) / plan price (CNY)
If a 199 CNY tier comes with roughly 1,200–2,800 CNY of usage credit, leverage is about 6–14x. If a low tier offers 99 CNY for 2,000–5,000 CNY of credit (20–50x leverage), and a high tier offers 699 CNY for 50,000–100,000 CNY of credit (70–140x leverage), the actual unit cost may end up lower than that of a competitor with a cheaper unit price.
This explains a common misjudgment: a cheap unit price does not mean a cheap bill. What really determines monthly spend is “leverage × your average consumption per task.” The source notes that average consumption per task in one evaluation already approaches the most expensive tier, which means that under a high-leverage plan, the absolute bill for the higher-priced model may still stay in a manageable range.
5. Caching and Context Engineering: The Most Effective Cost Lever
When output prices are high, the most controllable optimization is not cutting features but raising the cache-hit rate:
- Prefix stabilization: put system prompts, tool definitions, and few-shot examples at the very front and never concatenate them dynamically; push variables such as timestamps and random IDs to the end.
- Segmented caching: split long documents into a “stable part + changing part” and reuse cache only for the stable part.
- Semantic deduplication: merge retrieved results by similarity first to avoid feeding the same fragment in repeatedly.
- Output constraints: use structured output and maximum-length limits to suppress redundant generation, directly cutting the most expensive output tokens.
[stable prefix: system instructions + tool schema + fixed examples] <- high hit rate[semi-stable segment: knowledge base fragments] <- medium hit rate[changing segment: user question + timestamp] <- no hit
6. Budget Governance: Turning Cost into an Observable Metric
Token cost should be brought into routine monitoring and combined with general cloud capabilities such as logging services, monitoring and alerting, and message queues to close the loop:
- Instrumentation: log input, output, and cache-hit token counts plus a task ID on every call.
- Attribution: aggregate by business line, tenant, and feature module to locate the biggest consumers.
- Quotas: set token budgets and circuit-breaker thresholds for links of different priority.
- Degradation: automatically switch to a smaller-parameter model or a cached result when the budget is exhausted.
- Regression: track “effective cost” continuously with a fixed evaluation set instead of tracking unit price.
Schematic budget check:
DAILY_BUDGET = 300.0 # CNYif spent_today + estimated_cost > DAILY_BUDGET:route_to_small_model(query) # degradation path
7. A Selection Checklist
Facing a price increase, ask yourself in this order:
- What is my I/O ratio? The higher the output share, the more urgent it is to optimize generation length.
- Can prefix repetition reach 70% or more? This directly determines the caching dividend.
- What is the plan redemption leverage L? Use it, not unit price, for side-by-side comparison.
- Which tier does average consumption per task fall into? Choose a subscription tier accordingly rather than pay-as-you-go.
- Is the effective cost better than the alternatives? Recompute with tasks that passed acceptance as the denominator.
8. Conclusion
A fivefold price increase is not the conclusion; the bill structure is. Break billing into input, output, and cache hits, add the two variables of plan redemption leverage and cache-hit rate, and adopt “cost per unit of effective output” as a single yardstick. Developers can then make unemotional decisions in front of a more capable but pricier new-generation model: optimize where optimization is due, switch tiers where a tier switch is due, and degrade where degradation is due. This method depends on no particular vendor and can be applied directly to price evaluation for any model service.
