Large Model API Off-Peak Pricing Explained: Time Windows, Caching, and Cost Optimization
This article breaks down how time-based tiered (off-peak) pricing works for large model APIs and what it changes for engineering teams. It explains the shift from a single flat rate to a three-dimensional cost model built on time windows, cache hit versus miss, and input versus output, then shows how to model daily cost, classify workloads by latency tolerance, design prompt prefixes for cache friendliness, cap output length, and add cost attribution and reliability safeguards. Readers will find scheduling policies, code and YAML examples, common pitfalls, and a practical adoption checklist.
1. From Flat Rates to Off-Peak Tiers: What Actually Changed
Large model API pricing has long relied on a single price list: the unit price stays constant regardless of when a request arrives, whether it hits the cache, or how input and output tokens are split. The model is simple and makes cost estimation easy, but it hides supply-side load fluctuations from the price signal entirely.
One platform changed how it bills its model services on August 17, 2026. It retired the flat price list in favor of time-window tiered pricing, and at the same time moved its flagship model out of testing into general commercial availability. The rules can be abstracted into three dimensions:
- Time window: two peak windows are defined each day, one in the morning and one in the afternoon (9:00–12:00 and 14:00–18:00 in the example). Everything else is off-peak, priced at half the peak rate.
- Cache: the input side distinguishes cache hits from cache misses, with the hit portion priced well below the miss portion.
- Output: output is priced higher than input, and it doubles during peak windows too.
Using this platform’s numbers as an example (in CNY per million tokens), the lightweight tier is priced off-peak at 0.05 for cache hits, 1.5 for misses, and 4.5 for output; the peak rates double to 0.10, 3.0, and 9.0. The high-performance tier is 0.15, 4.5, and 13.5 off-peak and 0.30, 9.0, and 27.0 at peak. Both models support tool calling, are compatible with several mainstream API protocols, and offer conversation continuation and code middle-fill completion, with maximum context and output length reaching the 384K class.
The important point is not the specific numbers but that price has turned from a scalar into a vector. Once the unit price is no longer a single value, cost estimation has to evolve from “call count × unit price” into a three-variable function of “call distribution × time-window price list × cache hit rate.”
2. Why Platforms Push Peak-Valley Pricing
On the supply side, compute in an inference cluster is not consumed evenly. Late mornings and afternoons on weekdays are concentrated development hours with dense requests, while nights and early mornings leave large amounts of capacity idle. Under a flat price, peak periods bring resource contention, queuing, and timeouts, while idle periods waste capacity, structurally dragging down overall utilization.
Off-peak pricing is essentially using price signals for load balancing: doubling at peak suppresses demand, halving off-peak creates an incentive, and deferrable workloads migrate into the valley windows. This evens out peaks and improves overall service stability. The idea is the same one behind electricity tariffs, cloud spot pricing, and tiered storage: make scarcity explicit in the cost, and hand scheduling decisions back to the developers who best understand their own latency tolerance.
For developers, this is a chance to re-evaluate cost structure: bills that could not be optimized through technical means before can now be compressed directly through scheduling.
3. The Cost Model: Doing the Math on Your Bill
Let a workload’s daily input tokens be $I$, output tokens be $O$, cache hit rate be $h$, and share of requests in peak windows be $p$, with off-peak unit prices at half of peak. Daily cost can be written as:
cost = (1-p) * I * (h*Cp_idle + (1-h)*Cu_idle) / 1e6+ p * I * (h*Cp_peak + (1-h)*Cu_peak) / 1e6+ ((1-p)*O*Co_idle + p*O*Co_peak) / 1e6
This yields three conclusions that translate directly into engineering work:
- The ceiling on time-shifting gains is 50%. Moving all load from peak to off-peak halves input and output cost outright; shifting half the load saves roughly 25%.
- The marginal value of cache hit rate is amplified. The gap between hit and miss prices is several-fold, so raising the hit rate from 50% to 80% can cut input-side cost by more than half.
- Output length is a cost amplifier. Output unit price is typically several times the input miss price and doubles with the time window, so controlling generation length is often more effective than compressing prompts.
An illustrative comparison (assuming peak share drops from 0.7 to 0.2, everything else unchanged):
def daily_cost(I, O, h, p, price):# price: dict with idle/peak for cache_hit, cache_miss, outputin_idle = I * (h * price['hit_idle'] + (1 - h) * price['miss_idle'])in_peak = I * (h * price['hit_peak'] + (1 - h) * price['miss_peak'])out = O * ((1 - p) * price['out_idle'] + p * price['out_peak'])return (in_idle * (1 - p) + in_peak * p + out) / 1e6
4. Architecting for Off-Peak Pricing
4.1 Workload Classification and Queue Isolation
The first step is not changing code but tagging your load. Classify by latency tolerance into three tiers:
- Online interactive: users wait in real time, so requests must stay in peak windows; focus on output length and cache hits.
- Near-real-time: tolerant to minutes, using a combined strategy of downgrading the model at peak and upgrading off-peak.
- Offline batch: tolerant to hours, scheduled entirely into off-peak windows, preferring the high-performance model for quality.
In practice, use a message queue to absorb offline tasks, and pair it with container platform autoscaling so consumers scale out automatically during off-peak windows and scale back in at peak, leaving quota for online traffic.
# Scheduling policy exampleschedule:peak_windows: ["09:00-12:00", "14:00-18:00"]policies:online: { model: light, max_output: 1024, queue: none }nearline:{ model: light, max_output: 2048, queue: batch, defer_to_idle: true }offline: { model: pro, max_output: 8192, queue: batch, defer_to_idle: true }
4.2 Prompt and Cache-Friendly Design
Cache hits do not happen automatically; they depend on the stability of the request prefix. Key practices:
- Put invariant content first—system prompts, tool definitions, few-shot examples—and variable content such as timestamps, user input, and random IDs last;
- Avoid concatenating the current time or randomly ordered retrieval snippets into the prompt, since such changes invalidate the entire prefix;
- In conversation continuation, append history messages as-is; do not rewrite or trim existing turns;
- For long-document analysis, establish a stable document prefix first, then append multiple rounds of questions after it.
[Stable prefix] system instructions + tool schema + domain examples + long document body[Variable suffix] current user question + newly added conversation turns
4.3 Output Length Governance
Because output carries the highest unit price and doubles by time window, generation budgets should be constrained explicitly: set a max_tokens cap, use structured output for summarization tasks (fixed fields instead of free-form long text), and split long “reason first, then summarize” chains into smaller tasks to avoid lengthy generation during peak windows.
4.4 Observability and Cost Attribution
Cost optimization has to be measurable. Recommended instrumentation dimensions include request time window, model tier, input and output tokens, cached tokens, task label, and tenant or business line. Collect through a logging service, configure thresholds with monitoring and alerting, build a cost dashboard broken down by business line, and set optimization targets for the two core metrics: peak share and cache hit rate.
5. Reliability and Risk Control
Off-peak scheduling introduces new failure modes that need matching designs:
- Unfinished tasks at the end of an off-peak window: set deadlines and a fallback path so that on timeout the task may run at peak on a lower-tier model, keeping the business loop closed;
- Traffic spikes: reserve dedicated quota plus circuit breaking and rate limiting for the online tier so batch jobs cannot crowd it out;
- Idempotency and retries: batch tasks must be idempotent, and retries should use exponential backoff and count against the cost budget;
- Redundancy across options: critical paths can prepare backup models or backup API protocols, abstracted behind a unified gateway layer to avoid tight coupling between business code and a specific interface shape;
- Data classification: offline tasks involving sensitive data should be desensitized before entering the batch queue.
6. Common Pitfalls
- Watching unit price but not structure: the off-peak price of a high-performance model may be lower than the peak price of a lightweight one, so “downgrading” does not necessarily save money—run the numbers against the three-variable model.
- Ignoring cache invalidation: frequently changing the prompt prefix defeats any high-hit-rate design entirely.
- One-size-fits-all migration: forcing online interactive tasks to be deferred costs far more in experience than it saves.
- No attribution: a bill with only a total and no dimensions cannot locate optimization points, making off-peak gains unsustainable.
7. Adoption Checklist
- Map the latency tolerance of your workloads and complete the three-tier classification;
- Build the three-variable cost model and measure the bill difference before and after migration;
- Restructure prompts to keep a stable prefix and place variable content at the end;
- Introduce queues and autoscaling to scale out automatically in off-peak windows;
- Set output budgets and structured output constraints;
- Complete the cost dashboard and alerts, and make peak share and cache hit rate part of iteration metrics.
The deeper significance of tiered off-peak pricing is handing scheduling authority over compute—a scarce resource—from the platform alone to developers. Only by understanding the coupling among the three dimensions of time window, cache, and output, and mapping it into queue policies, prompt conventions, and observable metrics, can a pricing mechanism become a sustainable cost advantage.
