Token Pricing Explained: Cost Structure, Training Amortization, and Optimization
Token prices are often mistaken for the electricity cost of a single inference run. This article breaks down the four cost layers behind token pricing: inference physical cost, training sunk cost, continuous R&D and trial cost, and operational cost for capacity redundancy and service assurance. It explains why input and output tokens are priced differently, how depreciation, electricity, throughput, and training amortization affect unit costs, why average cost and risk premium matter, and how developers can optimize token spending through output control, context governance, model routing, batching, caching, and cost observability.
1. Token Prices Are Not “the Electricity Bill for This Second”
When discussing token pricing, the most common mistake is to equate the electricity cost of a single inference run with the token cost. In reality, token prices are built from at least four cost layers: the physical cost on the inference side, the sunk cost on the training side, the cost of continuous R&D and trial and error, and the operational cost paid for capacity redundancy and service assurance. Electricity is only the most visible layer, and it is usually not the largest share.
A token is an abstract unit of model compute consumption. The number of tokens consumed by a request depends on model parameter count, context length, batching strategy, input/output structure, cache hit rate, and concurrency level. Input tokens can be prefilled in parallel, while output tokens usually require autoregressive generation token by token and are more sensitive to memory bandwidth, scheduling, and latency. This is why market prices for input and output tokens often differ by several times. Understanding this point is necessary to understand why “the same one million tokens” do not have the same cost on the input side and the output side.
2. Inference Physical Cost: Electricity, Depreciation, Bandwidth, and Operations
Start with an order-of-magnitude estimate. Assume that a high-end accelerator card plus its supporting host machine consumes 2.5 kWh per hour, electricity is priced at RMB 0.8 per kWh, and the purchase cost per card is RMB 250,000 with linear depreciation over 3 years. A general estimate can be written as follows:
def annual_holding_cost(cards, unit_price, years, kwh_per_hour, price_per_kwh):depreciation = cards * unit_price / yearselectricity = cards * kwh_per_hour * 24 * 365 * price_per_kwhreturn depreciation, electricitycards = 1000unit_price = 250000years = 3kwh_per_hour = 2.5price_per_kwh = 0.8dep, elec = annual_holding_cost(cards, unit_price, years, kwh_per_hour, price_per_kwh)print(dep, elec, dep + elec)
Under these assumptions, the annual depreciation for 1,000 cards is about RMB 83.33 million, and electricity is about RMB 17.52 million, for a total of about RMB 100 million. This figure does not yet include data center space, bandwidth, storage, operations, disaster recovery, idle capacity, or security and compliance. In other words, once an inference cluster is built, depreciation and basic electricity costs continue regardless of whether request volume is fully utilizing the cluster. This is money that has already been spent and must be recovered through long-term token revenue.
Now consider throughput. Assume a single card outputs 100 to 300 tokens per second. Then 1,000 cards correspond to 100,000 to 300,000 tokens per second. Using a midpoint of 200,000 tokens per second, that is about 17.3 billion tokens per day and about 6.3 trillion tokens per year. If the roughly RMB 100 million annual holding cost is allocated across that volume, the physical cost per million tokens is on the order of RMB 10-plus. This order of magnitude shows that, looking only at electricity and depreciation, tokens are not inherently extremely expensive. What really raises prices is training, R&D, redundant capacity, and long-tail service cost.
3. Training Sunk Cost: One Training Run, Long Amortization
A single training run for a frontier large model requires tens of thousands of accelerators running continuously for months. After electricity, depreciation, network interconnection, data governance, and failed retries are added together, a single training run can cost tens of millions to hundreds of millions of dollars. More importantly, this kind of investment has a strong sunk-cost nature: before training is complete, the result cannot be confirmed, and if training fails or the result falls short of expectations, the investment is difficult to recover directly. Compensation for top researchers, data cleaning and labeling, evaluation systems, safety alignment, trial experiments, and opportunity cost all belong to training-side costs.
Model capability iteration also creates “money that continues to be spent.” Models usually need to be updated quarterly or semiannually, and each update may trigger full training, evaluation, deployment, and canary validation. A leading model team can invest several billion U.S. dollars per year in training, inference, data, and R&D. If annual investment is USD 4 billion and annual billable-equivalent tokens are on the order of 100 trillion, then average amortization is about USD 40 per million tokens. If annual output is only on the order of 1 trillion tokens, amortization rises to thousands of U.S. dollars per million tokens. This shows that token pricing depends heavily on economies of scale: the greater the throughput and the more fully capacity is reused, the lower the unit amortization. When scale is insufficient, unit costs become very expensive.
4. Why It Is Expensive: Average Cost, Risk Premium, and Future R&D Financing
The marginal cost of a token is mainly electricity, depreciation, and bandwidth, but the selling price cannot be set only on marginal cost. Enterprises need token revenue to cover average cost, including training sunk cost, continuous R&D, idle capacity, peak and off-peak fluctuations, service-level assurance, monitoring and alerting, log auditing, and security compliance. The output-side price of some frontier models reaches tens of dollars per million tokens, which in essence covers “R&D financing for the next version of the model.” Token fees collected today do not only serve current inference requests; they also fund subsequent training, evaluation, and infrastructure upgrades.
In addition, long sessions and agent applications significantly amplify usage. A single agent task may consume hundreds of thousands to millions of tokens. After many users are aggregated, token demand can quickly approach the resource scale corresponding to tens of billions of requests on a large internet platform. Demand fluctuation also requires platforms to retain redundant capacity, and redundant capacity still incurs depreciation and electricity costs during off-peak periods. These factors together form a risk premium.
5. How Developers Can Optimize Token Costs
First, distinguish input and output costs. Output-side token-by-token generation is more expensive, so unnecessary long outputs should be reduced through structured returns, truncation strategies, and streaming output. Second, govern context properly. Limit the length of historical messages, use summaries, retrieval augmentation, and prefix caching, and reduce repeated context consumption. Third, route models. Assign simple tasks to smaller models and escalate complex tasks to larger models, avoiding “using the largest model for all requests.” Fourth, use batching and capacity pooling. Improving batching efficiency can improve throughput, but latency must be balanced. Fifth, quantization, distillation, and caching are general optimization methods, but quality must be confirmed through evaluation. Sixth, establish cost observability: collect statistics by request, user, model, and input/output tokens, and set budgets and alerts.
On cloud platforms such as Baidu AI Cloud, general-purpose object storage, logging services, monitoring and alerting, and container platforms can support model weight storage, capacity observability, and elastic scheduling. Whether deployed in a self-built data center or in the cloud, the logic of cost governance is the same: first measure physical cost, training amortization, and redundant capacity separately, and then optimize caching, routing, batching, and capacity planning item by item.
6. Conclusion
Tokens are expensive not because “the electricity bill for this second” is high, but because the price must cover inference physical cost, training sunk cost, continuous R&D investment, capacity redundancy, and service assurance. Electricity and depreciation form the cost base; training and R&D determine long-term average cost; risk premium and future R&D financing determine the room for pricing. For developers, understanding this cost structure enables more reasonable model selection, context design, caching strategy, and capacity planning. For enterprises, token cost governance is not simply about cutting prices; it is about putting compute, storage, scheduling, and R&D amortization on the same ledger and optimizing them continuously.
