Token Costs in AI Applications: From Model Billing to Cost Governance
This article explains what a token is and why a large token quota does not show what a service can actually deliver. It shows how to estimate the cost of a single model call and of a complete AI task, using an exam-paper workflow as an example. It also covers costs that teams often overlook, ways to optimize them, and the metrics that link AI spending to business value.
In a recent consumer promotion, customers bought more than physical goods. Some purchases also included a service with an AI usage quota. A task such as organizing an exam paper, analyzing wrong answers, and generating practice questions looks simple from the user’s side: upload an image and make a request. Behind that request, however, sit several steps, including content recognition, context organization, model inference, and result generation.
When a promotion highlights a figure of trillions of tokens, a question follows: how many tasks can that quota actually complete, and how much real value can it create?
Answering that question requires more than looking at the total token count. Individual users need to distinguish membership benefits from actual usage limits. Developers and enterprises need to go further and build a complete ledger that links resource consumption to task cost, and then to business return.
1. Start with the unit: a token is not a word or an answer
A token is a discrete unit that a model uses to process text. Before text enters a model, a tokenizer usually splits it into a sequence of token IDs. When a model generates content, it produces tokens one at a time, and those tokens are then converted back into readable text.
A single token may correspond to one Chinese character, part of a word, a punctuation mark, or a combination of characters. For that reason, you cannot assume that one token equals one Chinese character, and no fixed ratio can accurately convert all text.
The actual conversion depends on several factors.
First, tokenization rules differ. The same content may produce different token counts on models that use different tokenizers.
Second, content types differ. Natural language, program code, tables, math expressions, and mixed-language text each have different token distributions.
Third, the content an application sends to the model is usually larger than the question the user sees. System instructions, conversation history, retrieved passages, tool outputs, and formatting constraints can all become part of the model input.
When estimating cost, use the measurement method that matches the target model. Treat the usage records returned by the service and the applicable billing rules as the authoritative source. Character counts can serve as a rough early estimate, but they should not be used directly for financial settlement.
Two concepts also need to be kept separate. The context window describes the range of information a single request can hold. A purchased quota describes the amount of resources allowed within a given period. The context window is not a fixed amount that every call consumes automatically, and a quota does not guarantee that a task of any size can run.
2. What you are buying: token quotas and service rights are different things
Consumer AI services are not always billed per token actually consumed. Some use subscriptions, some use request counts, and others bundle tokens, file processing, and image analysis into membership benefits.
When you see a large quota figure, confirm at least the following:
- Which features does the quota cover? Only text conversations, or also file analysis and image processing?
- Do input and output share the same quota, and are they counted differently?
- Are there expiration dates, daily limits, request rate limits, or per-file size limits?
- Do unused quotas roll over? After the quota runs out, does the service stop or charge extra?
- Is the advertised quota the amount of actual API calls, or a total of benefits converted using a specific method?
These questions determine the gap between nominal resources and usable resources. If measurement boundaries and coverage differ, two plans that advertise the same total token count cannot be compared on value.
For ordinary users, a more useful comparison is this: at the same quality standard, how many complete tasks can a service handle, and how much manual revision do those tasks require?
3. Calculating the technical cost: from input and output to the full call chain
For text model services billed by actual usage, you can start with this basic estimate:
Cost per model call = input tokens ÷ billing unit × input price + output tokens ÷ billing unit × output price
If a service prices cached input separately for eligible requests, track regular input and cached input separately to avoid double counting. Whether caching discounts apply, how a cache hit is determined, and which billing basis is used must all follow the specific service’s rules.
To illustrate the calculation, assume a service costs 2 yuan per million input tokens and 8 yuan per million output tokens. One call uses 12,000 input tokens and produces 3,000 output tokens. The model call cost is:
12,000 ÷ 1,000,000 × 2 + 3,000 ÷ 1,000,000 × 8 = 0.048 yuan
These prices are for illustration only. They do not represent the price of any actual service.
This result covers only one model call. It is not the cost of a complete business task. If a task first recognizes a file, then extracts information, generates content, and finally checks the result, it may involve several model calls and other resource consumption.
Therefore, calculate total task cost across the full chain:
Total task cost = sum of all model call costs + file and multimodal processing costs + retrieval and storage costs + compute and network costs + manual review costs
For batch workloads, include retries and tasks that ultimately fail acceptance checks in your statistics. Counting only the successful, single returned call often underestimates actual spending.
4. Using exam-paper review as an example: why the same request can produce different bills
Suppose a user asks, “Pull out the wrong answers from this exam paper, then generate targeted practice questions.” This request contains several subtasks of different types.
Step one is reading the paper. The system must handle camera angle, text clarity, handwritten answers, question layout, and math symbols. If the recognition result is ambiguous, the system should ask the user to confirm instead of treating uncertain content as fact.
Step two is structuring the questions. The system must separate question stems, options, student answers, grading marks, and reference answers. If this information is mixed together, later analysis may treat annotations as question content or treat student answers as correct answers.
Step three is identifying and categorizing errors. The system must determine whether each error comes from a calculation slip, a conceptual confusion, or a missed condition. If reliable answers are missing or the question conditions are incomplete, the system should not present an overly confident diagnosis.
Step four is generating practice questions. The practice questions must cover the relevant knowledge points, match an appropriate difficulty level, provide correct answers, and keep explanations consistent with the questions.
Step five is validation and presentation. The system must check question-number mapping, answer consistency, duplicate questions, and output format, and make partial corrections where needed.
If the full paper image, all previous conversation, and every intermediate result are sent to the model repeatedly, input consumption keeps accumulating. By contrast, organizing questions into struct
