LLM API Selection: Look Past Price per Token — Performance and Throughput Drive the Real Cost
When teams add LLM capabilities to an application, a common mistake is comparing prices across model generations and concluding that "the new flagship is 2.5x more expensive, so it isn't worth it." That comparison ignores the practical value of a generational jump in model capability, and it also ignores how performance dimensions such as output speed and latency affect overall cost. This article takes a general technical view of how to evaluate LLM API cost efficiency properly, instead of just reading the price tag.
LLM API Selection: Look Past Price per Token — Performance and Throughput Drive the Real Cost
When teams add LLM capabilities to an application, a common mistake is comparing prices across model generations and concluding that “the new flagship costs 2.5x more, so it isn’t worth it.” This comparison ignores two things: the practical value delivered by a generational jump in model capability, and the impact of performance dimensions such as output speed and latency on the total cost. This article takes a general technical perspective on how to evaluate LLM API cost efficiency rationally, rather than simply reading the list price.
1. Why price-per-token comparisons are unreliable
LLM APIs are typically billed separately for input tokens and output tokens, so the unit price is the most obvious metric — but it is only the “cost on paper.” Actual spend also depends on three frequently overlooked factors:
- Total tokens needed to complete the task: Stronger models often finish a task in fewer reasoning steps and with more concise output, so the tokens actually consumed can be lower.
- Output speed (throughput): For the same task, slower output means longer waits for users, and the gap is dramatically amplified in long-form scenarios.
- Concurrency and queuing cost: A model with insufficient throughput queues requests under high concurrency, which indirectly raises the engineering cost of scaling out and fault tolerance.
So “is it expensive?” has to be measured against a concrete workload. Comparing unit prices in isolation is close to meaningless.
2. Model tiers: different positions solve different problems
Mainstream platforms usually offer a tiered model lineup that can be roughly divided into three groups:
| Tier | Typical positioning | Suitable use cases |
|---|---|---|
| Flagship | Best possible reasoning and generation quality | Complex reasoning, code generation, long-form writing |
| Standard | Balanced quality and cost | Everyday conversation, content generation, general Q&A |
| Lightweight | Low latency, high throughput, low cost | Intent detection, classification and extraction, high-concurrency short interactions |
The key point is that the tiers are not a simple old-versus-new replacement — they represent differentiated capability boundaries. Running a task that a lightweight model should handle on a flagship model wastes money; forcing a lightweight model to handle complex reasoning causes quality collapse and repeated retries, which is equally a hidden waste.
3. The two core performance metrics: latency and throughput
Many people focus only on generation quality and overlook how directly performance affects both user experience and cost.
Time to first token (TTFT): the time from sending the request to receiving the first token. It determines how responsive an interaction feels, and it matters especially in interactive and agent-style tool-calling chains — when steps are chained together over multiple rounds, latency accumulates and compounds.
Output throughput (tokens/s): the number of tokens generated per unit of time. It directly determines how long long-form tasks take to finish. For example, consider a task that needs to output 2,000 tokens:
Model A (high throughput): ~80 tokens/s → about 25 secondsModel B (low throughput): ~20 tokens/s → about 100 seconds
If the two models have similar unit prices but differ 4x in throughput, user experience and concurrency capacity differ enormously. In a high-concurrency production service, low throughput means each request holds a connection longer, the number of concurrent requests the same fleet of machines can serve drops sharply, and scaling costs climb accordingly. This is why a model with faster output can end up cheaper overall, even at a slightly higher unit price.
4. Building a reproducible cost-evaluation framework
For a rational decision, run a benchmark over a shared evaluation set rather than relying on vendor marketing claims or one-off experiences.
import timedef benchmark(client, model_id, prompts):total_in = total_out = 0ttft_samples, tps_samples = [], []for prompt in prompts:start = time.perf_counter()first_token_time = Noneout_tokens = 0# Consume the response as a stream so first-token latency and throughput can be measured accuratelystream = client.chat.completions.create(model=model_id,messages=[{"role": "user", "content": prompt}],stream=True,)for chunk in stream:if first_token_time is None:first_token_time = time.perf_counter() - startout_tokens += count_tokens(chunk)elapsed = time.perf_counter() - startif first_token_time is not None:ttft_samples.append(first_token_time)tps_samples.append(out_tokens / elapsed if elapsed else 0)total_out += out_tokensreturn {"avg_ttft_s": sum(ttft_samples) / len(ttft_samples),"avg_tokens_per_s": sum(tps_samples) / len(tps_samples),"avg_output_tokens": total_out / len(prompts),}
The evaluation should cover at least:
- Task success rate and quality: measure whether the output meets the bar using real business samples — this is the denominator of cost efficiency.
- Average output tokens: more capable models often produce more concise output, which offsets their unit-price disadvantage.
- Time to first token and throughput: translate directly into user experience and concurrency capacity.
- Blended unit cost: use
total cost / successfully completed tasksas the final metric, not the unit price.
5. Engineering practice: tiered routing and cascading
The mature approach is not “bet the whole product on one model” but dynamic routing based on task complexity:
- Lightweight first, flagship second (cascading): handle requests with the low-cost lightweight model, and escalate to a stronger flagship model for a retry only when confidence is insufficient or quality falls short. Most simple requests are absorbed by the lightweight model, and only complex ones pay the flagship price.
- Route by scenario: send intent detection and structured extraction to lightweight models; send complex reasoning and high-quality generation to flagship or standard models.
- Caching and batching: cache results for frequent repeated requests, and use throughput-first configurations for offline batch jobs to cut cost further.
def route_and_run(client, prompt, lite_model, flagship_model):# Layer 1: handle the request quickly with the lightweight modellite_result = client.chat.completions.create(model=lite_model,messages=[{"role": "user", "content": prompt}],)if is_confident(lite_result): # custom confidence checkreturn lite_result# Layer 2: escalate to the flagship model only when quality is insufficientreturn client.chat.completions.create(model=flagship_model,messages=[{"role": "user", "content": prompt}],)
6. Conclusion
Back to the original question — “the new flagship generation costs more, so is it expensive?” The answer depends on which costs you include in the calculation. Looking only at the price sheet can lead to the wrong conclusion; but once you factor in task completion quality, actual token consumption, output throughput, and concurrency cost, a more capable model often turns out to be better value under real workloads.
Three principles for rational selection: let a shared evaluation set do the talking, measure blended cost per completed task rather than unit price, and use tiered routing so that expensive capability is spent where it matters. Whether you choose a general-purpose model service from a cloud provider, or assemble a full application pipeline with infrastructure such as object storage, message queues, logging, and monitoring and alerting, this evaluation methodology applies. In technical selection there is no absolute “expensive” or “cheap” — only “does it match your workload.”
