Why Are Open-Source LLM APIs Still Expensive? A Deep Dive into Cloud Pricing

    Open-source model weights are freely available, but hosted inference APIs can still be expensive. This article explains why API list prices are often disconnected from raw inference costs, how prefix-cache pricing affects long-context workloads, how subscription plans compare with pay-as-you-go billing, and how developers can calculate the real cost of an LLM service.

    Why Are Open-Source LLM APIs Still Expensive? A Deep Dive into Cloud Pricing

    Introduction

    Many developers have the same question: if a model is open source and its weights can be downloaded freely, why is the official API still relatively expensive? In theory, inference costs should continue to decline as hardware improves. Yet API bills do not always fall at the same pace.

    To understand why, it helps to move beyond the assumption that price is determined solely by technical cost. Model inference APIs are typically priced as cloud PaaS products, and their pricing has no direct causal relationship with whether the underlying model is open source.

    This article examines the issue from four perspectives: retail pricing strategy, cache-related costs, subscription versus usage-based billing, and a practical framework for evaluating inference services.

    1. The Nature of Retail Pricing: Leaving Room for Commercial Negotiation

    1.1 List prices are often a starting point

    In cloud services, the public list price is rarely the final price paid by most enterprise customers. Whether the product is a compute instance, object storage, or an inference API, the published price is often set relatively high for several reasons:

    • To support discount programs: Tiered pricing, committed-use discounts, and new-customer promotions all require a reference price.
    • To create room for negotiation: Enterprise customers often sign annual agreements at prices significantly below the list price. A higher list price makes the negotiated discount appear more substantial.
    • To cover channel and distribution costs: Some cloud providers sell through reseller or partner networks and need to reserve room for channel margins.

    Therefore, when an inference API appears expensive, its public price may be only the starting point for negotiation rather than the actual market price.

    1.2 Price anchoring and competitor references

    Pricing is also influenced by the rates of leading products in the market. Once major closed-source models establish an API price range that customers are willing to accept, newer providers often use those prices as benchmarks and set their own list prices at a discount based on perceived capabilities.

    This creates an interconnected pricing structure across the industry. Prices may look high, but they are also widely accepted because providers use one another as reference points.

    Other cloud vendors may have little incentive to disrupt this structure. As long as inference costs remain manageable, the difference between operating cost and list price becomes a source of profit. In a market where most participants follow similar pricing practices, a single provider has limited motivation to cut prices dramatically.

    That is why high pricing is not necessarily the result of one provider acting alone. It is often a broader industry pricing pattern.

    2. An Overlooked Cost Factor: Cache Pricing

    2.1 Why cache hits matter

    Modern coding assistants and conversational applications frequently reuse the same context. In a software development workflow, large portions of a project’s codebase may be sent repeatedly across multiple turns. In practice, cache hit rates can often exceed 95%.

    To reduce the cost of recomputing repeated context, many inference services support prefix caching. Tokens served from the cache are billed at a rate substantially lower than that for regular input tokens.

    2.2 Cache pricing determines the practical value of long context

    The problem is that providers can price cached tokens very differently. Some services promote their long-context capabilities but charge relatively high rates for cached tokens. As a result, long context may be technically supported but economically impractical.

    Consider a typical request containing 100K tokens of context. If the cached portion is priced close to the standard input rate, a single request may cost several yuan. For a coding assistant used hundreds of times per day, the monthly bill can quickly become difficult to justify.

    In this situation, long-context support becomes a feature that looks impressive on a specification sheet but offers limited value in production.

    The key lesson is:

    To estimate the real cost of an inference service, do not look only at input and output prices. You must also account for the cache hit rate in your workload and include cached-token pricing in the calculation.

    3. Subscription Plans Versus Pay-As-You-Go Billing

    3.1 Calculate the effective price of a subscription plan

    Subscription plans designed for coding workloads have become increasingly common. The right way to evaluate one is not to look at its monthly fee alone, but to calculate the effective token price when the included quota is fully consumed.

    For example, assume that an API’s list-price calculation produces an average cost of approximately CNY 1.8 per million tokens in a coding workload with a 98% cache hit rate. If a CNY 469 monthly plan is fully used, its effective cost may be only around CNY 0.06 per million tokens—roughly 0.33% of the list-price equivalent.

    Even after accounting for restrictions that consume quota three times faster during peak periods, the overall effective discount may still be around 90%.

    From a purely financial perspective, a fully utilized subscription plan is often one of the least expensive options available. However, it comes with two significant drawbacks:

    1. Limited availability: Popular plans may be sold out or require users to wait. A low-priced plan that cannot be purchased is not genuinely low-cost.
    2. Reliability risks: During peak periods, users may encounter throttling, queues, or slower responses, which can disrupt development work.

    3.2 Behavioral side effects of quota-based plans

    Subscription billing also creates a less obvious problem: users may begin optimizing for quota consumption rather than actual requirements.

    Because the quota has already been paid for, some developers intentionally increase their usage or work unusually long hours to avoid “wasting” the allowance. In extreme cases, people have reportedly pushed themselves so hard to consume a plan’s quota that they experienced health problems.

    This kind of consumption is driven by the need to use up prepaid capacity rather than by genuine demand. In effect, users may exchange time and well-being for a nominal discount, making the real cost less attractive than the price suggests.

    3.3 The differentiated value of transparent usage-based billing

    Usage-based billing offers a clear alternative. Instead of relying on complex subscription structures, a provider can publish a straightforward rate and charge customers only for what they use.

    For example, in a comparable coding workload, one provider may reduce the actual average cost to approximately CNY 0.07 per million tokens. That approaches the effective price of fully utilizing a heavily discounted subscription plan, while avoiding prepayment, limited availability, and quota pressure.

    This also challenges the common claim that low prices must be unprofitable. Some providers publicly maintain that transparent usage-based billing can be profitable on its own.

    The positive response to this model reflects a broader user preference: developers are generally not opposed to paying for infrastructure. They are frustrated by complicated pricing systems that make the real cost difficult to understand.

    4. A Practical Framework for Evaluating Inference Costs

    When comparing inference services, developers should evaluate more than the advertised input and output rates.

    1. Calculate the effective token price

    Use your actual workload characteristics—including the input-to-output ratio and cache hit rate—to estimate the total cost per million tokens.

    A simplified calculation is shown below:

    1. def estimate_cost(input_tokens, output_tokens,
    2. cache_hit_rate,
    3. price_input, price_cached, price_output):
    4. """Estimate the cost of one request.
    5. Prices should use the same unit throughout.
    6. """
    7. fresh_input = input_tokens * (1 - cache_hit_rate)
    8. cached_input = input_tokens * cache_hit_rate
    9. cost = (fresh_input * price_input
    10. + cached_input * price_cached
    11. + output_tokens * price_output) / 1_000_000
    12. return cost
    13. # Example: 100K context, 98% cache hit rate, and 2K output tokens
    14. cost = estimate_cost(
    15. input_tokens=100_000,
    16. output_tokens=2_000,
    17. cache_hit_rate=0.98,
    18. price_input=4.0, # CNY per million tokens, illustrative value
    19. price_cached=1.0, # Price for cached tokens, illustrative value
    20. price_output=16.0 # CNY per million tokens, illustrative value
    21. )
    22. print(f"Estimated cost per request: {cost:.4f} CNY")

    2. Include cached-token pricing

    For long-context applications, the price of cached tokens can have a greater effect on total cost than the standard input price. This is particularly important for coding assistants and other applications that repeatedly send similar context.

    3. Evaluate subscription plans using their fully utilized price

    Calculate the effective cost when the plan’s quota is fully consumed. Then account for availability, rate limits, peak-period multipliers, queueing, and response-time degradation.

    A discount that depends on uninterrupted access to a scarce or heavily throttled plan is not a reliable discount in practice.

    4. Watch for quota-driven usage

    Prefer billing models that allow you to use the service according to actual demand. Avoid unnecessary calls made solely to consume prepaid quota.

    5. Monitor usage continuously

    Use logs, monitoring, and budget alerts to track token consumption over time. This makes it easier to detect unexpected usage and prevent uncontrolled bills.

    For enterprise teams that need to manage inference resources from multiple providers, cloud platforms such as Baidu AI Cloud can also be used alongside logging, monitoring, and cost-analysis tools to build a more controlled cost-management process.

    Conclusion

    Open source does not automatically mean inexpensive API access. High retail prices are common across the cloud inference industry because providers use list prices to support discounts, enterprise negotiations, and channel economics.

    The biggest differences in actual cost often come from factors below the surface: cached-token pricing, the effective price of subscription plans, service availability, and billing transparency.

    When selecting an inference provider, developers should calculate the effective token cost for their real workload instead of relying on list prices alone. They should also consider cache hit rates, service stability, peak-period limits, and the behavioral incentives created by quota-based plans.

    As more providers demonstrate that transparent usage-based billing can be both affordable and profitable, inference pricing may gradually become simpler and easier to understand. That would benefit developers across the industry.