LLM API Pricing Increased 5x: How to Calculate the Real Cost

    This article breaks down a fivefold LLM API price increase and shows engineering teams how to calculate the actual cost per task. It explains the three-tier token pricing model, why output tokens cost more than input, how prepaid plan leverage lowers the effective unit price, and four practical ways to cut usage through prefix caching, context trimming, output constraints, and model routing. A vendor evaluation framework and usage forecasting method are included to help teams keep product quality within budget.

    1. The Immediate Impact of a Higher Unit Price

    A recent version of a general-purpose LLM service changed its billing to 20 RMB per million input tokens, 100 RMB per million output tokens, and 1 RMB per million cache-hit tokens, roughly a fivefold increase over the previous generation. For teams built around API calls, this is not an abstract number. It rewrites the monthly bill, the gross margin model, and the boundaries of what features are viable.

    The asymmetric pricing between input and output is standard across the industry. Generation requires significantly more compute and GPU memory than prefill, so output tokens typically cost several times more than input tokens. Cache hits are priced very low because the system can reuse an already computed intermediate state and skip the repeated forward pass. Understanding why these three tiers exist is the prerequisite for every cost optimization that follows.

    2. Breaking Down the Billing Structure

    Any cost discussion becomes clearer once the bill is reduced to four variables:

    1. Monthly cost ≈ input tokens × input price
    2. + output tokens × output price
    3. + cache-hit tokens × cache price
    4. + prepaid plan credit applied
    • Input tokens: prompts, system instructions, retrieved context, and conversation history. These usually make up the vast majority of total tokens.
    • Output tokens: generated content. A small share of the volume but the highest unit price, and the main cost driver for long-form generation.
    • Cache-hit tokens: the portion that exactly matches a stable prefix, priced at roughly one twentieth of the input tier.
    • Plan credit: a usage allowance obtained through prepayment, which determines the real effective unit price.

    One frequently overlooked conclusion: when the output price is five times the input price, the output side becomes the dominant cost as soon as output tokens exceed roughly one sixth of the total. The optimization focus should therefore be on compressing output and raising the cache hit rate, not on blindly shortening prompts.

    3. Plan Leverage: Why the Multiplier Matters More Than the Unit Price

    The key insight is the comparison baseline. A common industry practice is to prepay a fixed fee and receive a usage allowance many times the face value, which sharply dilutes the effective unit price the user actually pays. If one platform’s plan leverage is only about ten times while comparable services generally offer more than twenty times, actual spending will be noticeably higher at a similar level of task consumption.

    A neutral estimation function can express this:

    1. def effective_cost(plan_fee, quota, usage):
    2. """usage: internal billing units actually consumed"""
    3. if usage <= quota:
    4. return plan_fee
    5. over = usage - quota
    6. return plan_fee + over * overage_rate

    Whether a plan is worthwhile comes down to three quantities: the allowance coverage multiplier, how overage is priced, and the allowance validity period and rollover rules. Comparing list prices without comparing leverage easily leads to the wrong conclusion.

    4. Usage Forecasting: Turning Task Consumption into Predictable Numbers

    Teams should build their own benchmark set, sample a fixed set of tasks repeatedly, measure the average consumption per task, and multiply by daily active usage and call frequency to get a monthly baseline. Illustrative logic:

    1. bench = run(benchmark_set) # fixed task set
    2. avg_per_task = bench.total_tokens / bench.task_count
    3. monthly = avg_per_task * tasks_per_day * 30
    4. headroom = 1.3 # buffer for variance and retries

    If per-task consumption is close to the leading international level while plan leverage is low, the cost-effectiveness gap widens. Conversely, if engineering work cuts per-task consumption in half, total cost can stay flat or even drop despite the higher unit price.

    5. Engineering Cost Reduction: Four Measures You Can Apply Now

    1. Prefix stability and cache reuse. Put system instructions, tool descriptions, and few-shot examples at the very front of the prompt and keep them byte-for-byte unchanged, with dynamic content placed after them. This significantly raises the cache hit ratio.
    2. Context trimming. In retrieval-augmented scenarios, rerank and remove redundancy first, and cap the number of injected passages. For long conversations, use rolling summaries instead of the full history.
    3. Output constraints. Specify length and structure requirements explicitly, use structured output to cut redundant explanation, and avoid output bloat from unconstrained generation.
    4. Tiered routing. Send simple tasks to smaller models or a rules engine and escalate to the large model only for complex reasoning, forming a cost gradient.

    6. A Framework for Evaluating Model Services

    When assessing a model service, score it across these dimensions: the three-tier unit price structure, plan leverage and overage rules, transparency of the caching mechanism, context window and rate limits, stability and observability, and data compliance and log auditability. Engineering support matters just as much. A combination of logging, monitoring and alerting, message queues, and container platforms lets you attribute cost to specific business lines instead of discovering an abnormal total at the end of the month.

    7. Conclusion

    A price increase is not inherently unacceptable. What really determines cost-effectiveness is the effective unit price, equal to the list price divided by plan leverage, along with how low a team can push per-task consumption. Get cache hit rate, output length, and task tiering right, then add clear usage monitoring and budget alerts, and you can preserve product quality within a fixed budget. A platform that offers a higher allowance multiplier for a lower prepayment is the kind of product that can genuinely compete head-on with mainstream overseas services.