LLM API Cost Breakdown: How to Compare Pricing Plans After Discounts

    This article explains how to compare large language model API costs on equal terms. It covers how to normalize workloads, split bills into input, cached input, and output costs, and compare pay-as-you-go, batch processing, and subscription quotas. Five hypothetical scenarios show how discounts change total cost. The article closes with quality-adjusted cost metrics and practices for ongoing cost management.

    1. Start With a Common Workload, Then Compare Bills

    When choosing an LLM API, developers often start by comparing the price per million tokens. This metric is useful for quick filtering, but it is not enough to support purchasing or architecture decisions.

    Two workloads can have similar total token counts and still cost very different amounts. One may send long conversation histories with short questions, while another sends short inputs and generates full reports. The ratio of input to output tokens changes costs significantly. Cache hits, asynchronous batch processing, and subscription quota utilization can further change the cost structure.

    A fair comparison should therefore not rely on the price sheet alone. It should measure:

    The total cost of completing the same amount of valid work, under the same task, the same quality threshold, and similar service requirements.

    This article uses a generic billing model and hypothetical numbers to explain the calculation method. The numbers do not correspond to the actual pricing of any specific service, and they do not guarantee that any discount or capability is available. For real decisions, use your effective contract, the current billing documentation, and your actual invoices.

    2. Break the API Bill Into Costs You Can Calculate

    1. Count input and output separately

    Input tokens usually come from system instructions, user questions, conversation history, retrieved documents, and tool responses. Output tokens come from the content the model generates.

    Define the following variables:

    • I: uncached input, in millions of tokens
    • H: cache-hit input, in millions of tokens
    • O: billable output, in millions of tokens
    • Pi: standard input price
    • Ph: cache-hit input price
    • Po: output price

    The base inference cost is:

    Inference cost = I × Pi + H × Ph + O × Po

    I and H must not overlap. If the reported total input already includes cache hits, subtract the hit volume before calculating the standard input cost. This prevents counting the same tokens twice.

    2. Cached input is not automatically free

    Context caching is typically used to reuse repeated prefixes, such as fixed system instructions, shared knowledge materials, or stable tool descriptions.

    Confirm separately whether a service supports caching, which content can produce cache hits, how long the cache persists, and whether writing or storage fees apply. A lower cache-read price does not mean every piece of historical context can be treated as discounted.

    A more complete cost model is:

    Total cost = inference cost + cache surcharges + other costs

    Other costs may include application-side storage, logging, networking, task scheduling, and necessary operations overhead. Whether to include them depends on whether the analysis covers the API bill or the total business cost. Do not mix the two.

    3. Final answer length is not the billable output volume

    For services that provide additional reasoning content, check three things: whether reasoning tokens are metered separately, whether they count toward output fees, and whether callers can see them.

    Do not apply a fixed “answer length times a multiplier” estimate across all models. A more reliable approach is to sample real tasks, record the billable usage, and observe both the average and high-percentile values. The average helps estimate long-term spending. High-percentile values help set per-call budgets and anomaly alerts.

    3. Three Billing Models and When Each One Saves Money

    1. Pay-as-you-go: flexible, but do not treat promotions as a long-term baseline

    Pay-as-you-go pricing usually fits businesses with small call volumes, volatile demand, or applications still in validation.

    When comparing options, calculate two budgets:

    • Monthly cost under the current effective discount
    • Monthly cost after the discount ends and regular prices apply

    If a system only meets its cost target during a promotion, the business is sensitive to price changes. In that case, prepare optimizations such as context compression, model tiering, or task scheduling in advance, rather than assuming the discount will continue.

    Also check the scope of each discount. Input, output, and cache reads may not all be discounted, and different discounts may not stack.

    2. Batch processing: trade response time for lower cost

    Data labeling, historical content analysis, offline summarization, and bulk quality checks usually do not need immediate responses. They are good candidates for asynchronous batch processing.

    Whether batch processing is actually cheaper depends on several factors:

    • Whether the task can tolerate delayed completion
    • Submission size and execution window limits
    • How failed tasks are billed
    • Whether resubmission is required
    • Whether results can be confirmed item by item
    • Whether results expire quickly

    From an engineering perspective, assign a unique identifier to each task, track submission and completion status, and deduplicate tasks that already succeeded. Otherwise, resubmitting after timeouts can cancel out the price benefit of batch processing.

    3. Subscription quotas: utilization matters more than the discount

    Subscriptions typically exchange a fixed fee for a set quota. Their value depends on whether the quota can be used for real demand within its validity period.

    Let S be the subscription fee and V be the regular