Why LLM Inference Pricing Is Moving to Peak and Off-Peak Billing
This article explains why large language model inference is increasingly billed by time of day, breaks down what a typical inference bill is made of, and shows how engineering teams can cut costs through context engineering, prefix caching, model routing, off-peak scheduling, and observability. It includes practical estimation formulas, scheduling and routing code samples, and a step-by-step implementation checklist that applies to any token-based model service.
1. From Expensive Intelligence to Metered Intelligence
In early 2025, an open-weight model drew global attention. What the industry kept discussing was not its benchmark scores but its API pricing and free-tier policy, which reset expectations about the cost of intelligence. Before that, high R&D spending, scarce compute, and high unit prices formed the industry’s barriers to entry. After that, lowering the barrier to usage became the main direction of competition. An annual AI index report from a university showed that the price per million tokens for models reaching a given level of general-knowledge capability fell from about $20 to under $0.10 in two years, a drop of more than two orders of magnitude.
By 2026, the billing model itself had changed. One platform introduced peak and off-peak pricing in mid-August and launched a lightweight tier in September with a further price cut. Under its published standard, the lightweight model costs about CNY 0.04 per million input tokens on a cache hit and about CNY 2 on a miss during peak hours, with output at about CNY 8. The more capable tier is priced at about CNY 0.3, CNY 9, and CNY 27 respectively. Off-peak rates are half the peak rate across the board. Notably, peak hours are defined as two office-hour windows on weekdays; all other hours, weekends, and public holidays are billed at the off-peak rate.
This marks the point where an analogy starts to hold: intelligence is being metered like electricity. Once you pay by the “kilowatt-hour,” the goal of engineering optimization shifts from “can it run” to “where is each unit of power going.”
2. Anatomy of an Inference Bill: What You Are Actually Buying
To cut cost, break cost down first. A single call is usually determined by three parts:
- Input tokens: system prompts, conversation history, retrieved document chunks, tool return values;
- Output tokens: generated content, typically priced several times higher than input;
- Cache behavior: a repeated prefix that hits the cache can cost as little as one percent of a miss.
This yields a practical estimation formula:
cost per call ≈ input tokens × input price × (hit rate × hit price + (1 - hit rate) × miss price)+ output tokens × output price
For most teams the real problem is not unit price but “input bloat”: stuffing an entire knowledge base, full history, and verbose system prompts into the context repeatedly. Input tokens end up dominating the bill, and a prefix that keeps changing can never hit the cache.
3. The Resource Economics Behind Peak and Off-Peak Pricing
Peak and off-peak pricing is not a marketing concept but a reflection of the physical properties of compute supply. Inference cluster load is heavily concentrated during office hours while large amounts of hardware sit idle the rest of the time. Using price signals to push deferrable batch work into the trough is equivalent to raising overall utilization. For developers, this translates into three transferable practices:
- Task tiering: keep online interaction on peak, and schedule offline batch work (summarization, labeling, embedding generation, report generation) into off-peak windows and holidays;
- Queue-based peak shaving: buffer tasks with a message queue and consume them in batches during off-peak windows;
- Elastic scaling: scale containers by queue depth, with object storage holding intermediate artifacts.
Illustrative scheduling logic:
PEAK = (weekday and ((9 <= h < 12) or (14 <= h < 18)))def submit(task):if task.latency_sensitive:return call_model(task, tier="peak")queue.append(task) # consumed during the off-peak windowreturn "queued"
4. Context Engineering: The Most Direct Cost Lever
Compressing input while holding quality constant delivers the highest return. Practical techniques include:
- Prefix stabilization: place system prompts, tool definitions, and fixed instructions first, and avoid volatile concatenation such as timestamps, to improve cache hit rate;
- Retrieval trimming: cap the number of recalled chunks and their length, deduplicate before ranking, and keep only highly relevant passages;
- History compression: apply rolling summaries to earlier turns, keeping conclusions and dropping the process;
- Structured output: constrain generation length with a restricted format to avoid wasted output tokens.
A stable prefix structure looks like this:
[fixed] system role and rules[fixed] tool/function definitions[semi-fixed] domain knowledge chunks (updated by version, not per request)[volatile] current user input
5. Model Tiering and Routing
Tasks differ enormously in the capability they demand. Routing simple requests to a lightweight model and escalating complex ones to a stronger model is one of the highest-value architectural decisions available. The key is to define measurable routing criteria (task type, input length, confidence, post-validation results) and to record the routing distribution, so you do not “save small money at the cost of quality.”
def route(req):if req.type in {"classify", "extract", "rewrite"} and req.tokens < 2000:return "flash"return "pro"
6. Observability: Making Cost a First-Class Metric
No measurement, no optimization. Bring these metrics into monitoring and alerting: tokens per request (input and output tracked separately), cache hit rate, cost per task, peak versus off-peak task share, and retry rate. Retries are a hidden killer: resending after a timeout inflates both input and output cost, so pair them with idempotency keys and backoff. In logging, record requestId and cost fields so bills can be attributed by business line.
7. Implementation Checklist
- Establish a cost baseline: measure real token distribution for one week and identify the three costliest call types;
- Rework the prefix: stabilize the prefix and trim retrieval, targeting a usable hit rate;
- Schedule by peak and off-peak: move all offline tasks into off-peak windows and holidays;
- Add tiered routing: let the lightweight model handle high-frequency simple tasks;
- Constrain output: cap length and format to reduce the output price multiplier;
- Review continuously: run weekly reviews driven by monitoring and alerts.
Conclusion
When intelligence is metered like electricity, competitiveness comes down to power efficiency. Whoever compresses context tighter, uses the cache more fully, and schedules tasks more precisely pays a smaller bill for the same quality. This methodology is independent of any specific vendor and holds for any token-billed model service. It can also be combined with general-purpose capabilities such as the container platform, message queue, object storage, logging, and monitoring offered by Baidu AI Cloud.
