How to Evaluate Large Language Model API Pricing and Choose the Right Model

    Large language model pricing cannot be evaluated by input or output rates alone. This article explains how token billing, prompt caching, model efficiency, task success rates, subscription limits, and routing strategies affect the real cost of AI workloads, and provides a practical framework for comparing models and planning enterprise budgets.

    The Real Cost Behind Rising LLM API Prices

    The release of a new flagship model from a domestic AI provider recently triggered widespread discussion about API pricing. Its output price reached 100 yuan per million tokens, while input tokens cost 20 yuan per million and cached input tokens cost 1 yuan per million. Compared with the previous generation, some of these rates increased several-fold.

    Users also compared the model’s subscription quotas with plans from leading international providers and concluded that the service appeared inexpensive at first glance but was actually more expensive in practice. These debates point to a broader question: How should developers and businesses evaluate the real cost of large language model services without being misled by headline prices?

    This article sets aside any specific provider and examines the issue from three perspectives: the general token billing model, practical cost estimation, and model selection.

    1. Understand How LLM APIs Are Billed

    Before deciding whether a model is expensive, you need to understand how its invoice is calculated. Most major LLM APIs use token-based billing. A typical bill includes the following components:

    • Input tokens: All content sent to the model, including system prompts, conversation history, tool results, and retrieved context. In long-context applications such as AI agents and retrieval-augmented generation (RAG), input usage can be much higher than output usage.
    • Output tokens: The content generated by the model. Output pricing is usually significantly higher than input pricing—often three to five times higher, or even more.
    • Cached input tokens: Repeated prefixes in a request may qualify for low-cost cached-input pricing. Prefix caching is an important cost-control mechanism, and cached tokens may cost as little as one-twentieth of the standard input price.

    For a typical agent task, the cost can be approximated as:

    1. Single-request cost = Input tokens × Input price
    2. + Output tokens × Output price
    3. - Savings from cached input tokens
    4. Total task cost = Σ (Cost of each request across multiple rounds)

    The key issue is that a complex task may require dozens of model calls. Each round may resend some or all of the previous conversation history. As a result, cumulative input tokens can be dozens of times greater than output tokens.

    Therefore, judging a model only by its output price is incomplete. Conversely, focusing only on input pricing while ignoring the proportion of output tokens can also produce a misleading conclusion.

    2. Why a Fivefold Price Increase Does Not Necessarily Mean a Fivefold Cost Increase

    One major point of debate is the sharp increase in the listed price of a new model compared with its predecessor. However, evaluating the cost impact of a model upgrade requires considering at least three variables.

    1. Model efficiency

    A newer model may have stronger reasoning capabilities and complete the same task with fewer calls or a shorter reasoning process.

    Suppose an older model consumes 1 million tokens to complete a task, while a newer model consumes only 300,000 tokens. Even if the newer model’s unit price is five times higher, the actual task cost increases by only 50%.

    On the other hand, if the new model generates a large amount of additional reasoning content, the real cost increase may be significantly higher than the increase in the listed price.

    2. Cache hit rate

    There can be a substantial difference between cached-input pricing and standard input pricing—for example, 1 yuan versus 20 yuan per million tokens. In agent and multi-turn conversation scenarios, a well-designed application architecture may achieve a prefix cache hit rate of 70% to 90%. In that case, the bill becomes much less sensitive to the standard input price.

    Cost analysis should use a weighted effective input price:

    1. Effective input price =
    2. Cache hit rate × Cached input price
    3. + (1 - Cache hit rate) × Standard input price

    For example, with an 80% cache hit rate:

    1. Effective input price = 0.8 × 1 + 0.2 × 20 = 4.8 yuan per million tokens

    This is far lower than the nominal standard input price of 20 yuan per million tokens.

    3. The hidden cost of task success rate

    Task success rate is one of the most frequently overlooked factors. If a low-cost model succeeds on 60% of tasks while a more expensive model succeeds on 90%, the cheaper model may require more retries.

    A commonly used formula is:

    1. Effective task cost =
    2. Average tokens per task × Weighted price ÷ Task success rate

    The real measure of cost-effectiveness is this effective task cost—not any single price listed on a provider’s pricing page.

    3. How to Compare Subscription Plans with Pay-as-You-Go Pricing

    Another common mistake is to treat a subscription plan’s stated usage quota as equivalent to its actual value. Several factors need to be considered.

    First, nominal quotas and actual consumption are different. Many plans estimate their quotas using an idealized usage model. In real-world use, expanding context, failed attempts, retries, and idle capacity mean that users can typically complete fewer tasks than the theoretical quota suggests.

    Second, models consume tokens at very different rates. Some tests indicate that certain newer-generation models consume nearly as many tokens as leading international models to complete the same task. Therefore, two plans with similar token quotas may support very different amounts of actual work.

    For a fair comparison, compare:

    1. Subscription price ÷ Number of comparable tasks completed

    rather than:

    1. Subscription price ÷ Nominal token quota

    Third, personal subscriptions and enterprise usage should be evaluated separately. Personal plans are essentially quota-based packages designed for interactive use. Enterprise integrations typically use pay-as-you-go APIs and may also involve logging, monitoring, alerting, and traffic-management services. Their cost structures are fundamentally different and should not be compared directly.

    For enterprise users, a more practical approach is to run a small-scale benchmark using real business traffic. Record the average token consumption, cache hit rate, and success rate for each task type, then use the results to estimate the monthly budget.

    A simple load-testing record might look like this:

    1. # Example task cost benchmark record
    2. task_record = {
    3. "task_type": "Code repair", # Type of task
    4. "rounds": 12, # Number of model calls
    5. "input_tokens": 380000, # Cumulative input tokens
    6. "cached_tokens": 290000, # Cached input tokens
    7. "output_tokens": 45000, # Cumulative output tokens
    8. "success": True, # Whether the task succeeded
    9. }
    10. # Cost = (380000-290000)/1e6*input price
    11. # + 290000/1e6*cached price
    12. # + 45000/1e6*output price

    After collecting dozens or hundreds of records like these, you can establish a cost distribution for each task type. This first-hand data cannot be replaced by a provider’s pricing sheet.

    4. Model Selection Recommendations for Developers and Businesses

    Based on the analysis above, the following checklist provides a general model-selection framework:

    1. Rank candidate models by effective task cost. Use the same task set and evaluation criteria for every model. Measure token consumption and success rate, then calculate the weighted cost.
    2. Design the application architecture around caching. Keep prompt prefixes stable and place dynamic content later in the prompt to maximize prefix cache hits. This can often reduce costs faster than switching models.
    3. Route tasks by complexity. Use smaller models for simple tasks and flagship models for complex ones. In practice, routing strategies can reduce overall costs by more than 30%.
    4. Evaluate engineering capabilities beyond price. Rate limits, context length, concurrency quotas, observability, and traffic controls can all affect total cost of ownership.
    5. Set budget guardrails. Whether you use pay-as-you-go billing or a subscription, configure usage alerts and circuit breakers to prevent uncontrolled spending.

    Conclusion

    LLM pricing is not a matter of deciding whether a model is simply “expensive” or “cheap.” It is an engineering question that can be answered with data.

    A higher unit price may not increase the real cost if the model completes tasks more efficiently. Likewise, a subscription with a large nominal quota may provide far less practical value once real task consumption is taken into account.

    By understanding token billing, calculating effective task cost, measuring cache performance and success rates, and applying tiered model routing, developers and businesses can make informed decisions even when providers change their prices.