LLM API Pricing Breakdown: How Cache Hits Save Real Money

    API pricing has become a critical factor for developers when selecting large language model (LLM) services. This article analyzes the pricing structure of a recently released V4 series model, highlighting the significant cost gap between cache hits and misses, the impact of compute supply constraints, and strategies developers can use to optimize their API calls. By understanding the underlying pricing logic and leveraging cache-friendly request designs, developers can potentially reduce their API costs significantly.

    1. LLM Services Enter a Refined Pricing Stage

    API pricing has become a core variable for developers when selecting LLM services. The cost of LLM services is determined by multiple factors, including compute hardware, inference engine efficiency, cache hit rate, and network transmission. Its structure is much more complex than the pay-as-you-go model of traditional cloud resources.

    In April 2026, a vendor released the V4 series models along with a new API pricing structure. Input prices are tiered based on cache hits and misses, with a substantial gap between the two, while output prices remain relatively high. This structure has sparked extensive discussion within the developer community. It reflects three trends: inference costs are beginning to diverge, the commercial value of caching is being factored into pricing, and the constraints of high-end compute supply on pricing are becoming more apparent.

    Using this pricing system as a starting point, this article will discuss cost composition, pricing logic, compute constraints, developer optimization methods, and evaluation frameworks for model selection.

    2. V4 Series Price Structure Breakdown

    The table below shows the API prices from the vendor’s announcement, with the unit being CNY per million tokens. The pricing information is based on the official announcement released in April 2026. Please refer to the vendor’s official website for the latest announcements before use.

    Billing Scenario Price (CNY/Million Tokens) Status
    Input (Cache Hit) 0.025 Limited-Time Discount
    Input (Cache Miss) 3 Standard Pricing
    Output 6 Standard Pricing

    2.1 The 120x Price Gap Between Cache Hits and Misses

    The input price for a cache miss is 3 CNY, while for a cache hit, it is 0.025 CNY, resulting in a 120x difference (3 / 0.025 = 120). This gap stems from the difference in computational load during the inference process.

    Inference is divided into two stages. The first stage is prefill, where the model must compute attention and feedforward networks for all input tokens. The computational load grows rapidly as the input length increases. When a request hits the cache, the already computed prefix KV Cache can be directly reused, and the model only needs to process the newly added parts. Consequently, the compute consumption during the prefill stage can be reduced by about two orders of magnitude.

    This does not mean the total API cost will drop by two orders of magnitude. The output stage still requires token-by-token generation, billed at 6 CNY. Therefore, the overall cost reduction depends on the proportion of input and output tokens in the total volume.

    2.2 Why Output Pricing is Higher than Input Pricing

    The output price is twice the base input price. Output tokens must be generated one by one, and each step depends on the KV Cache of all preceding tokens. It cannot be processed in parallel within the same request like the input. Even if the service provider increases overall throughput through batching, the decoding time and memory footprint for a single request remain higher, leading to higher pricing.

    2.3 The Meaning of the Limited-Time Discount

    The cache hit price is currently a limited-time discount. The announcement does not specify the price after the promotion ends, so it can only be confirmed as a temporary rate. If the cache hit rate and cache capacity improve as expected, this price might become permanent. If operational costs change, the price could also be readjusted. When making long-term budgets, users should treat the limited-time price as uncertain.

    3. How Compute Supply Affects Pricing

    The announcement states: “Constrained by high-end compute, service throughput is limited. Prices may further decrease after super nodes are mass-produced and launched in the second half of the year.” This indicates that compute supply is one of the primary constraints on current pricing.

    3.1 Scarcity Premium

    The production capacity of high-end accelerator chips is limited by wafer manufacturing, packaging and testing, and server integration, making the expansion cycle quite long. When supply is tight, the marginal compute cost for service providers remains high. In this situation, API pricing is not solely determined by algorithmic costs but also includes a scarcity premium.

    3.2 Impact of Super Nodes on Costs

    Super nodes use high-speed interconnects to form a tightly coupled compute domain from a large number of acceleration units. For inference services, this has two main impacts:

    • Memory Pooling: The KV Cache consumes a significant amount of memory. Super nodes can pool this memory, allowing the KV Cache to no longer be confined to a single card. This improves both the cache hit rate and the concurrency capacity of a single node.
    • Communication Bottleneck Alleviation: In traditional distributed inference, inter-node communication in tensor parallelism often becomes a throughput bottleneck. The high-bandwidth, low-latency interconnects of super nodes can alleviate this issue, increasing the effective throughput per unit of compute.

    3.3 Relationship Between Throughput and Unit Cost

    Let Tps be the number of tokens processed per second by a single card, and C_card be the cost per unit of time for a single card. The compute cost per token is C_token = C_card / Tps. Super nodes increase Tps on one hand and dilute hardware and operational costs on the other, leaving room for price reductions.

    Below is a scenario projection, not an official forecast. Assuming that after super nodes go live, the compute cost per token drops to 1/3 to 1/2 of the current level, and market demand remains unchanged, the service provider passes the entire cost reduction to the price. The theoretical range for the output price would then be 6 (1/3) = 2 CNY to 6 (1/2) = 3 CNY. Actual pricing will also be affected by gross margins, competition, and demand changes, so results may vary.

    4. How Developers Can Reduce API Call Costs

    For enterprises and individual developers with high call volumes, understanding the pricing structure and adjusting calling methods accordingly can lead to an order-of-magnitude difference in costs.

    4.1 Constructing Cache-Friendly Requests

    The core idea is to place stable content at the beginning of the request and variable content at the end. A cache hit requires the prefix to match byte-for-byte; any slight difference will cause a cache miss. The following example demonstrates the difference between two approaches.

    1. import time
    2. # Non-cache-friendly approach: Inserting a timestamp before the system prompt makes the prefix different for every request, preventing cache hits
    3. def chat_naive(system_prompt, history_messages, current_query):
    4. stamped_system = f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] {system_prompt}"
    5. messages = [{"role": "system", "content": stamped_system}] + history_messages + [{"role": "user", "content": current_query}]
    6. return call_llm(messages)
    7. # Cache-friendly approach: The system prompt is a fixed string, history messages are only appended, not rewritten, and dynamic info is placed at the end of the user message
    8. def chat_cache_optimized(system_prompt, history_messages, current_query):
    9. now = time.strftime('%Y-%m-%d %H:%M:%S')
    10. messages = [{"role": "system", "content": system_prompt}] + history_messages + [{"role": "user", "content": f"{current_query}\n(Current time: {now})"}]
    11. return call_llm(messages)

    When using the second approach, two things must be confirmed. First, the server supports prefix caching. Second, the caller does not modify existing history messages. System prompts, tool definitions, and few-shot examples should be fixed at the very beginning of the request so that their hash values remain stable.

    Risk Warning: Cacheable prefixes should not contain user privacy, API keys, identity information, or other sensitive data. Cached content may be reused by subsequent requests under the same account; multi-user or multi-tenant scenarios should pay special attention to isolating prefixes by user.

    4.2 Monthly Cost Estimation Model

    Monthly costs can be estimated using the following formula:

    1. Monthly Cost = Uncached Input Tokens * 3 CNY/Million + Cached Input Tokens * 0.025 CNY/Million + Output Tokens * 6 CNY/Million

    Let Q be the daily request volume, L_in be the average input length per request, L_cache be the cacheable prefix length, h be the cache hit rate, and L_out be the average output length per request. Then:

    • Daily Uncached Input Cost = Q (L_in - L_cache h) / 1,000,000 * 3 CNY
    • Daily Cached Input Cost = Q L_cache h / 1,000,000 * 0.025 CNY
    • Daily Output Cost = Q L_out / 1,000,000 6 CNY

    Example: An application has 1,000,000 daily requests, with an average input of 4,000 tokens, of which 3,000 are stable prefixes that can hit the cache. The average output is 500 tokens.

    Billing Item Calculation Daily Cost
    Uncached Input 1,000,000 (4,000 - 3,000) / 1,000,000 3 CNY 3,000 CNY
    Cached Input 1,000,000 3,000 / 1,000,000 0.025 CNY 75 CNY
    Output 1,000,000 500 / 1,000,000 6 CNY 3,000 CNY
    Total 6,075 CNY

    Calculation breakdown: The total daily input volume is 1,000,000 4,000 = 4 billion tokens, or 4,000 million tokens. If all were charged as uncached, the input cost would be 4,000 3 = 12,000 CNY. With caching enabled, the input cost is 3,000 + 75 = 3,075 CNY, saving 8,925 CNY on the input side, or about 74%. If the output cost of 3,000 CNY is also included, the total cost without caching would be 15,000 CNY. With caching enabled, it drops to 6,075 CNY, reducing total costs by approximately 60%.

    4.3 Determining Priorities by Use Case

    • High Cache Hit Rate Scenarios: Such as customer service bots, document Q&A, and code completion. These scenarios are well-suited for this pricing structure, as long and stable prefixes can significantly dilute input costs.
    • High Dynamic Input Scenarios: Such as data analysis, real-time translation, and open-ended multi-turn conversations. Cache hit rates are typically low, causing input costs to rise. Alternative solutions should be evaluated.
    • High Output Scenarios: Such as long-form generation, report writing, and code generation. Output cost is the primary variable. Focus should be placed on controlling output length and using structured output constraints.

    5. Price Trend Forecast and Selection Framework

    5.1 Short-term (Before Q3 2026)

    The announcement mentions that compute supply is constrained, so prices are highly likely to remain at current levels in the short term. The limited-time cache price may also be extended for a period. This is a judgment based on the announcement, not a vendor commitment.