Token Pricing Logic and Cost Structure: A Deep Dive
This article breaks down why LLM token prices are driven by more than electricity, explaining the two cost layers behind every token: physical infrastructure (power, depreciation, bandwidth, and throughput) and ongoing R&D amortization from repeated large-scale training. It walks through a reproducible order-of-magnitude calculation from total investment to per-token price, clarifies why output tokens cost more than input tokens, and outlines engineering practices such as context governance, prefix caching, model routing, batching, output limits, observability, and autoscaling to keep token bills under control.
1. The Bottom Line First: Token Price Is Amortization, Not an Electricity Rate
The first time many developers see token-based billing, they instinctively do the math: an accelerator card draws only a few kilowatt-hours per hour, and a kilowatt-hour costs a fraction of a dollar, so why charge so much for a thousand tokens? The flaw in this reasoning is that it treats variable cost as the total cost and ignores two much larger line items: fixed assets purchased in advance that depreciate whether or not they are used, and the training and trial-and-error spending that must continue for the model to stay usable.
The cost structure of a token can be abstracted into the following illustrative expression (it only shows the relative magnitudes and does not represent any vendor’s actual billing rules):
Token price ≈ (fixed asset depreciation + power + bandwidth and networking + facilities and operations)/ effective tokens produced+ ongoing R&D investment / expected total tokens to amortize over+ channel, compliance, and gross margin
The first term is money already spent; the second is money that must keep being spent. What really makes the price look high is mainly the second term.
2. The First Cost Layer: Money Already Spent (Physical Cost)
1. Power: Calculable, but Its Share Is Often Overestimated
A single high-end accelerator card draws on the order of hundreds of watts at full-load inference, which works out to a few kilowatt-hours per hour. Roughly multiplying that across 24 hours a day and 365 days a year puts a single card’s annual consumption in the tens of thousands of kilowatt-hours; multiplied by an industrial electricity rate, the annual power bill per card is typically in the tens of thousands of RMB. That looks like a lot, but once you divide it by the total tokens the card actually produces in a year, the unit cost is quickly diluted.
The key is effective output, not theoretical peak. In real inference services, cards rarely run at 100% utilization for long, and capacity must be reserved for traffic peaks, so effective utilization is often well below peak. That idle time still costs electricity.
2. Depreciation: The Underestimated Major Item
A single high-end accelerator card costs on the order of 200,000 RMB to purchase. Depreciated linearly over three years, that is about 80,000 RMB per card per year. In other words, depreciation is usually several times the power bill. The essence of depreciation is paying in advance for future capacity: the moment the card arrives, three years of compute has already been paid for, regardless of whether you call the API today.
This explains a common puzzle: why off-peak prices are not much cheaper than peak prices. The largest block of cost does not vary with load.
3. Bandwidth, Facilities, and Operations
Beyond power and depreciation, there is high-speed interconnect networking, storage, facility space, cooling, spare parts, on-call operations, and failure replacement. Inference services are sensitive to network latency and throughput, so spending on interconnect and switching equipment cannot be ignored. Large-scale clusters also carry a certain hardware failure rate and need redundant capacity as a buffer.
4. Throughput Sets the Denominator: Why “Tokens per Second” Matters So Much
A single card’s output tokens per second depends on model size, batch size, context length, and parallelism strategy, typically landing in the range of tens to hundreds per second. Cluster throughput is roughly single-card throughput multiplied by the number of cards; at the thousand-card scale, that can produce hundreds of thousands of tokens per second and accumulate to hundreds of billions in a day.
This denominator determines whether physical cost can be diluted. Improving batching efficiency, shortening useless context, and reducing redundant computation are equivalent to directly lowering the physical cost per token, which is the core goal of inference engine optimization.
3. The Second Cost Layer: Money That Must Keep Being Spent (R&D Investment)
1. A Single Training Run Is a Large Sunk Cost
Training a frontier-scale model requires thousands of accelerator cards running continuously for months. Counting only power and depreciation, a single training run is on the order of tens of millions of dollars; adding data acquisition and cleaning, labeling, evaluation, failed reruns, and the compensation and opportunity cost of top researchers, the total investment in one training run can reach over a hundred million dollars.
The defining feature of this spending is that it is sunk: whether or not the final model succeeds or is accepted by the market, the money is already gone and can only be recovered through long-term call volume afterward.
2. The Iteration Cadence Turns One-Time Spending into Ongoing Spending
The half-life of model capability is short, and a new version is typically needed every three to six months, each requiring a full training run and full evaluation. R&D spending therefore shifts from a one-time investment to a continuous cash flow. A highly valued model company must invest on the order of several billion dollars per year in combined training and inference to stay competitive.
3. Trial and Error, and Opportunity Cost
What is truly expensive is often not the training run that succeeds but the ones that fail: reruns caused by poor data mixtures, unstable training, or alignment results that miss the target. This cost appears on no invoice, yet it must be covered by the selling price.
4. Doing the Math: From Total Investment to Per-Token Price
Here is a reproducible order-of-magnitude estimate (the numbers are illustrative and meant to build intuition):
Assume annual total investment = $4 billionAssume annual effective output = 1 trillion tokens (input and output weighted 1:8)Then recovery per token ≈ $4 billion / 1 trillion = $0.04 ≈ 0.3 RMB
0.3 RMB is the break-even line, not the selling price. In the real market, the output token price is usually several times the input price, and frontier models can charge tens of dollars per million output tokens, well above break-even. The purpose of that spread is not simply profit but financing the next training round: the call fees collected today are essentially the R&D budget for the next version of the model.
Note also that the asymmetry between input and output cost has engineering reasons: the input portion can reuse caches and be processed in parallel, while output must be generated autoregressively token by token, cannot be parallelized, and occupies memory and compute for longer.
5. Why “Expensive” Is Structural, Not a Pricing Mistake
- Cost rigidity: depreciation and facilities do not fall with load, so unit cost is actually higher off-peak.
- High demand elasticity: long sessions, multi-turn tool calls, and agents can consume hundreds of thousands or even over a million tokens per task, so usage grows far faster than with traditional requests.
- An uncertain denominator: R&D amortization depends on forecasts of future call volume, and an overly optimistic forecast forces a higher current price.
- Capability premium: a stronger model can replace more manual steps, so its price ceiling is set by the value it replaces, not by electricity.
6. Cutting Costs on the Engineering Side: Turning the Token Bill into a Controllable Variable
- Context governance: inject only the necessary fragments instead of stuffing an entire repository into the prompt; retrieve first and then summarize long documents.
- Cache reuse: use prefix caching for stable prefixes (system instructions, tool descriptions, few-shot examples) to significantly reduce repeated input overhead.
- Tiered model routing: send simple tasks to small models and escalate to large models only for complex reasoning, using rules or a classifier as a front-end decision.
- Batching and asynchrony: merge offline tasks into batches to raise effective utilization and avoid reserving idle capacity for peaks over the long term.
- Output constraints: cap maximum generation length, use structured output, and avoid meaningless repeated generation.
- Observability: connect monitoring, alerting, and logging services; track token consumption and cost by business line, API, and tenant, and set budget threshold alerts.
- Elastic scaling: autoscale on a container platform based on queue length, converting fixed cost into on-demand cost as much as possible.
Illustrative pseudocode for routing and budget control:
def route(prompt, task_type):if task_type in {"chat", "extract"}:return small_model_call(prompt, max_tokens=512)return large_model_call(prompt, max_tokens=2048)def with_budget(call_fn, tenant, limit):used = metrics.token_usage(tenant, window="1h")if used > limit * 0.9:alert(tenant, used, limit)return call_fn()
7. Conclusion
Tokens are expensive not because this second’s electricity is expensive but because each token carries two sets of books at once: fixed assets already paid for and research costs that must keep being paid. Understanding this cost chain helps developers build caching, routing, and context governance into their architecture, and helps enterprises explain where every dollar goes in budget planning and capacity design. For stronger elasticity and cost visibility, you can combine capabilities such as the general-purpose container platform, logging service, and monitoring and alerting offered by Baidu AI Cloud to build your own token cost governance system.
