LLM API Price Cuts: Cost Calculation, Model Selection, and the Open-Source vs. Closed-Source Landscape

    Falling LLM API prices are pushing enterprises to recalculate the real cost of AI deployment. This article explains how token-based pricing actually works, the technical reasons behind declining inference costs, the competitive dynamics between open-source and closed-source models, and a practical five-step process for model selection. It also clarifies the difference between KV Cache and semantic caching, and how to use the latter correctly.

    Price adjustments for open-source LLM APIs are forcing enterprises to recalculate the cost of putting AI into production. Recently, one open-source model provider ended its early promotional pricing and published a long-term pricing plan. Specific prices should be checked against the provider’s official price list; this article deliberately avoids quoting unverified numbers and focuses instead on pricing structures and evaluation methods. After reading it, you should be able to build your own cost accounting and model selection workflow.

    What Lower Prices Actually Mean

    API fees are typically billed per token, split into three components: non-cached input, cached input, and output. Many providers charge a higher unit price for output tokens than for input tokens, and a significantly lower price for cached input. Therefore, judging cost by a single “price per million tokens” figure easily leads to wrong estimates. Proper accounting starts by measuring the input length, output length, and cache hit rate of each request, then multiplying by the corresponding unit prices.

    Performance gaps and price gaps need to be evaluated separately. On difficult tasks such as complex reasoning and long-chain code generation, some top-tier closed-source models still hold an advantage. In everyday scenarios—knowledge-base Q&A, routine text processing, and code completion assistance—new-generation open-source models generally reach a usable level. For most businesses, the key question is which model meets the quality bar on the company’s own evaluation set at the lowest cost.

    Why Prices Can Come Down: The Technical Reasons

    Low prices are not guaranteed to last, but inference costs genuinely are declining. There are two main drivers.

    The first is diversification of hardware supply. As domestically produced compute chips continue to improve in per-card performance, memory bandwidth, and cluster interconnect, cloud providers and model vendors have more hardware options. Supply-chain competition helps reduce the procurement and deployment cost per unit of compute.

    The second is inference system optimization. Common techniques include:

    1. PagedAttention: manages the KV Cache in a paged fashion, reducing memory fragmentation and increasing the number of requests that can be processed concurrently.
    2. Operator fusion: merges multiple computation steps to reduce repeated reads and writes to GPU memory.
    3. INT8 and INT4 quantization: reduces the memory footprint of weights and intermediate results, but may introduce some accuracy loss that must be validated in business evaluations.
    4. Continuous batching: immediately slots new requests in as others finish, improving GPU utilization.

    These optimizations allow a single GPU to process more tokens per unit of time, lowering the marginal cost per token. However, implementations and cost structures vary widely across providers, so external users cannot infer a provider’s pricing floor from technical principles alone.

    The Open-Source vs. Closed-Source Competitive Landscape

    The traditional closed-source model relies on model capability and proprietary service interfaces to command a premium, using higher margins to cover R&D and compute investment. The open-source approach attracts developers through lower prices and open weights, and some users can self-host the models to gain more control.

    The two approaches are not necessarily mutually exclusive substitutes. A more likely outcome is that high-end scenarios are served by closed-source models offering the strongest capabilities, while a large volume of routine workloads is handled by open-source or self-hosted models. How overall market share will be divided is hard to predict today; it depends on how fast model capabilities evolve, regulatory requirements, developer tooling, and enterprise migration costs.

    Why Closed-Source Vendors Struggle to Match Low Prices

    Closed-source vendors face three main difficulties.

    First, sunk costs. Pre-training large models requires massive investment in compute, data, and talent, and these costs must be recovered through commercial revenue. Cutting prices very low may make revenue insufficient to cover existing investment, which in turn affects investor expectations.

    Second, the structure of their moat. Differentiation for closed-source vendors often comes from the model itself and the closed service around it. Moving to open weights could weaken that differentiation, so vendors prefer to keep their core models closed while launching low-priced smaller models or sub-product lines.

    Third, compute cost structure. Some vendors depend on a specific compute ecosystem and have limited bargaining power in procurement, so their unit costs may not fall as fast as those of vendors with diversified supply chains.

    These judgments are inferences based on business logic; each vendor’s actual strategy may involve additional factors.

    A Five-Step Method for Enterprise Model Selection

    Step 1: Classify your tasks. Group business requests by difficulty, latency requirements, accuracy requirements, and data sensitivity. For example, intent recognition and simple Q&A fall into a low-difficulty class, while complex reasoning and high-risk judgments belong to a high-difficulty class.

    Step 2: Build an evaluation set. For each task class, sample real cases, have standard answers or scoring rubrics annotated manually, and use the same evaluation to compare candidate models on accuracy, refusal rate, output format stability, and average latency. Do not rely solely on public leaderboards, because leaderboard tasks can differ significantly from your business tasks.

    Step 3: Calculate per-request cost. Using input tokens, output tokens, and cache hit rate as variables, compute total monthly cost, and include the overhead of retries, failed requests, and human review.

    Step 4: Design multi-model routing. At the gateway layer, route requests to models based on task classification: low-difficulty requests go to low-cost models, high-difficulty requests go to high-capability models. Routing rules need to be rechecked regularly with the evaluation set, because both model versions and prices change.

    Step 5: Set up fallback strategies. When the primary model times out, is rate-limited, or returns malformed output, automatically switch to a backup model and log the reason for the switch.

    Using Semantic Caching Correctly

    Semantic caching is often confused with KV Cache reuse, but the two operate at different layers and must be designed separately.

    The KV Cache lives inside the inference engine and stores intermediate results of attention computation. It can typically only be reused when the prefix token sequences of two requests are exactly identical—for example, the same system prompt and the same long document. This reuse is handled by the inference service; application code generally does not interact with it directly.

    Semantic caching lives at the application layer. A common approach is to generate a vector representation of the user’s question and store it in a vector database or key-value store. When a new request arrives, the system retrieves similar questions; if the similarity exceeds a threshold, it returns the historical answer directly. What is reused is the final answer, which has nothing to do with the KV Cache.

    When using semantic caching, keep the following points in mind:

    1. Calibrate the similarity threshold with labeled data. If the threshold is too low, “the 2025 policy” and “the 2026 policy” may be mistakenly treated as the same question.
    2. Questions involving numbers, dates, names, amounts, or compliance clauses should use exact matching, or bypass the cache entirely.
    3. Caches need version identifiers. When the model version, prompt template, or knowledge base content is updated, the related cache entries should be invalidated.
    4. Set expiration times and periodically sample cached answers to check whether they are still correct.
    5. On cache misses or low-confidence matches, fall back to a live model call.