Tiered Pricing and Cache Cost Optimization for LLM Inference Services
This article examines cost governance for LLM inference services that support standard and high-speed tiers plus context-cache billing. It breaks down billing dimensions, explains how to route requests by value across tiers, provides a break-even method for cache writes, and presents a token-structure cost model and practical governance controls.
Introduction
Cost governance for LLM inference services is moving from rough “per-token” estimates to detailed accounting based on request structure. A typical billing model no longer distinguishes only between input and output; it also introduces context caching, where cache hits, short-lived writes, and long-lived writes often use different unit prices. At the same time, service tiers are often divided into a standard tier and a high-speed tier, with the high-speed tier trading a higher unit price for lower latency or stronger service guarantees. If a team still budgets only with “input unit price × total input volume,” it can easily underestimate the costs caused by output, cache writes, and the share of high-speed tier usage.
This article discusses a class of LLM inference services that support standard tiers, high-speed tiers, and context-cache billing. It focuses on three questions: how billing dimensions should be broken down; how standard and high-speed tiers should be layered by request value; and how caching strategies can use break-even calculations to avoid the waste of “writing cache that is never used.” The pricing coefficients in this article are illustrative only and do not correspond to any actual service quote.
1. Billing Dimensions: Base Tokens and Context Caching
Base tokens are usually divided into input and output, which have different unit prices; output is often significantly more expensive than input. The reason is that the output side involves per-token decoding, service-time occupancy, and concurrent resource consumption. From an engineering perspective, “input inflation” and “output inflation” should be managed separately: on the input side, control can come from prompt compression, context pruning, and retrieval-snippet reranking; on the output side, control can come from maximum output length, structured-output constraints, summary-style responses, and stop conditions.
Context caching makes the cost of “repeated context” explicit. Common billing items include:
- Cache hit: context tokens that hit the cache are billed at a lower unit price, usually significantly below the base input price;
- Cache write (short-lived): writing to cache for a shorter retention window, with a unit price that may be close to base input;
- Cache write (long-lived): writing to cache for a longer retention window, usually at a higher unit price than short-lived writes because resources are occupied for longer.
This means caching is not a “free accelerator.” Writes themselves have a cost, and a cache produces net benefit only when the savings from subsequent hits exceed the write cost. Especially when the long-lived cache unit price is high, reuse count and retention window must be used for break-even judgment.
2. Standard vs. High-Speed Tiers: Selection Logic Behind the 2x Price
In tiered pricing, the high-speed tier often appears as a fixed multiple of the standard tier, such as 2x. This multiple should not be understood simply as “the same service at a higher price”; it should be treated as a premium for requests that are sensitive to latency, throughput, or service guarantees. Selection should be layered by request value rather than switched for all traffic.
The following table shows illustrative relative coefficients only, to explain the calculation method:
| Tier | Input coefficient | Output coefficient | Cache-hit coefficient | Short-write coefficient | Long-write coefficient |
|---|---|---|---|---|---|
| Standard tier | 1.00 | 5.20 | 0.10 | 1.00 | 2.00 |
| High-speed tier | 2.00 | 10.40 | 0.20 | 2.00 | 4.00 |
| Previous-generation standard tier | 1.55 | 7.70 | 0.15 | 1.55 | 3.10 |
As the table shows, all billing items for the high-speed tier are roughly scaled up proportionally. If the latency loss of a request is far higher than the token cost—for example, in online interaction, real-time risk-control assistance, or conversational troubleshooting—the high-speed tier may be reasonable. If the request is offline batch processing, nightly summarization, data cleaning, or batch classification, the standard tier is more appropriate. A more granular approach is “request-based routing”: high-value, short-context, strongly interactive requests go to the high-speed tier; long-context, queueable requests whose results can be obtained asynchronously go to the standard tier.
3. Engineering Implications of Generational Price Reductions
When a new-generation standard tier has a lower price than the previous generation, the migration benefit is not equal to “unit price reduction × current usage.” Actual total cost is also affected by quality changes, output length changes, retry rate, cache hit rate, and concurrency strategy. If the new-generation model answers more concisely, output tokens may decrease; if improved quality reduces retries, invalid costs will also decrease. Conversely, if the new-generation model tends to produce longer outputs, total cost may still rise even though the output unit price is lower.
Therefore, migration evaluation should include: a quality regression set, average input/output tokens, cache hit rate, failure retry rate, high-speed tier share, and unit business cost. It is advisable to run a small-traffic canary first, split bills by business function, and then decide on full migration. A generational price reduction is one sufficient motivation for migration, but it is not the only basis.
4. Cost Model and Budget Formula
Let Tin_miss be uncached input tokens, Tin_hit be cache-hit input tokens, Tout be output tokens, Tw5 be short-lived write tokens, Tw1h be long-lived write tokens, P be the base input unit price, and F be the tier multiplier. An illustrative cost model is:
C = F × (Tin_miss × P+ Tin_hit × P × 0.10+ Tout × P × 5.20+ Tw5 × P × 1.00+ Tw1h × P × 2.00)
The value of this formula is that it separates the accounting for input, output, hits, and writes. Engineering teams should collect the share of each token type rather than looking only at total tokens. Budget alerts should also be set separately: output cost share, long-lived write cost share, high-speed tier cost share, and minimum cache hit rate.
Cache break-even can be simplified as follows: if the short-lived write cost is 1 per token and a hit saves 0.9 compared with an input miss, about 1.12 effective hits are needed to break even; if the long-lived write cost is 2, about 2.22 effective hits are needed. The high-speed tier scales proportionally, so the absolute amount doubles, but the break-even hit count remains unchanged. If the expected reuse count of a context is below the threshold, it should not be written to long-lived cache.
5. Caching Strategy: Stable Prefixes, Layered Context, and TTL
Cache benefit comes from “reusability.” In practice, priority should be given to stabilizing the prompt prefix, system instructions, tool descriptions, and fixed knowledge snippets so that the cache key remains stable; volatile content should be placed later to reduce cache invalidation. Context should be layered: a long-term stable layer, a session-stable layer, and a request-level volatile layer. Short-lived cache is suitable for bursty multi-turn requests or short-window reuse; long-lived cache is suitable for stable knowledge across requests and sessions, but it must be evaluated through reuse-count thresholds and retention windows.
Monitoring metrics should include: cache hit rate, post-write hit conversion rate, long-lived write share, hit savings amount, write waste amount, and per-request token structure. If the post-write hit conversion rate is low, the retention window should be shortened or writes should be canceled; if the hit rate is high but output cost remains high, output length should be governed.
6. Tier Selection and Governance Practices
It is recommended to establish four layers of governance: first, request-level tiered routing, with online high-value requests going to the high-speed tier and offline batch processing going to the standard tier; second, output budgets, with maximum output length and structured constraints; third, cache budgets, where reuse count determines whether to write and how long to write; fourth, bill splitting by function, tenant, tier, and cache type. Common pitfalls include looking only at input unit price, ignoring output unit price, using the high-speed tier for all traffic, writing long-lived cache for low-frequency context, and failing to monitor actual hits after cache writes.
The conclusion is that tiered pricing and cache billing move cost optimization from “unit price comparison” to “request-structure governance.” Only by accounting for input, output, hits, writes, and tier multipliers at the same time can teams make auditable and reproducible technical decisions.
