How to Control LLM API Costs After Price Increases

    This article explains why LLM API prices are rising, how a peak and off-peak pricing structure affects costs, and how teams of different sizes can reduce spending through better cache hit rates, off-peak scheduling, and lower token consumption.

    1. Background of the Price Change

    LLM API pricing is moving away from early subsidies and promotional discounts toward prices based on actual costs. In the early stage, many platforms set low prices, and sometimes offered free access, to attract developers. As model parameters grow and each inference consumes more compute, providers need prices that cover their real costs.

    Inference accounts for the largest share of model service costs. It depends directly on parameter count, context length, and output length. Newer flagship models use more complex attention computation, so a single request consumes noticeably more compute than in the previous generation. Rising hardware procurement, electricity, and data center operating costs have also pushed prices up.

    2. Pricing Structure of This Adjustment

    The table below is based on the public pricing plan of a major LLM platform. Prices are in CNY per million tokens. For the platform name and effective date, refer to the official announcement.

    Pricing item Period Adjusted price Notes
    Output Peak (weekdays, 10:00–22:00) About 7.7 About twice the off-peak output price
    Output Off-peak About 3.8 About 51% lower than peak
    Cache-hit input Subject to official rules About 0.312 Up from 0.025, about 12.5 times higher, an increase of roughly 1,148%
    Standard input Peak and off-peak See the official price list —

    This pricing structure reflects three changes.

    First, off-peak prices are lower than peak prices. The platform wants to use idle compute capacity. When developers run non-real-time tasks during off-peak hours, the platform improves hardware utilization, and developers receive a discount.

    Second, input and output are priced separately. Output is generated token by token, which takes longer and uses more GPU memory, so its unit price is higher.

    Third, the price of cache hits has risen sharply, but it remains far below the price of standard input. The platform appears to be using price signals to encourage developers to optimize their prompt structure.

    3. Impact on Teams of Different Sizes

    Individual developers and prototype projects usually have small call volumes. At 10 million output tokens per month, billing all output at peak prices costs about CNY 77, and at off-peak prices about CNY 38. Costs stay manageable during testing. Once a product enters its growth phase and call volume rises tenfold, costs rise by a similar factor. For this reason, it is advisable to record the token consumption of every request from the start.

    Small and mid-sized startups are more sensitive to price. At 100 million output tokens per month, output costs are about CNY 770 at peak prices and about CNY 380 off-peak. If the workload is concentrated during weekday daytime hours, the cost pressure is much higher than it would be off-peak. These figures cover output only. Input and cache costs must be added separately.

    Large enterprises often have tiered or custom agreements with cloud providers, so their effective prices are lower than the public list prices. For these companies, the main impact of the price change is on architecture decisions. Simple tasks such as text classification and intent recognition can run on lightweight models, while only complex reasoning calls the flagship model. This is known as dynamic routing based on task difficulty. Some enterprises with strong technical capabilities are also accelerating private deployment or fine-tuning of open-source models to reduce their dependence on any single external API.

    4. Cost Calculation Formula

    1. Call cost = Σ(standard input tokens × standard input price)
    2. + Σ(cache-hit tokens × cache-hit price)
    3. + Σ(output tokens × output price for the applicable period)

    Track each component separately. Total token counts alone do not show the share of input, output, and cache costs, so they do not reveal where optimization will have the most impact.

    5. Three Methods to Reduce Costs

    5.1 Improve Cache Hit Rates

    Cache-hit input costs far less than standard input, making it the most direct source of savings. To use it effectively:

    • Place fixed content, such as system instructions, knowledge base content, and few-shot examples, at the start of the prompt, and keep the wording exactly the same. Any change in wording can invalidate the cache.
    • In multi-turn conversations, compress the history into a summary so that the full context is not resent in every turn.
    • Use the cache hit fields in the API response to measure hit rates and find out why requests miss the cache. Cache lifetime, minimum prefix length, and field names are defined in the official documentation.

    5.2 Move Non-Real-Time Tasks to Off-Peak Hours

    Off-peak output costs about half of peak output, which gives a direct economic reason to schedule work asynchronously. Tasks such as data analysis reports, batch content labeling, and offline corpus cleaning can be sent through a message queue to a delayed executor and run together at night.

    The savings depend on three factors: the share of output costs in total spending, the share of output that can be moved to off-peak hours, and the price gap between the two periods. For example, if output accounts for 50% of total costs and 40% of that output can move to off-peak hours, the savings are about 50% × 40% × 51% ≈ 10%. This is only an illustration. To measure the actual benefit, use your own billing data.

    Service agreements should state the delivery window for asynchronous tasks, such as “delivery within T+N hours,” so that business teams do not misunderstand what a delay means.

    5.3 Reduce Token Consumption

    Reducing the number of tokens is as effective as lowering unit prices. There are three main approaches:

    • Input side: Use semantic compression to turn lengthy background material into a structured list of facts.
    • Output side: Set a maximum output length and request responses in a fixed format such as JSON to reduce explanatory text.
    • Content generation applications: Detect and trim repeated passages during post-processing.

    Each change saves a small amount on its own, but the savings add up quickly at high call volumes. Implementing these controls centrally at the API gateway makes them easier to manage and audit.

    The following points are predictions about pricing direction. None of them has been confirmed by the platform.

    • Time-based pricing may become more granular, and the discount between peak and off-peak hours for the same model may widen further.
    • Prepaid bundles and subscription plans may become more common. Small and mid-sized companies may replace pay-as-you-go billing with monthly or annual plans.
    • Providers may bundle models with industry tools and templates, which could ease the pressure of higher unit prices.

    Technical leads can make cost reviews a fixed routine. At the end of each quarter, track four metrics: call volume for each business line, average response time, cache hit rate, and blended cost per token. Compare these figures with the previous quarter. Set thresholds based on the characteristics of each business.