Why LLM Inference Costs Are Dropping Sharply

    This article examines the steep decline in large language model inference pricing and the technical logic behind it. It breaks a single inference bill into input tokens, output tokens, retry overhead, and cache discounts, then walks through three cost-reduction paths—context caching, time-based scheduling, and model tiering with routing—along with common cost leak points and a practical checklist for building cost-attributable systems.

    1. The Shift: Repricing the Unit of Intelligence

    Over the past two years, the price of calling large models has dropped by orders of magnitude. An annual AI index report from a university offers a representative data point: for a system reaching the mid-tier level on a general knowledge benchmark, the price per million tokens fell from about $20 at the end of 2022 to about $0.07 in October 2024—roughly a 286x reduction.

    Pricing strategy itself is also evolving. The industry has already seen time-of-day billing: in mid-August 2026, a platform introduced differentiated pricing for peak and idle hours; in early September of the same year, a platform launched a lightweight model version and cut API prices further. In its published pricing, the lightweight model charges per million tokens during peak hours 0.04 yuan for input on a cache hit, 2 yuan for input on a cache miss, and 8 yuan for output; the more capable version charges 0.3 yuan, 9 yuan, and 27 yuan respectively. For both models, idle-hour prices are half of peak-hour prices.

    What these numbers really mean is not “it got cheaper,” but that intelligence, for the first time, has a bill that can be metered, time-shifted, and optimized—much like electricity. This article discusses the technical logic behind that bill and how developers should redesign systems accordingly.

    2. Where the Cost Comes From: Decomposing the Bill into Optimizable Parts

    To cut costs, you first need to see the cost structure. A single inference call can be abstracted as:

    1. cost per call = input tokens × input unit price
    2. + output tokens × output unit price
    3. + retry and redundant call overhead
    4. - discount from cache hits

    Four basic conclusions follow:

    1. The output unit price is usually much higher than the input unit price (about 4x in the example above), so “making the model say less” saves more than “making the model read less.”
    2. Cache-hit and cache-miss prices can differ by one to two orders of magnitude (50x in the example above), so the reusability of prompts and context directly determines the bill.
    3. Unit prices fall as hardware efficiency, quantization and distillation, and scheduling utilization improve—this is the main source of the 286x drop.
    4. Time of day and model tier are selectable variables, so architectural decisions now have an economic dimension.

    3. Three Main Cost-Reduction Paths

    3.1 Context Caching: Turn Repeated Reads into a Single Read

    The benefit of cache reuse comes from prefix consistency. Put stable system prompts, tool definitions, and domain knowledge at the very front of the request, and keep that prefix byte-for-byte identical across subsequent requests in a session, so the repeated portion is billed at the hit price.

    1. SYSTEM = "You are an order-domain assistant. Fixed specs and tool definitions follow..." # Keep stable; do not insert timestamps
    2. def build_messages(history, user_input):
    3. # Constant prefix: system + tools are not part of dynamic concatenation
    4. return [{"role": "system", "content": SYSTEM}] + history + \
    5. [{"role": "user", "content": user_input}]

    Engineering notes: avoid injecting random IDs, the current time, or request sequence numbers at the head of the prompt; for long documents, use a “write once, reference many times” approach; place volatile content at the end.

    3.2 Time-Based Scheduling: Let Batch Jobs Follow the Price Curve

    Since idle-hour prices are half of peak prices, deferrable workloads should be moved there: offline summarization, log labeling, batch translation, evaluation regression, and embedding rebuilds should be queue-driven and consumed in bulk during low-price windows.

    1. online path -> lightweight model + short prompts + strong caching
    2. offline path -> queue for peak shaving -> batch calls in idle hours -> write results back to object storage

    This requires monitoring, alerting, and logging services to observe the share of cost by time window, and an elastic container platform to scale consumption concurrency on demand.

    3.3 Model Tiering and Routing: Pay by Difficulty

    Split requests by complexity: simple intent recognition, format extraction, and classification/tagging go to the lightweight tier, while complex reasoning and long-form generation go to the high-capability tier. Routing can be implemented with rules, a small classifier, or a confidence threshold, with a fallback escalation path retained.

    1. def route(req):
    2. if req.est_tokens < 800 and req.task_type in SIMPLE_TASKS:
    3. return "flash"
    4. return "pro"

    4. Easily Overlooked Cost Leaks

    • Retry storms: no timeout cap and no backoff strategy multiply the bill during peak hours.
    • Context bloat: returning full history every turn makes tokens grow quadratically with turns; summarization and compression are needed.
    • Runaway output: without a maximum output length, explanatory text eats into the budget.
    • Ineffective calls: missing idempotency keys and deduplication cause the same task to be submitted repeatedly.
    • Missing observability: without tagging by business line, scenario, and model tier, you cannot locate where cost comes from.

    5. Practical Checklist

    1. Establish unit-economics metrics: cost per thousand requests and cost per valid result, not just unit price.
    2. Set a token budget and output cap for each task type, and include them in code review.
    3. Fix the prompt prefix, measure the cache hit rate, and set alert thresholds.
    4. Build dual offline/online channels and move deferrable tasks to idle hours.
    5. Unify the “million tokens” measurement under load-test conventions to avoid misjudgment from mixing input and output.
    6. On platforms such as Baidu AI Cloud, you can build the above pipeline using common capabilities like object storage, message queues, container platforms, logging services, and monitoring/alerting, achieving attributable and rollback-able cost.

    6. Conclusion

    When intelligence starts being billed like electricity, the objective function of architecture design shifts from “does it run” to “what is the marginal cost per valid output.” Cache reuse, time-based scheduling, and tiered routing are not new, but in an era of per-token pricing they have been upgraded from performance optimizations into direct cost controls. Whoever decomposes the bill to an optimizable granularity first gets several times the call volume on the same budget.