Token Pricing Explained: The Underlying Logic and a Breakdown of the Real Costs

    This article breaks down why token pricing is about much more than electricity, separating sunk hardware costs from the ongoing R&D expenses that fund future models. You will learn how utilization drives physical cost per token, why input and output tokens are priced differently, and a practical checklist for controlling token spend in production.

    Token Pricing Explained: The Underlying Logic and a Breakdown of the Real Costs

    1. Why “Why Are Tokens So Expensive?” Is the Wrong Question

    Most discussions about token prices stop at “how much electricity did a single request consume.” That intuition is not wrong, but it only covers the smallest part of the cost structure. To truly understand token pricing, you need to split the cost into two categories with fundamentally different natures:

    • Money already spent (sunk cost): the purchase of compute clusters, the construction of data centers, the storage of model weights, and most critically, all the R&D resources invested in training the model in the first place.
    • Money that must keep being spent (variable cost + reinvestment): electricity, bandwidth, operations, and the periodic training expenses that must be paid again and again to stay competitive.

    The core reason the unit price of a token looks “expensive” is this: the revenue from selling tokens must not only cover this second of electricity, but also finance the next version of the model. The price has an “installment payment for future R&D” built into it.

    Below, these two categories of cost are quantified separately.

    2. The First Cost Bucket: The “Physical Bill” of Hardware and Electricity

    2.1 Estimating the Annual Cost of Holding a Single Card

    Using a current mainstream training/inference accelerator as a reference, here is an illustrative estimate (the figures are order-of-magnitude estimates from public industry sources, not the specifications of any specific product):

    Cost item Assumption Annual amount
    Electricity ~3 kWh/hour at full load × 0.8 CNY/kWh × 24h × 365 days ≈ 16,000 CNY
    Depreciation ~250,000 CNY per card, straight-line over 3 years ≈ 83,000 CNY
    Total — ≈ 100,000 CNY/card/year

    Here is a key point that is easy to overlook: depreciation and electricity are “rigid expenses.” Once a card is racked, whether utilization is 5% or 95%, the annual electricity and depreciation are paid all the same. This means utilization directly determines the physical cost per token.

    2.2 Cluster Scale and Theoretical Capacity

    Assume a mid-sized inference cluster of 1,000 cards:

    • Annual holding cost ≈ 1,000 × 100,000 = 100 million CNY (not yet including the data center, network bandwidth, operations staff, weight storage, and disaster-recovery redundancy).
    • At a median single-card throughput of 200 tokens/s, the theoretical cluster peak ≈ 200,000 tokens/s, and the theoretical daily capacity ≈ 170 billion tokens.

    The theoretical capacity looks extremely ample, but demand growth on the real business side is equally staggering: a large platform’s daily request volume can reach the tens of billions; and a single long agentic (Agent) session can consume anywhere from hundreds of thousands to millions of tokens. Stack up massive numbers of Agent users, and supply gets eaten up quickly.

    2.3 From Capacity to Unit Price: Utilization Is the Lever

    The relationship above is expressed clearly with illustrative code, making capacity planning easier:

    1. def marginal_cost_per_mtok(
    2. cards: int,
    3. cost_per_card_year: float, # CNY/card/year
    4. tokens_per_card_sec: float, # tokens/s
    5. utilization: float, # 0~1 actual utilization
    6. ) -> float:
    7. annual_cost = cards * cost_per_card_year
    8. effective_tokens = (
    9. cards * tokens_per_card_sec * 3600 * 24 * 365 * utilization
    10. )
    11. return annual_cost / (effective_tokens / 1e6) # CNY per million tokens

    Dropping utilization from 0.95 to 0.3 roughly triples the unit physical cost. This is why every inference service does continuous batching, KV Cache reuse, prefix caching, quantization, and speculative decoding—these are not “performance optimizations,” they are direct cost engineering.

    3. The Second Cost Bucket: The “Ongoing R&D Bill” That Really Pushes Prices Up

    3.1 The Sunk Cost of a Single Frontier Training Run

    Training a frontier-capability-level model costs conservatively on the order of hundreds of millions of USD to start. Its composition includes:

    • Electricity and depreciation of a large-scale cluster: tens of thousands of accelerators running continuously for weeks to months, which alone is in the tens of millions of dollars;
    • The salaries and team size of top-tier researchers;
    • The trial-and-error cost of a large number of failed experiments;
    • Data acquisition, cleaning, labeling, and compliance review;
    • Opportunity cost: the revenue this compute could have generated if used for inference.

    These investments share one common trait: they have no direct causal relationship with “you calling the API once,” but they must be recovered from API revenue.

    3.2 The Iteration Cadence Turns a One-Time Expense into a Perpetual One

    The capability update cycle for frontier models is typically compressed to once every few months, and each capability leap usually means a full pretraining run plus multiple rounds of post-training (supervised fine-tuning, preference alignment, evaluation regression). So the cost structure undergoes a qualitative change:

    Training is no longer a “project expense,” but an “operating expense.”

    A top-tier model R&D organization may spend on the order of billions of dollars per year on training and inference combined. This money must be recovered through the token price—the token fees collected today are essentially financing the next version of the model.

    3.3 A Recyclable Recovery Model

    Suppose a model service provider invests 4 billion CNY per year, corresponding to an actual output of 1 trillion tokens. Since the compute for output tokens is significantly higher than for input (generation is autoregressive token by token and cannot be fully parallelized), converting at an input weight of 8x:

    1. Equivalent token volume = 1e12 / 8 = 1.25e11
    2. Per-token recovery needed = 40e8 / 1.25e11 ≈ 0.32 CNY ≈ 0.04 USD
    3. i.e. ≈ 320 CNY / million tokens (cost line)

    Meanwhile, the output pricing of frontier models in the market is generally in the range of tens of dollars per million tokens, significantly above the cost line above. The difference is not pure excess profit; it needs to cover: the capital expenditure of the next training round, evaluation and safety-alignment investment, redundant capacity on the inference side, and sales and service costs on the business side.

    4. Why Input and Output Tokens Are Priced Differently

    This is the second key to understanding your bill, and it is often misunderstood as “vendors pricing arbitrarily.” The real reason is an asymmetry in computational complexity:

    • Input phase (Prefill): all input tokens can be encoded in parallel, compute-intensive but highly parallel, and the prefix can be cached and reused.
    • Output phase (Decode): generated serially token by token, where each step must read all model weights and the ever-growing KV Cache, constrained by memory bandwidth, with low parallelism.

    So the unit cost on the output side is naturally higher, and techniques like cache hits, batch aggregation, and long-context compression also mainly reduce cost in these two places.

    5. A Cost-Control Checklist for Developers

    1. Compress the input: trim system prompts, deduplicate retrieved snippets, and use structured summaries instead of piling up raw text.
    2. Use caching well: place stable instructions and documents in a reusable prefix position to improve cache hit rates.
    3. Control context length: the attention cost of long context rises non-linearly with length, so on-demand truncation and tiered retrieval are more economical.
    4. Route by model tier: send simple tasks to small models, and escalate to large models only for complex reasoning.
    5. Stream output and stop early: reduce duplicate billing from ineffective generation and timeout retries.
    6. Observability first: with general-purpose logging services, monitoring and alerting, and cost dashboards on the cloud, attribute token consumption by business dimension to locate the real sources of waste.

    In related practices at Baidu AI Cloud, the above capabilities are typically offered as general product categories—for example, a container platform to host elastic inference, object storage to hold datasets and weights, a message queue to smooth out request spikes, and a logging and monitoring system for usage attribution—turning “invisible cost” into “optimizable cost.”

    6. Conclusion

    The price of a token is made up of two layers: the underlying electricity and depreciation set the physical cost floor, while the ongoing training and alignment investment determines the market price. The former is compressed by improving utilization and inference efficiency; the latter is amortized by iteration cadence and commercial scale. Understanding this makes it clear why tokens will not stay cheap “close to the electricity cost” in the long run, and why every percentage point of utilization improvement on the engineering side is truly reflected on the bill.