How Token Factories Make Money: The Business Logic of the LLM Inference Layer
This article explains how large language model inference services generate revenue, how utilization and optimization determine per-token costs, and how providers compete on reliability, model coverage, and enterprise capabilities. It also compares self-hosted inference with managed services and outlines practical considerations for controlling cost and operational risk.
1. From Compute Rental to Token Factories
Large language model inference is the process of using a trained model to handle real-world requests. Each time a user submits text, the system tokenizes the input, performs forward computation, generates the output one token at a time, and returns the result. The smallest processing units into which text is divided are called tokens. Because tokens provide a measurable unit of output, inference services are often compared to factories.
Traditional cloud computing rents virtual machines by the hour, with billing based on how long resources are occupied. Inference services deliver the result of each individual request, and billing is typically based on the number of input and output tokens. Electricity, data center space, and GPU hardware are the raw materials; model computation is the production process; and the resulting token sequence is the finished product. Understanding this chain is the starting point for understanding the business model.
2. Revenue Structure: Pricing by Token
Common pricing models include the following:
- Separate input and output pricing. Most services charge more for output tokens because generated content must be computed sequentially, consuming more time and resources.
- Model-tier pricing. Larger and more capable models generally have higher prices.
- Reserved capacity or subscription pricing. These plans are designed to guarantee throughput and response latency and are suitable for customers with stable workloads.
- Discounts for batch and offline workloads. Providers can schedule these tasks during off-peak periods, improving overall resource utilization.
Revenue can be represented as:
Revenue = Input tokens × Input price + Output tokens × Output price
Providers set their own prices, and there is no universal industry standard. The price of the same model can vary significantly across channels. As a result, pricing power often comes from cost control and service differentiation rather than from the model itself.
3. Cost Structure: Per-Token Cost Determines Profit
Profit depends on the cost of producing each token. A rough estimate can be calculated as follows:
Unit cost = Total hourly cost ÷ Effective output tokens per hour
Total hourly cost includes hardware depreciation or rental, electricity and cooling, data center and networking expenses, operations staff, and software and scheduling overhead. Effective output tokens per hour are affected by model size, hardware type, batching strategy, context length, and actual workload.
The following example illustrates the calculation method. All figures are hypothetical and do not represent any real product.
def cost_per_million_tokens(hourly_cost, tokens_per_second, utilization):"""Calculate the cost per million output tokens (hypothetical example)."""effective_tps = tokens_per_second * utilizationtokens_per_hour = effective_tps * 3600return hourly_cost / tokens_per_hour * 1_000_000# Assumptions: hourly cost per GPU is 2.0 yuan, peak throughput is 1,500 tokens/sfor u in [0.3, 0.6, 0.9]:cost = cost_per_million_tokens(2.0, 1500, u)print(f"Utilization {u:.0%}: approximately {cost:.2f} yuan per million tokens")
Under these assumptions, increasing utilization from 30% to 90% reduces unit cost by approximately two-thirds. This shows why inference-service profitability depends heavily on keeping resources continuously occupied. An idle GPU is one of the largest sources of wasted cost, and improving utilization is often more effective than simply negotiating a lower hardware purchase price.
4. Key Variables Affecting Gross Margin
Five factors have a major impact on gross margin.
- Utilization and batching. Combining multiple requests in a single computation can increase effective hardware throughput. Scheduling techniques such as continuous batching can reduce waiting when request lengths differ, allowing GPUs to spend less time idle.
- Memory and KV-cache management. Longer contexts consume more memory for the KV cache, reducing the number of concurrent requests a GPU can handle. Efficient cache allocation and reclamation directly affect concurrency.
- Model optimization. Quantization, distillation, speculative decoding, and similar techniques can reduce unit cost while keeping quality degradation within an acceptable range. Every optimization should be followed by quality regression testing to ensure that output quality has not declined.
- Request characteristics. The ratio of input to output tokens, long-tail requests, and traffic spikes all change resource consumption patterns. Rate limiting, tiered queues, and elastic scaling can help smooth these fluctuations.
- Availability and service levels. Guaranteeing low latency and high availability requires spare capacity, which increases unit cost. Providers must find a balance between reliability and price.
5. Major Forms of Inference Supply
Inference services generally take several forms:
- Self-hosted inference. An organization deploys open-source or commercial models in its own or a colocation facility. Data remains under the organization’s control, and unit costs can be lower for high-volume, stable workloads. However, the organization assumes all risks related to operations, capacity planning, and scaling.
- Managed inference in the public cloud. Cloud providers offer model APIs with usage-based or reserved-capacity pricing. This approach provides elasticity and fast integration, while prices are determined by the provider’s billing rules. Major cloud providers in different markets, including Baidu AI Cloud, offer this type of capability.
- Model aggregation and routing platforms. These platforms provide a unified interface to multiple models and route requests according to price, latency, and quality. Their value lies in reducing switching costs and providing backup channels, although the intermediary layer may add markup or latency.
- Distributed compute networks. These networks aggregate dispersed GPU resources and charge by task. They may reduce costs in theory, but they must address node reliability, result verification, data privacy, and latency variation. They are better suited to batch workloads that are not latency-sensitive.
- Edge and on-device inference. Smaller models run directly on devices, reducing network round trips and data uploads. This approach is suitable for privacy-sensitive or offline scenarios but is constrained by device compute and memory capacity.
6. Competitive Landscape: From Price Competition to Capability Competition
Token-based measurement is relatively standardized, and services with similar capabilities can be easily substituted. Price therefore becomes the most direct comparison point. As hardware improves and inference optimization becomes more widely adopted, unit costs continue to fall, making it difficult for providers to build a lasting advantage based solely on price.
Competition is increasingly shifting toward the following dimensions:
- Reliability and service levels, including availability commitments, latency percentiles, and recovery speed.
- Geographic coverage and data residency, which address regional compliance and access-speed requirements.
- Model coverage and update speed, including the ability to add new models quickly while maintaining stable versions.
- Observability, such as detailed usage records, logs, monitoring alerts, and cost-analysis tools.
- Enterprise capabilities, including access control, audit records, and private deployment options.
Inference providers also sit between model owners and end users. Their margins are squeezed from both sides by upstream model licensing costs and downstream price pressure. Establishing a stable cost structure between these two sides is critical for long-term operations.
7. How Enterprises Should Choose Between Self-Hosting and Procurement
The decision should begin with workload volume and stability. The following table summarizes common considerations.
| Decision factor | Favors self-hosting | Favors procurement |
|---|---|---|
| Request volume | Consistently high and predictable | Volatile or still uncertain |
| Data requirements | Sensitive data must remain inside the organization | Cloud-based processing is acceptable |
| Team capabilities | The organization has GPU operations and inference-optimization expertise | The team is primarily focused on application development |
| Model requirements | Deep fine-tuning or customization is required | A general-purpose model is sufficient |
| Latency requirements | The network path must be tightly controlled | Public internet or dedicated-network latency is acceptable |
For a concrete comparison, estimate the monthly total cost of both options. Self-hosting costs include hardware, electricity, facilities, staffing, and idle capacity. Procurement costs include usage fees, reserved-capacity charges, and migration or integration expenses. Comparing both options against the same expected workload can reveal an approximate break-even point.
Idle capacity is often underestimated in self-hosting calculations, while procurement costs can grow rapidly as usage increases. Both options therefore require sensitivity analysis.
8. Practical Considerations for Deployment
The following points deserve attention during implementation:
- Establish token-level usage monitoring and break down metrics by model, business unit, and input/output type to identify abnormal costs.
- Evaluate model quality using business metrics rather than comparing prices alone. Rework and user churn caused by lower quality can cost far more than a difference in per-token pricing.
- Review prices regularly. Inference prices can decline quickly, so assess potential future price reductions before signing long-term commitment contracts.
- Read service terms carefully, especially provisions concerning whether data may be used for model training, data-retention periods, and cross-border transfers.
- Design fallback strategies and maintain backups across multiple providers to avoid excessive dependence on a single service.
Understanding the economics of a token factory means comparing the cost of each token with the value it creates in the same ledger. Utilization, model efficiency, and service differentiation together determine the result.
