LLM Output Pricing: The Cost Logic Behind Rising Output Prices, Caching, and Long-Running Agents
As LLMs shift from chat tools to persistent agents, a single per-token price no longer reflects the full cost of use. This article breaks down output pricing, cache-hit and cache-miss input pricing, shows how input/output ratios and cache hit rates determine real bills, and outlines practical cost-control strategies for enterprises and individual developers.
As large models gradually move from “conversation tools” to continuously running intelligent agents, the way we observe model pricing also needs to change. In the past, a user might enter a few hundred tokens and receive a paragraph of text, with relatively limited input and output volume. Price differences usually did not have a decisive impact on usage decisions. But in scenarios such as code generation, long-document analysis, automated operations, and multi-turn tool calling, a task may run for hours, input context may reach hundreds of thousands of tokens or more, and the output side may include large amounts of reasoning results, code snippets, and tool scheduling information. At that point, the model’s list price is only part of the cost. Cache hit rate, input/output ratio, and task duration become the key variables that determine the bill.
1. Distinguish Four Price Components First, Rather Than Looking at One Number
Take the public billing structure of a new-generation reasoning model as an example. The output price of the previous-generation model was about RMB 27 per million tokens, while the output price of the new-generation model rose to RMB 100 per million tokens. The input price changed from about RMB 6.5 per million tokens when the cache was missed and about RMB 1.1 when the cache was hit to RMB 20 when missed and RMB 2 when hit.
In absolute terms, the output price increase is the most obvious, nearly four times the original. The input cache-miss price rose about three times, while the cache-hit price increase was relatively moderate. More notably, the price gap between cache hits and cache misses also changed:
- Under the old pricing system, cache-miss input was about 6 times cache-hit input.
- Under the new pricing system, cache-miss input is about 10 times cache-hit input.
- The gap between output price and cached input price widened from about 25 times to about 50 times.
This shows that the billing strategy is reinforcing two signals. First, the model provider wants to encourage long-term reuse of context through low-cost caching. Second, the truly expensive resources are mainly concentrated in new input processing and output generation.
Therefore, it is not accurate to simply say that “all prices have increased several times.” A more precise statement is: output is clearly more expensive, cache-miss input is clearly more expensive, and enterprise tasks that stably reuse prefixes may still reduce actual costs through caching.
2. Real Cost Depends on the Input/Output Ratio
The total cost of a model call can be estimated with a simple formula:
Total cost =Input tokens × effective input unit price+Output tokens × output unit price
If the input/output ratio is denoted as R:1, the cache hit rate as H, the cache-miss input price as Pmiss, the cache-hit input price as Phit, and the output price as Pout, then the average composite cost per million tokens is:
Composite unit price =(R × (H × Phit + (1-H) × Pmiss) + Pout) / (R+1)
This formula reveals a fact that is easy to overlook: even if input prices rise, the final bill may not rise by the same proportion, because output price and the input/output ratio may carry greater weight.
Scenario 1: Enterprise Long-Context Agent
Assume a code agent has an input/output ratio of 20:1 and a cache hit rate of 90%. Based on RMB 2 per million tokens for cache-hit input, RMB 20 for cache-miss input, and RMB 100 for output:
Effective input unit price = 2 × 90% + 20 × 10% = RMB 3.8Composite unit price = (20 × 3.8 + 100) / 21 ≈ RMB 8.4
On the surface, the output price has already reached RMB 100 per million tokens. But because most input can be reused, the final composite cost is about RMB 8.4 per million tokens. For continuously running enterprise systems with large task volumes, this price may still be acceptable.
Scenario 2: Infrequent Individual Developer Use
Now consider another case: the user’s input is different every time, the cache hit rate is only 20%, and the input/output ratio is 5
Effective input unit price = 2 × 20% + 20 × 80% = RMB 16.4Composite unit price = (5 × 16.4 + 100) / 6 ≈ RMB 30.3
The two scenarios use the same model and the same list price, but the composite unit cost differs by about 3.6 times. This shows that model pricing is not a fixed number; it is a result jointly determined by task structure.
3. Why Caching Becomes Central to Pricing
Long-context tasks usually contain a large amount of repeated information, such as:
- Fixed system prompts;
- Project directories and code standards;
- Historical conversations;
- Tool definitions;
- Configuration files that are read repeatedly;
- Long-term unchanged business rules;
- Intermediate state retained across multi-turn tasks.
If this content is reprocessed on every call, it repeatedly consumes prefill computation, memory bandwidth, and context processing resources. Caching can retain prefixes that have already been processed and directly reuse the relevant intermediate results in subsequent requests, thereby reducing repeated computation.
However, caching does not mean “free.” A cache hit still requires request scheduling, state management, and some data reading. Its computational cost is simply significantly lower than full reprocessing. Therefore, the cache-hit price is usually lower than the cache-miss price, but it will not drop to zero.
For enterprises, the cache hit rate depends on system design rather than being entirely determined by the model platform. The following practices usually help improve hit rates:
Place fixed content first
Put stable system instructions, role definitions, and tool descriptions at the front of the context, and keep the content as unchanged as possible.Place dynamic content later
Keep user questions, real-time status, and current task parameters toward the end to avoid invalidating the entire prefix because of small changes.Reduce meaningless timestamps and random identifiers
If the current time, request ID, or similar content is inserted into a fixed prefix on every request, caching may become impossible to reuse.Control the scope of context changes
Do not rewrite the complete project description every turn. Append only incremental information instead.Separate long-term memory from short-term state
Manage stable knowledge, task state, and temporary output in layers, and avoid mixing all information into one constantly changing ultra-long prompt.
4. Why Output Prices Are Usually Higher
Input processing and output generation do not consume exactly the same hardware resources. The input stage mainly performs batch computation over existing context and is suitable for a high degree of parallel processing. The output stage requires token-by-token generation, where each step depends on the previous result, so it has obvious serial characteristics.
During the output stage, the system must continuously perform:
- Sampling and decoding;
- Attention computation;
- KV Cache reads and writes;
- Multi-expert routing;
- Cross-device communication;
- Streaming of results;
- Request-level scheduling and concurrency control.
When the context is very long, generating each new token may require accessing a large KV Cache. Even if the model uses a sparse activation structure, memory access and bandwidth pressure during the output stage remain high. If there are many concurrent requests at the same time, the system also needs to balance throughput, latency, and memory usage.
Therefore, an output token is not simply “generating a piece of text”; it is a series of inference steps that occur continuously. For models that emphasize complex reasoning, code generation, and tool planning, a higher output-side price than input-side price has a certain engineering rationale.
5. After Model Scale Expands, Sparse Activation Does Not Mean Costs Disappear
Current large models commonly use sparse architectures such as mixture-of-experts. A model may have trillions of total parameters, but only a small number of experts are activated each time. This can reduce the amount of computation per call, but it cannot completely eliminate infrastructure costs.
First, the weights of inactive experts usually still need to be deployed in memory or high-speed storage systems. Second, expert routing requires transferring tokens between different computing devices, and communication efficiency directly affects overall performance. Third, the model’s attention structure, cache management, and operator implementation all need to be optimized for hardware.
Therefore, evaluating model cost cannot rely only on “how many parameters are activated each time.” It should also consider:
- The memory scale required for weights to remain resident;
- Communication bandwidth between experts;
- KV Cache capacity and lifecycle;
- Memory access efficiency under long context;
- Scheduling overhead for concurrent requests;
- Continuous decoding cost during the output stage;
- Redundant resources reserved for low-latency service.
As models expand from the trillion-parameter scale to even larger scales, deployment and operations costs may still rise significantly even if the activated parameter ratio remains low.
6. Enterprises and Individual Users Should Adopt Different Usage Strategies
For enterprise users, the focus is not simply pursuing the lowest list price, but improving the utilization of effective tokens. They can start from the following aspects:
- Version and manage fixed prompts;
- Monitor cache hit rates and reasons for cache misses;
- Compress tool descriptions;
- Summarize long conversation history into structured state;
- Use lightweight models for simple tasks;
- Use high-capability models for complex planning, code refactoring, and similar tasks;
- Improve resource utilization through queues and batch processing;
- Set per-task token limits and abnormal termination mechanisms.
For individual developers, the most effective approach is usually to reduce invalid output and repeated context. For example, when debugging code, submit only the necessary files and relevant error logs instead of attaching the complete project every turn. When generating documents, first ask the model to produce an outline, then expand section by section. For complex tasks, ask the model to provide a plan first and execute after confirmation, avoiding generating large amounts of useless content at once.
7. Do Not Look Only at the Price per Million Tokens
To ultimately evaluate whether a model is cost-effective, at least the following metrics should be considered:
Effective task cost =Model call cost+Failed retry cost+Human review cost+System waiting cost+Context maintenance cost
A model with a lower price but frequent incorrect outputs may require multiple retries, making the actual cost higher. A model with a higher price but fewer tool calls and less manual correction may also have better overall economics.
Therefore, when selecting models, enterprises should build benchmarks based on real tasks and record success rates, average output length, cache hit rates, number of calls per task, human intervention time, and final completion cost, rather than comparing input and output unit prices alone.
Conclusion
The rise in prices for new-generation large models is not merely a simple commercial price increase. It also reflects infrastructure changes as models move from short conversation services to long-context, complex reasoning, and continuous agent operation. Output generation, KV Cache, cross-device communication, and high-concurrency scheduling all increase inference costs.
For enterprise tasks with high reuse and long-running cycles, caching may significantly reduce average input costs. For individual users with low-frequency, short tasks and different prompts each time, cache-miss input and high output prices will be reflected more directly in the bill. The truly rational approach is to estimate the composite unit price based on task structure, optimize how context is organized, and evaluate model call costs within the complete business workflow.
