Token Pricing Explained: Where the Cost Comes From and How to Reduce It
This article breaks down why LLM tokens are priced far above storage or bandwidth, separating the physical floor set by hardware and electricity from the ongoing R&D costs that dominate the price. It also explains why output tokens cost several times more than input tokens, and walks through six practical levers for cutting usage, plus a unit-economics method for capacity and budget planning.
1. The Key Point First: Token Price Is Not an Electricity Rate, but an Amortized R&D Rate
The first time many developers see a token price, their reaction is the same: a single request is only a few hundred to a few thousand tokens, so why does it cost orders of magnitude more than storing or transferring the same amount of data? The answer is not complicated. What you are buying is not “one computation” but the right to use a capability that has been trained over and over. Hardware only sets the floor for the price; what actually pushes it up is continuous investment in model R&D.
It is clearest to split the cost into two parts. One is money already spent (sunk cost), including multiple rounds of pretraining, alignment, evaluation, and failed experiments. The other is money that must keep being spent (ongoing cost), including electricity for inference clusters, depreciation, data centers, bandwidth, operations, and a full retraining every few months to stay competitive. The selling price of a token has to recover both parts, or the business is not sustainable.
2. Part One: The Physical Floor Set by Hardware and Electricity
Start with the easiest part to verify. Take a high-end accelerator card as an example. Under full load its power draw is roughly several hundred watts to 700 watts, which works out to about 2 to 4 kWh per hour. At 3 kWh, 0.8 yuan per kWh, running 24 hours a day all year, one card costs about 16,000 yuan a year in electricity. If the purchase cost is 250,000 yuan, depreciated linearly over three years, that is about 83,000 yuan per year. Together, one card costs about 100,000 yuan a year to hold.
Estimate a mid-sized inference cluster at 1,000 cards, and the annual holding cost is on the order of 100 million yuan, and that still excludes data center space, network bandwidth, load balancing, logging and monitoring systems, storage for model weights and vector indexes, and on-call operations staff. The key characteristic is that this money has nothing to do with utilization. Once the cards are bought, electricity and depreciation are paid whether or not requests fill them. So from a financial perspective, idle compute is not “saving money” but “wasting a cost that has already been incurred.”
Now look at the output side. A single card typically generates 100 to 300 tokens per second, depending on model size, context length, batching strategy, and decoding method. Take the midpoint of 200: 1,000 cards produce about 200,000 tokens per second, or about 170 billion tokens a day. That sounds close to “unlimited supply,” but demand grows faster. A large search or recommendation business already handles tens of billions of requests a day, and an agent application can consume hundreds of thousands to millions of tokens in a single long session. Stack up a large number of agent users and the supply is quickly eaten up. This is the physical basis for tokens having real scarcity.
3. Part Two: The Ongoing R&D Cost That Really Drives the Price
A single full training run for a frontier model costs conservatively in the hundreds of millions of dollars. A typical setup is 25,000 previous-generation accelerator cards running continuously for three months, which alone is tens of millions of dollars in electricity and depreciation, on top of salaries for top researchers, data acquisition and cleaning, building evaluation systems, and the opportunity cost of many unsuccessful experiments. More important is the cadence: model capability iterates roughly every 3 to 6 months, and each iteration is close to a full training from scratch, not a patch on the old version.
This creates a hard cash flow. A model team at the competitive frontier often spends on the order of several billion dollars a year on just two things: training and inference. That money can only be recovered through the token price. A rough calculation: assume annual spending of 4 billion dollars against actual output of 1 trillion tokens (output is priced significantly higher than input, weighting input at 8x), and the average recovery needed is about 0.04 dollars per token, or roughly 0.3 yuan. Yet market output prices are generally tens of dollars per million tokens, far above this average. Profit margin does exist, but it is essentially “financing for the next model version”—the token fees collected today are paying for the next training run.
4. Why Output Costs Several Times More Than Input
Understanding this can immediately improve your bill. The input stage (prefill) can be highly parallel, spreading an entire prompt across matrix operations in one pass with high compute utilization. The output stage (decode) is token-by-token autoregression, where every step must read the massive weights and the growing key-value cache from memory again, so the bottleneck shifts from compute to memory bandwidth and the marginal cost per token is naturally higher. This is the root cause of output being priced at several times input, not simply a pricing strategy.
# Illustration: how a single call is billedprompt_tokens = count_tokens(system_prompt + history + user_input)completion_tokens = count_tokens(model_output)# The output weight is usually 3~5x the input or highercost = prompt_tokens * price_in + completion_tokens * price_in * output_factor
5. Six Levers for Cost Optimization
- Context governance. Conversation history, retrieved snippets, and tool return values all push input tokens up linearly. Use rolling summaries, reranking and truncation of relevant snippets, and switch from “stuff everything in” to “inject on demand.”
- Cache reuse. Use prompt caching for stable system prompts and long document prefixes to significantly reduce repeated billing; add a semantic cache layer for high-frequency identical requests, so a hit skips inference entirely.
- Batching and asynchrony. Route offline extraction, batch labeling, and log summarization through batch channels, trading throughput for unit price.
- Model tier routing. Give simple tasks like intent recognition and format conversion to small models, and escalate to large models only for complex reasoning, which usually cuts most of the cost.
def route(task):return small_model if task.difficulty <= 1 else large_model
- Output length constraints. Constrain generation with explicit formats and word limits to avoid token bloat from the model improvising.
- Observability first. Tag and report usage by business line, scenario, and user, and configure budget alerts plus rate limiting and circuit breaking, turning cost from “check the bill at month end” into “attributable in real time.”
6. A Capacity and Budget Method for Architects
Start with a unit-economics estimate: estimate the average input and output tokens per session, multiply by daily active users and frequency to get daily consumption, then convert to a monthly cost against the price list, and finally reserve a 30% to 50% buffer for long sessions and agent chains. On the engineering side, combine multi-level caching, asynchronous queues, streaming responses, and fallback strategies to both smooth peaks and keep core paths available when the budget is hit. A common approach at Baidu AI Cloud for these scenarios is to combine model services, container platforms, object storage, message queues, and monitoring alerts into a usage governance system that is measurable, capped, and observable.
7. Summary
Tokens are expensive not because of the electricity your one request consumes, but because of the training and iteration that must keep being reinvested behind it. Physical cost sets the price floor, and R&D amortization makes up the main body of the price. For users, the controllable part is never the unit price but the structure of token usage: thin out the context, keep repeated requests behind a cache, route simple tasks to small models, and turn usage into observable metrics, and the bill returns to a predictable track.
