LLM API Price Increases: How to Calculate the Cost per Task

    This guide explains how to calculate the real cost of a single LLM API task after a price increase. It covers the three factors that determine an API bill, how to check whether a subscription plan is worth buying, and a worked example for estimating monthly costs.

    A leading Chinese model has raised its output price to five times that of its previous generation. The quoted prices are 100 yuan per million output tokens, 20 yuan per million input tokens, and 1 yuan per million cache-hit tokens. The industry has two views on this. One side argues that the price matches the model’s capability and compute costs. The other side, after running the numbers, finds that once subscription benefits and actual task consumption are included, the real spending may not be lower than that of some major international models. The two views anchor on different things. The first looks at model capability. The second looks at the cost of a single task.

    This article does not argue which view is correct. Instead, it offers a method you can use to calculate costs yourself. The method has three parts: breaking down the cost structure, checking whether a subscription plan is worth it, and estimating monthly costs with a worked example.

    1. Unit Price Is Not the Bill

    An API bill depends on three variables: unit price, consumption volume, and call frequency. The price per million tokens is only one of them.

    Output prices are high because generative inference decodes tokens autoregressively, one token at a time. Longer sequences require more computation and more memory. Cache hits reuse KV cache that has already been computed, so they require little extra computation. As a result, applications that generate long text, perform complex reasoning, or run multi-turn conversations see costs grow fastest. Applications built around short queries and fixed templates can more easily reduce spending through caching.

    2. Consumption Is Often Harder to Estimate Than Price

    The same task can consume very different numbers of tokens across models. Causes include parameter scale, training quality, and inference strategies such as the length of chain-of-thought reasoning and the number of tool calls.

    Here is a simple calculation. Suppose the unit price drops by 20% while the consumption per task rises by 50%. The change in cost per task is then 0.8 × 1.5 − 1 = +20%. This is why developers often find that a lower unit price does not reduce their bill.

    When estimating consumption, distinguish three types of data sources:

    • Theoretical values: the upper limits or ideal-condition figures stated by the vendor.
    • Third-party benchmark values: results on specific test sets, which may not match your workload.
    • Your own log values: actual consumption in your production workload. These are the most reliable.

    Use your own logs whenever possible. Without logs, you can make a rough estimate with third-party benchmark values, then calibrate with real data after launch.

    3. Evaluate Plans by Their Benefit Value, Not the Monthly Fee

    Most cloud providers use a dual-track model that combines subscription plans with pay-as-you-go billing. A subscription trades a fixed monthly fee for a set quota. Usage beyond the quota is billed at list price. Two metrics help determine whether a plan is worth it.

    • Benefit leverage ratio = value of the plan’s included benefits at list price ÷ monthly fee
    • Break-even daily call volume = monthly plan fee ÷ (cost per task × 30). This metric applies when usage stays within the plan quota. It gives the average number of daily calls at which the monthly pay-as-you-go cost equals the monthly plan fee.

    Leverage ratios should only be compared for the same model, version, and price basis. Exchange rates, whether tax is included, plan versions, and the date of conversion all affect the result. This article does not cite unverified plan benefit figures. Readers should check list prices and plan terms on the official pricing pages.

    Here is a hypothetical example. If a plan costs 199 yuan per month and its included benefits are worth 1200 yuan at list price, the leverage ratio is about 6×. These numbers only illustrate the calculation method and do not represent any actual plan.

    4. Calculating Cost per Task with an Example

    Step 1: Select the one to three most frequent call scenarios in your application. For each scenario, record the average input tokens, cache-hit tokens, and output tokens.

    Step 2: Apply the following formula to calculate the cost per task:

    Cost per task = [(Total input tokens − Cache-hit tokens) × Input price + Output tokens × Output price + Cache-hit tokens × Cache price] ÷ 1000000

    Two points need attention. First, prices are quoted per million tokens, so divide by 1000000, not 10000. Second, cache-hit tokens are part of the total input tokens. Subtract them from total input first, then charge the remainder at the standard input price. Otherwise, those tokens are billed twice.

    Use this example to verify the formula. Assume a single task has 2000 total input tokens, of which 1500 are cache hits, and 800 output tokens. Use the prices quoted above:

    • Uncached input: 500 × 20 = 10000
    • Output: 800 × 100 = 80000
    • Cache hits: 1500 × 1 = 1500
    • Total: 91500 ÷ 1000000 = 0.0915 yuan

    The cache-hit rate depends on application design and session length. In multi-turn conversations where the same history is sent with each turn, the hit rate can be high. Use your own call log statistics for actual figures rather than applying someone else’s numbers.

    5. Calculating Monthly Cost

    Step 3: Estimate monthly consumption spending and total monthly cost. The formulas are:

    • Monthly consumption spending = cost per task × average daily calls × 30
    • Total monthly cost = plan monthly fee + max(0, monthly consumption spending − value of included benefits)

    Average daily calls and the 30-day month are assumed parameters. Replace them with your own data.

    The table below applies the prices above to three hypothetical scenarios. The figures only illustrate the arithmetic and are not measured results.

    Scenario Average daily calls Total input tokens per task Cache-hit tokens per task Output tokens per task Cost per task (yuan) Monthly pay-as-you-go cost (yuan)
    Light 200 1500 1000 600 0.071 426
    Medium 1000 3000 2000 1500 0.172 5160
    Heavy 5000 8000 6000 3000 0.346 51900

    Pay-as-you-go monthly cost is proportional to call volume. If the plan quota covers your usage, the plan fee is fixed, so the higher your call volume, the more the fixed fee is worth. If usage exceeds the quota, the excess is still billed at list price.

    Using the heavy scenario, assume a plan fee of 699 yuan and included benefits worth 5000 yuan. Both figures are for illustration only. The total monthly cost is then 699 + max(0, 51900 − 5000) = 47599 yuan. When the quota is far smaller than usage, the plan fee is only a fixed cost, and most of the spending still comes from overage charges.

    6. Implications for Model Selection and Vendor Strategy

    For enterprise users, follow these steps when selecting a model:

    1. Replace the assumed values in this article with your own usage logs first.