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

    This article breaks down what a 5x increase in LLM API list prices actually means for developers. It explains the three token types that drive real bills (input, output, and cache-hit tokens), why subscription-to-usage leverage ratios often matter more than per-unit pricing, and how task-based model routing, context engineering, and cost observability can reduce spending by several times. Readers will find practical estimation logic, routing examples, and a minimal metrics set for tracking daily cost, cache hit ratio, and retry rate.

    1. The Signal: A 5x Price Hike, but the Debate Is About Plan Leverage

    A new round of price adjustments has appeared in the market: a next-generation general-purpose LLM service now charges on the order of 100 (currency units) per million output tokens, around 20 per million input tokens, and around 1 per million cache-hit tokens — roughly a 5x increase over the previous generation. The discussion split quickly into two camps. One camp relies on horizontal benchmark rankings and argues that a strong capability position justifies the price. The other shifts attention from unit price to the multiplier between subscription plans and the redeemable usage they include, arguing that what developers actually feel is not the sticker price but “how much real call volume one payment buys back.”

    The technical essence of this disagreement is that pay-as-you-go billing and prepaid plans are two different cost models. The former is linearly sensitive to individual calls; the latter introduces prepaid discounts and usage caps. The two cannot be compared directly. To judge whether something is expensive, you first have to break the bill apart.

    2. Cost Structure: Three Token Types Determine the Real Bill

    Billing for mainstream inference services usually falls along three dimensions, and understanding their differences is the prerequisite for cost control.

    • Input tokens: system prompts, conversation history, retrieved document fragments, and tool return values. In long-context scenarios, input often accounts for the bulk of total tokens.
    • Output tokens: model-generated content, typically priced at several times the input rate, because the generation phase requires token-by-token forward computation and cannot be parallelized as heavily as prefill.
    • Cache-hit tokens: when a request prefix exactly matches a recent request, the server can reuse the already-computed intermediate state, and these tokens are billed at a significantly lower price.

    The illustrative cost estimation logic is as follows (this only expresses the calculation method and does not represent any specific vendor’s rules):

    1. def estimate_cost(in_tok, out_tok, cached_tok, price_in, price_out, price_cache):
    2. # Cached tokens are no longer billed at the input rate
    3. billable_in = max(0, in_tok - cached_tok)
    4. return billable_in * price_in + out_tok * price_out + cached_tok * price_cache

    The most easily overlooked point here is that cache hits only apply to requests whose prefix is exactly identical. Once you insert a timestamp or a random request ID at the start of the system prompt or conversation, the entire prefix is invalidated and the hit rate drops straight to zero.

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

    The core observation in the original discussion is that the redeemable usage bundled with different plan tiers is often not proportional to the plan price; there is an amplification factor. Plans with a high factor may have a significantly lower effective unit cost than pay-as-you-go; plans with a low factor may end up “paid for but not fully used” or with an actual unit price higher than the sticker price.

    An abstract model can express this:

    1. effective unit price = plan price / actual usable usage
    2. leverage factor = actual usable usage / plan price

    To judge whether a plan is worthwhile, you cannot look only at the advertised leverage factor; you also need to check three constraints:

    1. Whether usage can be carried over across models and versions, or is bound to a single version;
    2. Whether there is an expiration date or concurrency limit that prevents the quota from being exhausted within the period;
    3. Average consumption per task. If per-task consumption is close to some baseline level, the number of tasks a plan’s quota can support is estimable, and from there you can back out team size and business capacity.

    A practical approach is to run a small-scale canary first, measure P50 and P95 per-task token consumption, and then choose a tier based on that, rather than buying based on peak estimates.

    4. Task-Based Routing: Use Expensive Models Where They Count

    After a price increase, the most effective architectural lever is tiered routing: distributing requests to models of different capability tiers and price points based on task difficulty. A common layering looks like this:

    • Simple tier: format conversion, field extraction, keyword classification, templated rewriting — handled by small-parameter models or a rules engine;
    • Middle tier: summarization, multi-turn Q&A, routine code completion — handled by a mainstream general-purpose model;
    • Complex tier: long-chain reasoning, cross-file refactoring, complex defect localization — only then call a high-capability, high-unit-price model.
    1. def route(task):
    2. if task.kind in {"format", "extract", "classify"}:
    3. return "small_model"
    4. if task.estimated_tokens > 60000 or task.requires_multi_step:
    5. return "flagship_model"
    6. return "standard_model"

    In engineering practice, it is recommended to implement routing and fallback policies uniformly at the gateway layer, avoiding scattered decision logic across business code, while keeping a manual override switch to make production issue diagnosis easier.

    5. Context Engineering: Input Tokens Are the Largest Controllable Item

    In long-context applications, input cost often exceeds output cost, so context governance directly determines bill size.

    • Prefix stabilization: put the system prompt, tool definitions, and fixed examples at the very front and keep them byte-for-byte unchanged, creating the conditions for cache hits;
    • Retrieval fragment trimming: control the number of recalled items and the length of each, rerank before concatenation, and avoid stuffing entire documents into the context;
    • History compression: apply rolling summarization to earlier conversation turns, keeping only conclusions and key constraints;
    • Structured output constraints: use explicit schemas to constrain output format, reducing invalid generation and retry counts.

    It is worth emphasizing that the specific conditions under which caching takes effect are defined by the service provider; in engineering, you should rely on measured hit rates and separately monitor changes in the hit ratio.

    6. Cost Observability: No Measurement, No Optimization

    The prerequisite for cost control is visibility. It is recommended to integrate general observability capabilities at the design stage, using a logging service to collect the model tier, input/output tokens, cache-hit volume, and latency for each call, and to set thresholds on daily cost and per-task cost via monitoring alerts.

    A minimal viable metric set:

    1. daily_cost # total daily cost
    2. cost_per_task_p50/p95 # per-task cost percentiles
    3. cache_hit_ratio # cache hit ratio
    4. retry_rate # retry rate, reflecting output stability
    5. tokens_per_request # average tokens per request

    Among these, retry rate is the most hidden cost amplifier: one failed retry means input tokens are billed again, and this overhead is hard to spot in reports that only look at totals.

    7. Selection Advice: Replace Impression-Based Judgment With Verifiable Measures

    In the face of a new round of price increases, a rational evaluation process should be: first build an evaluation set from real business samples while recording both quality metrics and token consumption; then calculate the effective unit price and supportable task volume under different plan tiers; finally validate with a small-traffic canary whether hit rate and retry rate meet expectations. Benchmark rankings can serve as a capability reference but cannot replace cost estimation.

    For development teams, the controllable items at the architecture level far outnumber the sticker price itself: routing tiers, context governance, cache-friendly design, and an observability system — stacking these four typically yields a cost difference on the order of several times. If domestic services want to compete head-on with overseas options on cost-effectiveness, the key is not the level of the single unit price but whether they can offer plan designs with reasonable usage redemption ratios, quotas that carry over across versions, and stable cache hits under high concurrency — that is where the product strength that determines long-term total cost of ownership lies.