LLM API Cost, Throughput, and Transparency: A Practical Benchmarking Methodology
This article presents a reusable methodology for evaluating large language model APIs beyond headline per-token pricing. It explains why a low unit price does not equal low cost, shows how to normalize a bill into four explainable components, and offers a three-layer approach to diagnosing throughput slowdowns. It also argues that reasoning-chain visibility is a hard evaluation metric, and closes with a one-week checklist for building your own benchmark covering cost, throughput stability, and process transparency.
1. Background: Why a Cheap Unit Price Does Not Mean Low Cost
In real engineering selection, the cost of a model service is never a linear extrapolation of its unit price. After one intensive period of use spanning weekends and weekdays, with highly mixed task types (code generation, long-document summarization, structured extraction, multi-turn conversation), a typical observation was: roughly 180 million tokens consumed in total, with actual spend of only about RMB 31, which works out to an average of about RMB 0.17 per million tokens.
That number is attractive, but it cannot be used directly as a decision basis, for three reasons:
- Task structure determines the effective unit price. Output tokens are usually more expensive than input tokens. If your workload has a very low output share (for example, on the order of 0.5%), the bill will be dominated by the input side; conversely, long-form generation workloads will see costs rise significantly.
- Caching changes the effective unit price. Once a prefix cache hit occurs, the repeated input portion is billed at a lower rate. A 93% hit rate and a 30% hit rate can produce bills that differ by several times.
- Off-peak and peak periods carry different prices. Some services offer discounts off-peak and revert to standard pricing during peak hours, or even double it. Using off-peak data to project an annual budget will systematically underestimate it.
The correct approach, therefore, is to first build your own usage profile, and only then compare unit prices.
2. Cost Modeling: Breaking the Bill into Four Explainable Components
The recommended normalization is to convert everything to a “per billion tokens” baseline for easy side-by-side comparison:
effective cost = input tokens × input unit price × (1 - cache hit rate × cache discount rate)+ output tokens × output unit price+ wasted consumption from failed retries and timeouts+ fixed engineering costs (gateway, logging, monitoring, rate-limit queuing)
Extrapolated to one billion tokens using the usage profile from the case above (cache hit rate about 93.7%, output share about 0.59%), the magnitude lands at roughly RMB 170. For the same workload, the two tiers commonly seen in the industry are approximately: the lightweight tier is close to that figure off-peak and doubles at peak; the high-performance tier is about 3x off-peak and about 6x at peak.
The conclusion is not “who is cheaper,” but rather: under batch workloads with a very low output share and a very high cache hit rate, the cost-performance advantage of lightweight-tier models is amplified; under interactive workloads with long outputs and low cache hit rates, the gap between tiers converges quickly. Selection must be bound to the workload profile.
It should be emphasized that the unit prices and discounts above are only methodology examples. Billing rules, caching strategies, and peak/off-peak definitions vary widely across providers, so always rely on the official billing documentation and bill details applicable when you actually integrate.
3. Throughput Evaluation: Splitting “Slow” into Three Locatable Layers
Another key phenomenon in the case was speed variance: about 50–55 tokens/s off-peak, which is acceptable; at peak, the reasoning chain dropped to 4–9 tokens/s and the final output to 12–25 tokens/s. Determining whether this is a model problem, a service problem, or a client problem requires layered investigation.
Layer 1: Client and network. Run a synchronous test against another model or a lightweight service. If the same scenario can hold a steady 125–135 tokens/s, local network and client rendering bottlenecks can be ruled out.
Layer 2: Concurrency and rate limiting. Whether the documented concurrency limit (for example, 50) is being triggered can be confirmed via client-side instrumentation of in-flight request counts. If a single request at low concurrency is still slow, rate limiting is not the cause.
Layer 3: Server-side queuing and scheduling. When overall peak throughput shifts downward and requests are broadly slower, this usually points to server-side resource pressure or queuing. The engineering response here is not to wait, but to design a degradation path:
# Pseudocode: rolling-window throughput monitoring with automatic degradationif throughput < LOW_WATERMARK and inflight < CONCURRENCY_LIMIT:# Slowdown not caused by rate limiting; switch to a fallback model or a smaller specroute_to_fallback(reason="server_side_slowdown")record_metric("fallback_triggered", tags={"cause": "throughput"})
Supporting recommendations include: setting timeouts and resumable checkpoints for long tasks, making critical paths switchable across multiple models via routing, and capping reasoning-chain length to control time to first token.
4. Observability: Why Reasoning-Chain Transparency Is a Hard Metric
One valuable insight from the case: when the reasoning chain scrolls slowly at 4–9 tokens/s, the user can at least confirm that “the task is still progressing.” But if the interface shows only an animated icon and discloses no intermediate process, there is no way to distinguish “thinking” from “queued” from “disconnected.”
This raises a frequently overlooked evaluation dimension — process visibility. It directly affects three things:
- Fault diagnosis efficiency: with token-level progress, you can quickly separate slow from stalled, shortening mean time to repair.
- Cost auditability: only by seeing reasoning tokens and output tokens consumed separately can you verify the cache hit rate and output share, and thus validate the bill.
- Experience controllability: it enables a “no-progress timeout” policy that automatically aborts and retries, instead of leaving the user waiting indefinitely.
The engineering recommendation is to build your own observability layer: record time to first token, reasoning-token rate, output-token rate, cache hit flags, and error-code distribution, then wire these into monitoring, alerting, and logging services to form a traceable call ledger.
5. Implementation Checklist: Build Your Own Benchmark in One Week
- Establish a baseline workload: fix 10–20 representative tasks covering three categories — long input, long output, and multi-turn.
- Unify the unit of measurement: always normalize to per million / per billion tokens, and record the cache hit rate and output share.
- Sample at both peak and off-peak: sample once in each, and report both numbers.
- Score on three dimensions: cost, throughput stability, and process transparency, each weighted, to avoid single-point optimization.
- Design degradation and routing: make primary and backup models switchable, define timeout and retry policies explicitly, and avoid single-point dependency.
- Review monthly: billing rules and service capabilities change, so the benchmark must be updated on a rolling basis.
6. Conclusion
The value of a real bill of RMB 31 for 180 million tokens is not in proving that a particular model is cheap, but in demonstrating a reusable evaluation posture: explain cost with a workload profile, locate speed issues with layered investigation, and guarantee controllability with process visibility. Turn these three things into a routine ledger, and model selection shifts from “going with a gut feeling” to “backed by evidence.” If you need more complete cost aggregation and call observability, you can build your own evaluation and governance system on top of general cloud capabilities such as the monitoring, alerting, and logging services offered by Baidu AI Cloud.
