Understanding LLM Inference Pricing: From Per-Token Rates to Task-Level Cost Evaluation
This article explains why comparing LLM API prices by per-token rates alone is misleading, and why enterprises should evaluate model costs based on complete task completion. It introduces a practical framework for calculating unit task cost, highlights the hidden value of cache hits, discusses how model capability affects total spending, and provides steps for building a task-driven cost evaluation system.
Why a “5x Price Increase” Should Not Be Judged by Sticker Price Alone
Recent discussions among developers have focused on a new flagship model version whose inference prices are noticeably higher than its predecessor: approximately ¥100 per million output tokens, ¥20 per million input tokens, and ¥1 per million cached tokens. At first glance, these numbers suggest that models are becoming more expensive.
However, for enterprise applications and complex agent-based workflows, token unit price alone is insufficient for evaluating true costs. What actually determines budget impact is: how many model calls are needed to complete one business task, how many input and output tokens each call consumes, how much content can hit the cache, and what additional overhead arises from failures or retries.
A more reliable approach is to introduce “unit task cost,” defined as:
Unit Task Cost = (Cost per Call × Average Number of Calls) + Retry Cost + Cache Miss Cost
This evaluation method is closer to real business usage and helps explain why some models with higher token prices may not lead to excessive total spending in complex tasks.
Pricing Structure Determines Real Cost: The Underestimated Value of Cache Hits
Current LLM inference pricing typically consists of three components: input token price, output token price, and cached token price. Many developers habitually compare only input and output unit prices, overlooking how much cache hit rates affect overall cost.
Consider a typical long-context task:
Total input tokens: 100,000Total output tokens: 5,000Cache hit ratio: 70%
Estimated costs across different models may look like this:
| Model Tier | Input Price | Output Price | Cached Token Price | Single-Task Cost |
|---|---|---|---|---|
| High-tier model | ¥20 / 1M tokens | ¥100 / 1M tokens | ¥1 / 1M tokens | ≈ ¥2.57 |
| Low-tier model | ¥3 / 1M tokens | ¥6 / 1M tokens | ¥0.5 / 1M tokens | ≈ ¥0.35 |
From a single-task perspective, a multi-fold gap still exists. But if the higher-priced model can compress a task that normally requires five calls into two or even one—thanks to stronger planning, reasoning, and tool-calling capabilities—the total cost comparison shifts dramatically.
This is the essence of “capability premium”: the per-token price is higher, but task completion efficiency is better, so the ultimate unit task cost may fall into the same order of magnitude.
Task Completion Cost: A More Business-Oriented Metric
In real-world development, models are rarely used in isolation. They function as core components in agents, code generation pipelines, data analysis systems, or knowledge Q&A platforms. In such contexts, a single “task” may involve multiple rounds of calls, tool execution, result validation, and exception-driven retries.
For example, a code generation task may include:
- Understanding requirements and producing a solution plan;
- Generating code based on the plan;
- Running tests via testing tools;
- Fixing errors based on test results;
- Outputting final code and explanations.
If the model lacks sufficient capability, steps 3 and 4 may repeat multiple times, pushing total spending far beyond what the initial low token-price estimate suggested.
Therefore, enterprises should adopt the following evaluation metric:
Task Completion Cost = Total Model Call Cost + Tool Call Cost + Human Correction Cost
Human correction cost is often ignored. A lower-priced model that produces code with higher error rates forces developers to spend significant time fixing issues—cost that quickly exceeds the model API fees themselves.
Different Pricing Logic: Open-Weight vs. Closed-Source Models
When discussing pricing, it is also necessary to distinguish between open-weight models and closed-source models.
Open-weight models are typically deployed flexibly. Enterprises can self-host them or use cloud-based inference services. Their strengths are controllability and lower per-token costs, making them suitable for large-scale, standardized, and cost-sensitive workloads.
Closed-source or high-capability models, by contrast, tend to deliver more stable performance in complex reasoning, tool calling, and instruction following. Their pricing reflects not only model capability but also additional value such as security compliance, service availability, and technical support.
Thus, directly comparing token prices is not entirely fair. A more rational approach is:
- For simple, high-frequency, and standardized tasks, prioritize models with lower unit token costs;
- For complex, low-error-tolerance tasks requiring multi-step planning, prioritize task completion cost and stability;
- For mixed workloads, adopt a “routing strategy” that dispatches simple tasks to low-cost models and complex tasks to high-capability models.
Technical Trends Behind Price Shifts
Looking at the industry as a whole, fluctuations in LLM inference pricing are not purely driven by marketing strategy. Deeper causes stem from several technical variables:
1. Increased Inference Compute Requirements
Newer models introduce longer chains of thought, stronger search mechanisms, and more robust verification during inference. While output quality improves, compute consumption per inference rises noticeably.
2. Extended Context Lengths
Improved long-context capability means a single request may include many more tokens. Even if the unit price stays constant, the absolute cost per call increases.
3. Optimized Caching Mechanisms
To reduce costs in long-context scenarios, model providers typically strengthen caching systems. Cached token prices are far lower than standard input prices, encouraging developers to reuse static system prompts, tool definitions, and historical dialogue content.
Cache Hit Cost = Fixed Prefix Token Count × Cached Token Price
This is especially important for agent workflows, knowledge base Q&A, and code repository analysis.
How Enterprises Can Build Their Own Cost Evaluation System
Given the pricing differences across models, enterprises should not rely solely on published price sheets. They need an evaluation process tailored to their own workloads.
Step 1: Categorize Task Types
Classify model calls in your business into groups such as:
- Text classification and extraction;
- Summarization and rewriting;
- Code generation and repair;
- Knowledge Q&A;
- Multi-turn dialogue;
- Agent planning and tool calling.
Different tasks place very different demands on model capability.
Step 2: Design a Benchmark Test Set
Prepare representative samples for each task category, and document expected outputs and acceptance criteria.
Step 3: Calculate Unit Task Cost
Run the benchmark set on candidate models and record:
Unit Task Cost = Total Cost / Number of Successfully Completed Tasks
A task is “successfully completed” only if it meets business-defined accuracy and format requirements.
Step 4: Factor in Stability and Latency
Beyond cost, evaluate output consistency, average response time, and retry rates. A model with a higher unit price but significantly higher first-attempt success rate may still reduce end-to-end pipeline costs.
A Rational View of “Price Increases”: From Price Competition to Capability Tiering
Changes in LLM pricing reflect an industry transition from an early “low-price customer acquisition” phase toward a “capability tiering” phase.
In the early stage, model capability differences were not obvious, and price became a primary competitive lever. But as demand for complex tasks grows, enterprises increasingly realize that whether a model can reliably complete difficult tasks matters more than how much cheaper its token price is.
Therefore, even if a new model version has higher token prices, as long as it significantly reduces task failure rates, lowers retry counts, and increases automation levels, it may still lower overall costs for the enterprise.
This also means developers should not simply ask, “How much per million tokens?” They should instead ask:
- In my business scenario, how many tokens does one task consume on average?
- What cache hit rate can I realistically achieve?
- What is the first-attempt success rate?
- How much human intervention is required?
- After all factors are considered, what is the unit task cost?
Practical Recommendations: Using Caching and Task Design to Control Costs
Regardless of which model you choose, sound application design can significantly reduce inference costs.
1. Fixed Prefix Caching
Place static system prompts, tool definitions, and knowledge base snippets at the front of the context to fully leverage cached token pricing.
Fixed Prefix + Dynamic Content
2. Context Trimming
Avoid passing all irrelevant historical information to the model. Use retrieval, summarization, or context compression to reduce token consumption.
3. Tiered Model Routing
Use lightweight models for simple tasks, and reserve high-capability models only for difficult problems.
4. Task Decomposition with Validation
Break large tasks into independently verifiable subtasks to reduce overall retries caused by mid-pipeline failures.
Conclusion
Changes in LLM inference pricing should not be judged solely by token unit prices. For developers and enterprises, the more important step is to establish a “unit task cost” and “total cost of ownership” evaluation framework that accounts for model capability, cache hit rates, first-attempt success rates, and human correction costs.
As the industry moves from price competition to capability tiering, the key question in model selection is no longer “Which model is cheaper?” but rather “Which model can complete my business tasks reliably at the lowest total cost?” Only cost measurement grounded in real tasks can truly guide technical decisions and budget planning.
