LLM Inference Costs Are Starting to Be Metered Like Electricity
As LLM inference prices fall by orders of magnitude, billing models are shifting toward utility-style metering: time-of-day pricing, cache hit versus miss rates, and separate output pricing. This article breaks down the four variables that actually control token costs—input length, cache hit rate, output length, and time of day—and covers the engineering practices that make cost observable and controllable, including a unified call gateway, semantic caching, prefix reuse, model tier routing, output constraints, and off-peak batching. It also outlines capacity and budget planning based on cost per unit of business rather than monthly totals.
1. The Trend: Inference Prices Are Falling Fast
An annual AI index report from a university highlighted a striking set of numbers: for models that reach the level of early conversational models on general knowledge benchmarks, the price per million tokens dropped from roughly $20 to under $0.1 in less than two years—a decline of more than two orders of magnitude.
No single factor explains this. Three curves are moving down at the same time:
- Model architectures and training methods are maturing, improving output per unit of compute.
- Inference-side engineering optimizations (quantization, operator fusion, continuous batching, prefix reuse) have significantly reduced the compute cost per token.
- Larger service scale is amortizing fixed costs.
For developers, the conclusion is straightforward: tokens are shifting from a “scarce resource” to a “measurable, schedulable general-purpose resource.” That is also why billing is starting to resemble that of a utility.
2. Why Billing Is Becoming “Electrified”
Traditional cloud billing centers on “duration of occupancy”—for example, charging by the hour an instance runs. The cost structure of LLM inference, however, closely resembles electricity:
- Cost grows linearly with usage and cannot be saved by “not occupying anything while idle.”
- Supply varies between peak and trough: compute is tight during peak hours and redundant during idle periods.
- The unit price is low enough that fine-grained metering, like an electricity meter, is the only way to make it meaningful.
Hence time-of-day pricing. One platform divides weekday daytime into peak hours and applies off-peak prices at night, on weekends, and on public holidays, with off-peak prices roughly half of peak. This is essentially the grid’s peak/trough electricity pricing mechanism transplanted onto inference services.
More notable is the introduction of a cache billing dimension. In one platform’s published pricing structure, the input side distinguishes between cache hits and misses, with the hit price one to two orders of magnitude lower than the miss price; the output side is priced separately and is typically significantly higher than input. This structure sends a clear technical signal: computation over repeated prefixes can be reused, while generation is an incompressible incremental cost.
(Illustration: relative relationships across billing dimensions, for demonstrating order-of-magnitude differences only; not representative of any specific product’s pricing.)
Input - cache hit : ▏ very lowInput - cache miss : ▍▍▍▍ lowOutput : ▍▍▍▍▍▍▍▍ medium-highOff-peak discount : above prices × 0.5
3. Four Variables That Control Token Cost
Break the bill apart and cost is determined by only four variables. Understanding them matters more than memorizing any price sheet.
Input length. System prompts, tool definitions, retrieved context, and conversation history all count as input. When teams see abnormal bills, the root cause is often stuffing entire documents into the context repeatedly.
Cache hit rate. A stable, unchanging prefix (system instructions, tool schemas, few-shot examples, long documents) can lower input cost by one to two orders of magnitude when it hits the cache. The key to a higher hit rate is keeping the prefix byte-for-byte identical.
Output length. Output usually carries the highest unit price, and generation cannot be compressed through parallelism. Controlling output length is often more effective than compressing input.
Time of day. If a service is not latency-sensitive, moving batch jobs to off-peak hours yields roughly a 50% cost advantage directly.
4. Engineering Practice: Make Cost an Observable Metric
Cost governance starts with observability. Build a unified call gateway on the application side and record the following fields for every request:
record = {"request_id": rid,"model_class": "flash" | "pro", # tiered by capability, do not hardcode specific models"input_tokens": u_in,"cached_tokens": u_cache,"output_tokens": u_out,"peak": is_peak(ts), # whether it is peak hours"cost": estimate_cost(record), # unit price comes from config center, not hardcoded"biz_line": biz, # business ownership, for cost allocation}
Three key points: unit prices must be externalized as configuration and hot-updated when official pricing changes; cost must be aggregatable by business line, scenario, and user; and budget thresholds with alerts must be in place so you intervene before overspending via monitoring and alerting, rather than reviewing the bill at month end.
5. Architecture-Level Cost Reduction
Semantic caching. Build a vector retrieval layer for high-frequency repeated questions; on a hit, return the answer directly and skip inference entirely. This is the only approach that can bring cost to zero.
Prefix固化 and reuse. Organize system prompts, tool descriptions, and domain knowledge into an immutable prefix placed at the very front of the request, with variable content placed after it. Never insert a timestamp or random ID at the beginning of the prompt—that invalidates the entire cache.
[ Stable prefix: system instructions + tool definitions + long-term knowledge ] ← high hit rate[ Semi-stable zone: conversation summary ][ Volatile zone: current question + timestamp ] ← a miss here does not affect the prefix
Model tier routing. Use lightweight models for classification, extraction, and rewriting, and escalate to a higher-capability tier only for complex reasoning. Routing policy should be based on confidence rather than hand-written rules.
Output constraints. Replace one-shot long-form generation with structured output, maximum length limits, and step-by-step generation—controlling cost while improving reliability.
Batching and off-peak scheduling. Route offline tasks (data cleaning, summary archiving, evaluation runs) into an off-peak queue, using a message queue to level the load.
6. Capacity and Budget Planning
Falling prices do not mean falling bills. Usage growth often outpaces price declines, so planning should center on “inference cost per unit of business”—for example, cost per thousand requests or average daily cost per user—rather than the monthly total.
A three-layer mechanism is recommended: a budget layer that sets monthly caps per business line; a policy layer that defines degradation paths after a cap is exceeded (switch to a lighter model, disable non-cache external calls, apply rate limiting); and a review layer that compares unit cost trends weekly to identify sources of abnormal growth.
7. Conclusion
When inference is available on demand like electricity and metered accordingly, the competitive focus shifts from “can we afford it” to “how precisely are we using it.” Time-of-day pricing, cache pricing, and output pricing together form a set of scheduling signals. Whoever can make workloads follow the price curve and make repeated computation reusable gains several times the cost headroom at the same business scale. Cost engineering is becoming a foundational capability on par with model selection.
