The Compute Scheduling Logic Behind Time-of-Day Pricing for LLM APIs

    This article explains why LLM API providers use time-of-day pricing and what it reveals about compute scheduling. It argues that peak-hour pricing manages user request patterns rather than electricity costs, outlines why adding GPU capacity alone does not solve peak-hour strain, and identifies which batch workloads suit off-peak hours. It closes with practical cost-optimization advice for developers.

    Recently, an LLM inference service introduced a time-of-day pricing policy. During certain peak periods, call fees rise on Beijing time (UTC+8), and prices drop again at night. This has sparked an interesting discussion. Because of the time difference between China and North America, daytime hours for North American users fall in the low-price window. Income differences add to this effect, so overseas users have become the biggest beneficiaries of the off-peak discount. Was this a pricing mistake, or a deliberately designed scheduling decision? This article analyzes the question from both engineering and economic perspectives.

    1. Time-of-Day Pricing Manages Compute Congestion, Not Electricity Prices

    Many discussions tie time-of-day pricing directly to electricity costs. Industrial electricity is more expensive during the day, so inference fees are higher then. Electricity is cheaper late at night, so prices are lower. This view captures part of the picture, but it conflates two different things.

    Data centers depend heavily on energy, and the development of computing hubs in western China is closely tied to local power resources. However, electricity accounts for a much smaller share of total inference service costs than GPU depreciation, data center construction, network bandwidth, and operations and maintenance. More importantly, the high-price periods set by this service almost exactly match business hours, and prices fall again during the lunch break. This shows that the pricing model tracks the user request curve, not the power grid load curve.

    Demand for LLM APIs is naturally uneven. During the day, online business workloads such as customer service bots, office assistants, code completion, and data queries surge. GPU clusters may face queuing, rising latency, or even rate limiting. At night, online requests drop sharply, but the hardware is already purchased, the racks are already powered on, and depreciation continues every second. For providers, the worst operating state is not full load. It is insufficient capacity during the day and large-scale idle capacity at night. Time-of-day pricing is a demand-response tool designed to address this structural mismatch.

    2. Why Not Simply Add More GPU Capacity

    A natural objection is this: if peak hours are under-provisioned, why not add more cards? The answer is that compute is a capital-intensive infrastructure. Capacity cannot be switched on and off like a water tap.

    • Long supply cycles: Chip procurement, rack deployment, and expansion of power and cooling typically take months. These timelines cannot keep pace with load fluctuations measured in hours.
    • Irreversible investment: If a provider builds for peak demand and is short 10,000 cards during peak hours, it cannot buy them in the morning and return them in the evening.
    • Utilization conflict: Building for peak demand leaves large amounts of capacity idle at night. Building for average demand degrades the experience during peak hours.

    This is the same problem faced by a hotel that cannot permanently expand to ten times its rooms to handle Chinese New Year crowds, or a power grid that cannot expand indefinitely for a few dozen hours of peak demand each year. In capital-intensive industries, the common solution is to use price levers to shave peaks and fill valleys, in addition to expanding capacity. The only difference here is that the resource being scheduled is not kilowatt-hours but GPU seconds behind each token.

    3. The Time-Zone Windfall Is a Side Effect of the Strategy

    Back to the original question: why not raise prices separately for overseas users during their daytime? The answer lies in the scheduling objective. Time-of-day pricing focuses on the overall load shape of the cluster, not on how much each individual user pays. As long as global requests are spread across different times, overall utilization improves. Overseas users who work during their daytime happen to fall into the low-price window. This effectively helps the provider fill the nighttime demand trough, which is exactly the behavior that price incentives are designed to produce, rather than a loophole. From the perspective of global compute utilization, this is a natural complementarity across time zones.

    4. Which Tasks Suit Off-Peak Shifting

    Time-of-day pricing only works if there are many latency-tolerant workloads. In engineering practice, the following types of tasks can usually be safely moved to low-demand periods:

    1. Offline batch inference: data cleaning, corpus annotation, and batch content generation;
    2. Model evaluation and regression testing: running benchmark suites on a schedule, with results reviewed the next day;
    3. Knowledge base maintenance: document chunking, vector index rebuilding, and index updates;
    4. Static code analysis and scanning: triggering CI jobs overnight.

    A typical off-peak calling framework can be very simple:

    1. import schedule
    2. import time
    3. def batch_job():
    4. # Batch job: call the inference API to process the pending queue
    5. process_pending_queue()
    6. # Trigger the batch job during the off-peak window (e.g., 1:00 AM)
    7. schedule.every().day.at("01:00").do(batch_job)
    8. while True:
    9. schedule.run_pending()
    10. time.sleep(60)

    In production environments, it is better to implement this logic with general-purpose task orchestration and scheduling services. Use a message queue to hold tasks generated during the day, use a timed trigger to wake batch workloads during the off-peak window, and combine this with monitoring and alerts to track success rates and latency. Using Baidu AI Cloud as an example, its general-purpose product categories, such as function computing, message queues, and cloud monitoring, can be combined to build this architecture. Teams do not need to operate a self-built scheduling cluster, and the services support elastic scaling on a pay-as-you-go basis, which can further reduce overall costs. For current availability and details, refer to the official documentation.

    5. Cost Optimization Recommendations for Developers

    Once you understand the logic behind time-of-day pricing, you can actively optimize your inference cost structure:

    • Separate online and offline traffic: Real-time user interactions must go through the immediate channel. All background tasks should go into a queue and run during off-peak hours.
    • Design retries and degradation paths: When rate limits hit during peak hours, move deferrable requests to an overnight queue instead of retrying repeatedly.
    • Cache frequent results: For highly repetitive queries, add semantic caching to directly reduce the number of peak-hour calls.
    • Build cost observability: Track token consumption and time-of-day distribution by business line, and use the data to verify the savings from shifting workloads off-peak.

    Conclusion

    Time-of-day pricing for LLM inference services is, in essence, a textbook example of compute demand response. The price signal moves deferrable workloads from peak hours to off-peak hours, which maximizes GPU utilization under the constraint that capacity cannot be expanded without limit. Electricity prices are only a background variable. The user request curve is the real scheduling target. For developers, understanding this logic makes it possible to turn the platform’s peak-to-valley price difference into a cost advantage, through task classification, queuing, and scheduled execution.