Are LLM API Costs Really High? Look Beyond the Per-Token Price
This article explains why the per-token price of an LLM API is an incomplete measure of cost, and how to compare model generations using cost per completed task instead. It introduces a task-level cost model that factors in pass rate, retries, and human review time, shows how output throughput changes the cost structure through concurrency, timeouts, and idle human effort, and outlines a four-step evaluation process with sample pseudocode. It also lists practical optimization techniques such as tiered routing, context governance, constrained output, caching, observability, and elastic capacity, concluding that effective throughput and pass rate often matter more than the sticker price when selecting a model and setting a budget.
1. The Problem: A Price Multiple Is Not a Cost Multiple
Whenever a new flagship LLM is released, the most common reaction in the community is some version of “the price went up several times, is it still worth it?” These discussions usually fixate on the sticker price per million tokens and overlook a more important fact: what an enterprise actually pays for is not tokens, but all the resources required to get a task done.
The core argument in the source material can be reduced to one sentence: if a new-generation model leads significantly in output throughput and first-pass rate, then measured by cost per unit of task, it may actually be cheaper than the previous generation. The claim holds up logically, but it needs to be broken down into verifiable metrics rather than left at the level of gut feeling.
2. Change the Unit: From Per-Token Price to Cost per Task
Let the average input tokens for a task be I, the output tokens be O, and the model prices be p_in and p_out. The direct cost of a single call is:
C_call = I * p_in + O * p_out
But a task is rarely a single call. Add the first-pass rate s (0 to 1), the average number of retries r, and the human review time t_h with the hourly labor rate h:
C_task = (1 + r) * C_call + s_fail * (C_call + t_h * h)
where s_fail = 1 - s. As this shows, when s rises from 0.6 to 0.9, C_task can still fall even if p_out doubles. That is the real criterion for whether something is “expensive.”
3. Why Throughput Changes the Cost Structure
Output speed (tokens/s) does not affect the sticker price. It affects three other things:
- Concurrency capacity: under the same concurrency quota, higher throughput means more tasks completed per unit of time, which spreads hardware and quota costs more thinly.
- Waiting and timeouts: slow output stretches response time and raises the probability of timeout retries, and retries are a cost amplifier.
- Interaction experience and human occupancy: in long-output scenarios such as AI coding and document generation, waiting time translates directly into idle human effort.
So when comparing two model generations, the right comparison is not “flagship against flagship” but “effective throughput against effective throughput for the same business goal”:
effective throughput = output throughput * first-pass rate
4. A Practical Measurement Process
Teams should make this decision in four steps instead of relying on intuition:
- Step 1: Sample real tasks. Pull 100 to 300 real requests from historical logs and preserve the distribution of input and output lengths; avoid idealized samples.
- Step 2: Define a quality bar. Set pass criteria that can be judged automatically, such as tests passing, schema validation passing, or field completeness meeting a threshold.
- Step 3: Run a batch comparison with both models. Under the same concurrency and the same timeout settings, record throughput, pass rate, retry count, and end-to-end latency.
- Step 4: Convert to total cost. Combine direct cost, retry cost, and human review cost to get cost per task, then multiply by monthly task volume to get the monthly budget.
Illustrative pseudocode:
def evaluate(model, samples):ok, tokens_in, tokens_out, retries = 0, 0, 0, 0for s in samples:r = call_model(model, s.prompt) # same timeout and concurrencyretries += r.retry_counttokens_in += r.usage.inputtokens_out += r.usage.outputif judge(r.output, s.criteria):ok += 1return {"pass_rate": ok / len(samples),"cost": tokens_in * P_IN + tokens_out * P_OUT,"retries": retries,}
5. Optimization Practices: Getting More Value from an Expensive Flagship
- Tiered routing: split tasks by difficulty, send simple requests to a lightweight model and complex reasoning or long outputs to the flagship model; this usually produces the most visible drop in overall cost.
- Context governance: deduplicate retrieved snippets, compress conversation history, and inject only necessary fields to cut input tokens directly.
- Constrained structured output: use explicit schema constraints to reduce invalid generation and rework, which raises the first-pass rate.
- Cache reuse: apply prefix caching to stable prefixes (system prompts, specification documents) and result caching to repeated questions.
- Observability: connect logging services and monitoring alerts, and track pass rate and cost by model, scenario, and tenant to form a continuous optimization loop.
- Elastic capacity: use container platform autoscaling and message queues to smooth out peaks, so high-throughput models stay stable during peak hours.
6. Conclusion
“Several times more expensive” is an incomplete conclusion. Once the unit is switched to cost per task, output throughput and first-pass rate often determine the bill more than the sticker price does. If an enterprise already has task tiering, context governance, and end-to-end observability in place, the high unit price of a new flagship model is likely to be offset by fewer retries, shorter human review, and higher concurrency utilization. In general engineering practice on platforms such as Baidu AI Cloud, these methods can serve as the standard procedure for model selection and budget evaluation: measure effective throughput first, calculate total cost second, and only then discuss the unit price.
