Peak and Off-Peak Pricing for Large Model APIs: How Time-Based Billing Changes Architecture

    This article breaks down how time-of-day pricing changes LLM API billing from a simple token count into token count multiplied by a time coefficient. It explains the root cause behind rigid compute supply meeting spiky demand, who is affected and who is not, and four engineering layers for reducing cost: task classification, asynchronous queuing, caching and semantic reuse, and observability. It also outlines the boundary conditions and risks, showing why scheduling becomes a new degree of freedom in system design.

    1. The Shift: Usage-Based Billing Is Becoming Time-Based Billing

    A model service announced that, alongside the official launch of a new version, it would introduce time-of-day pricing: during the two office-hour peak windows in local morning and afternoon time, the API unit price rises to twice the normal rate; all other hours and weekends keep the original price. Once the announcement went out, the discussion split into two camps. One saw it as a disguised price hike; the other saw it as an inevitable outcome of a maturing compute operation.

    From an engineering perspective, both readings are only half right. The price change itself is not the point. The point is that the billing dimension has expanded from a single “token count” into “token count × time-of-day coefficient.” For the first time, invocation cost has become a function of time, and a degree of freedom that did not previously exist has appeared in architecture design: scheduling.

    2. Mechanism Breakdown: What Peak and Off-Peak Pricing Actually Changes

    The traditional API billing model can be simplified as:

    1. cost = (input tokens × input unit price + output tokens × output unit price) × number of calls

    After introducing a time-of-day coefficient, the model becomes:

    1. cost = Σ (input tokens × input unit price + output tokens × output unit price) × time_coefficient(t)

    The time coefficient takes the value 2 during peak windows and 1 at all other times. Three easily overlooked details are worth emphasizing:

    • This is a structural repricing, not a across-the-board increase at all hours. Off-peak prices stay unchanged, which means workloads that already run at night see zero cost growth.
    • Peak windows usually last only about 6 hours, roughly 30 hours per week, less than 18% of the time. In other words, the theoretical upper bound on cost increase is far smaller than the intuition created by “doubling.”
    • Billing is based on the request initiation time; long-running tasks cannot be “spread across windows.” This is consistent with the logic of time-of-use electricity pricing.

    3. Root Cause: Rigid Compute Supply Meets Pulsed Demand

    The hardware scale of a large-model inference cluster is rigid in the short term, while the demand curve is pulsed. On weekday daytime, concurrency from interactive applications, code completion, and online customer service bursts out all at once, and queuing and time-to-first-token degrade simultaneously; late at night and on weekends, the same batch of accelerators sits largely idle.

    This mismatch creates three kinds of loss: during peaks, service quality requires provisioning redundancy sized to the peak, and during off-peak hours that redundancy turns into depreciation; request queuing makes tail latency uncontrollable; and overall resource utilization is dragged down by the peak. Time-of-day pricing is essentially a price lever that “pushes” deferrable workloads into off-peak hours, shaving the peak and filling the valley so the same hardware carries higher effective throughput. This belongs to the same family of governance ideas as the time-of-use electricity tariffs introduced by power systems decades ago, and the tiering of cloud object storage and compute resources by hot and cold data.

    4. Who Is Unaffected, Who Needs to Rework

    Individual developers and students are largely unaffected. Running experiments at night and building projects on weekends already fall in off-peak windows, so the low-price benefit is fully preserved.

    The real pressure falls on enterprises that embed models into daytime real-time paths: online customer service, real-time risk-control assistance, and high-frequency agent orchestration. The cost of these calls will nearly double. But the pressure is also a signal for rework—it forces teams to restructure “synchronous serial calls” into a call topology that is “asynchronous, cacheable, and batchable.”

    Looking across the board, even with the peak surcharge, the unit price of mainstream model services still sits at the low end of the global price band. The problem is not that it is unaffordable, but whether it is used crudely or not.

    5. Engineering Response: Four Layers of Cost Reduction

    The first layer is task classification. Tag every call site and distinguish real-time, near-real-time, and offline:

    1. task_class:
    2. - name: chat_reply # real-time, peak calls allowed
    3. latency_budget_ms: 800
    4. - name: doc_summary # near-real-time, can be deferred to off-peak
    5. latency_budget_ms: 300000
    6. - name: data_cleaning # offline, must run at night
    7. latency_budget_ms: 86400000

    The second layer is asynchronization and queue-based peak shaving. Put non-interactive tasks such as batch cleaning, offline summarization, and log categorization into a message queue, and let consumers decide the consumption rate based on “whether it is currently peak”: slow down or even pause during peaks, and run at full speed during off-peak to catch up on the backlog.

    The third layer is caching and semantic reuse. Exact caching covers repeated requests, and semantic caching covers approximate requests; for long documents, cache segment-level summaries to avoid being billed repeatedly for the same fragment. Every 10% increase in hit rate reduces cost roughly linearly.

    The fourth layer is observability. Bring the time coefficient, cache hit rate, and queueing duration into monitoring, alerting, and the cost dashboard, and aggregate token consumption by business line—only then can you locate the real cost hotspots.

    1. Core cost dashboard metrics:
    2. time-of-day token consumption share / peak call share
    3. cache hit rate / average queueing duration
    4. cost per business request (per 1,000 calls)

    6. Boundaries and Risks

    Time-of-day pricing is not a free lunch. Three things need attention: first, the absence of a peak degradation strategy, which leads to timeout cascades; second, the data-freshness problem introduced by asynchronous paths, where acceptable latency must be made explicit on the product side; third, over-optimizing cost by pushing tasks that should be real-time into the night, damaging the experience. The reasonable approach is to set a latency budget and a degradation path for each task class, rather than a blanket “run everything at night.”

    7. Conclusion

    Billing moving from “by usage” to “by time window” marks the point at which large-model compute begins to be operated as a utility, like water and electricity. For developers, writing code now means looking not only at logical correctness but also at execution timing; those who can do scheduling always hold the low-price benefit. If an enterprise also uses Baidu AI Cloud’s general-purpose container platform, message queue, and monitoring and alerting capabilities to build this scheduling system, the rework path will be shorter.