Large Model API Peak-Off-Peak Pricing and Open-Source Strategy Explained

    This article breaks down why open-sourcing a model framework and raising API prices are not contradictory moves. It shows how a headline "11x increase" usually applies only to cached input tokens during peak hours, explains the logic behind peak-off-peak pricing, and outlines a cost-modeling approach based on token structure, time distribution, and cache hit rate. It also covers engineering practices for prefix caching and off-peak scheduling, architecture choices enabled by open-source frameworks, and a migration risk checklist.

    1. Breaking Down the Phenomenon: Open Source and Price Hikes Are Not Contradictory

    A similar pattern has recently appeared across the industry: a platform releases a new model framework as free, open-source software while raising the price of its external API, summarized as “an increase of up to roughly eleven times.” When this kind of news spreads, it is easily compressed into a single conclusion — “the price butcher has started harvesting.” But if you reconstruct the change item by item across the billing components, the conclusion is completely different.

    The amplified number usually corresponds only to the peak-hour price of cached input tokens: the original price was CNY 0.025 per million tokens, adjusted to CNY 0.30 per million tokens during peak hours — a ratio of 12, or a 1100% increase. Meanwhile, uncached input rose from CNY 3 to CNY 9 (3x), and output rose from CNY 6 to CNY 27 (4.5x). If a workload can be scheduled to off-peak hours, all three prices are halved again.

    This leads to the first judgment: the increase is structural, not across-the-board. The reason is that the cached-input unit price was originally extremely low, and a small base naturally produces an exaggerated ratio. It is also a price tied to internal cache-hit optimization, so its contribution to the overall bill depends on the hit rate.

    The second judgment is that open source and price increases belong to two different layers. Open source lowers the barrier to adoption and migration concerns, making the framework auditable and suitable for private deployment. The price adjustment changes how the marginal cost of the hosted service is recovered. Both can hold at the same time: the former is a customer-acquisition and ecosystem play, the latter fills in the business model.

    2. The Pricing Logic Behind Peak-Off-Peak Rates

    The essence of peak-off-peak pricing is turning “time” into a priceable resource. Inference cluster load is highly uneven over a day: peak hours require reserved redundant compute, while off-peak hours leave resources idle. Charging a uniform price effectively makes off-peak users subsidize peak users; peak-off-peak pricing hands the scheduling decision back to the demand side.

    It has three direct effects: first, peak shaving, pushing deferrable batch jobs into off-peak windows; second, higher resource utilization, which spreads and lowers the per-unit compute cost; third, more predictable costs, so teams can plan budgets around business hours.

    One caveat: the peak-to-off-peak multiple is usually smaller than the multiple of the peak price relative to the original price. So “moving the workload off-peak” typically offsets most of the increase, but does not return to the original cost level.

    3. Cost Estimation: Three Things to Calculate Beyond Unit Prices

    Looking only at unit prices leads to the wrong conclusion when assessing the impact of a price increase. Model it in this order:

    1. Structural share: measure the proportion of cached input, uncached input, and output tokens in the total bill.
    2. Time distribution: measure how requests are distributed along the timeline and identify the share of batch work that can be shifted.
    3. Cache hit rate: the higher the hit rate, the more the “cached unit price increase” applies — though the absolute amount may still be small.

    Illustrative estimation code (demonstrating the calculation method only, not any platform’s API):

    1. def estimate_cost(hit, miss, out, peak_ratio, hit_rate, prices):
    2. # prices: (hit, miss, out) unit prices in CNY per million tokens
    3. hit_tokens = hit * hit_rate
    4. miss_tokens = miss + hit * (1 - hit_rate)
    5. peak = prices[0]*hit_tokens + prices[1]*miss_tokens + prices[2]*out
    6. off = peak * 0.5 # off-peak hours at half price
    7. return peak * peak_ratio + off * (1 - peak_ratio)

    Plug in real business ratios and the conclusion in most scenarios is the same: output tokens and uncached input make up the bulk of the bill, and changes to the cached unit price are “scary-looking but limited in practice.”

    4. Engineering Caching and Off-Peak Scheduling

    On the caching side, the point is not “cache more” but raising the reuse rate of stable prefixes: put invariant content such as system prompts, tool definitions, and long documents at the front and keep it byte-for-byte fixed. Avoid concatenating volatile fields like timestamps or random IDs before or after it, otherwise a change in the prefix hash invalidates the hit.

    1. [Fixed prefix: system instructions + tool definitions + reference documents]
    2. [Semi-fixed segment: conversation summary (throttled updates per turn)]
    3. [Volatile segment: the current user input]

    On the off-peak side, it comes down to queues and scheduling: write non-real-time tasks into a message queue and consume them in batches during off-peak windows; keep the real-time path in peak hours, and set timeouts and fallback strategies for requests that can be degraded.

    1. # Pseudocode: route by business priority
    2. if request.is_realtime:
    3. return call_model(request, tier="peak")
    4. else:
    5. queue.put(request) # consumed in batches during off-peak hours
    6. return "accepted"

    Supporting observability matters just as much: use a logging service to record each request’s token structure, time window, and hit status, and use monitoring alerts to set thresholds on per-request cost, so anomalies do not surface only at month-end on the bill.

    5. Architecture Choices Enabled by the Open-Source Framework

    Once the framework is open source, teams gain another path: private deployment for small-scale or strict-compliance scenarios, and the hosted API for peaks and complex tasks, forming a hybrid architecture. What you evaluate here is total cost rather than unit price: GPU utilization, batch concurrency, the match between memory and throughput, and operations headcount all feed into total cost.

    A practical rule is to set a “baseline load line”: when stable load stays above a certain threshold for a long time, self-hosting is more cost-effective; spiky business with steep peaks stays more economical on the hosted API. Also keep a unified abstraction layer so business code is not locked to a single backend.

    1. class Backend:
    2. def chat(self, messages): ...
    3. class HostedBackend(Backend): ...
    4. class SelfHostedBackend(Backend): ...
    5. def route(req):
    6. return (SelfHostedBackend() if req.stable else HostedBackend()).chat(req.messages)

    6. Risk and Migration Checklist

    • Contract and pricing: confirm billing item definitions, time-window boundaries, effective dates, and retention of historical prices.
    • Compatibility: check differences in context length, structured output, streaming responses, tool calling, and other capabilities.
    • Regression testing: compare results before and after migration on a fixed evaluation set, avoiding “cost reduction that degrades quality.”
    • Capacity and rate limits: define concurrency ceilings and retry policies to prevent cascading failures at peak time.
    • Exit mechanism: an abstraction layer plus exportable data guarantees rollback is possible.

    7. Conclusion

    “Open source plus a price increase” is a parallel operation of customer acquisition and business-model completion, not a self-contradiction. For consumers, the right move is not to argue over the size of the multiple, but to decompose the bill into token structure and time distribution, then use prefix-cache governance, off-peak scheduling, hybrid deployment, and a unified abstraction layer to turn price volatility into a controllable engineering variable. In the general practice of platforms such as Baidu AI Cloud, this kind of “observable + schedulable + portable” approach is the reliable path for handling price cycles.