Token Usage Estimation
Summary
Before rolling out an AI-based use case, it helps to know roughly how many tokens it will consume in production. There is no dedicated estimation tool for this today — the practical approach is to simulate a representative run of the use case and read the token counts directly from the model's response.
Prerequisites
- An AI alias or API key for the model endpoint the use case will call.
- An API tool such as Postman or
curlto send a manual test request.
Estimating token usage
-
Define a standard case. Pick a realistic, representative input for the use case — for example, a typical email length for a summarization use case, or a typical number of CRM records for a classification use case.
-
Simulate the request. Send that standard case to the model endpoint, for example the ADITO-LLM chat completions endpoint, using an API tool such as Postman.
-
Read the token usage from the response. Every response includes a
usageobject with the token counts for that single execution:{"usage": {"prompt_tokens": 128,"completion_tokens": 64,"total_tokens": 192}}prompt_tokensis the input size (system prompt, context, and user input combined),completion_tokensis the generated output, andtotal_tokensis their sum. -
Multiply by expected usage. Multiply
total_tokensfrom one execution by how often the use case is expected to run — for example, per day or per month — to get a rough overall token consumption estimate.
This gives a rough estimate based on one representative case, not an exact figure. Token usage varies with input length, so repeat the simulation with a few realistic variations (short and long input) if the use case covers a wide range of inputs.
Example calculation
Using the total_tokens: 192 from the sample response above, and assuming the use case is expected to run 100 times per day:
192 tokens/execution × 100 executions/day = 19,200 tokens/day
19,200 tokens/day × 30 days = 576,000 tokens/month
That monthly figure is what you plan capacity and cost against — repeat the calculation with a shorter and a longer representative case to get a realistic range instead of a single number.
Outcome
You have a rough per-execution token count for the use case and, multiplied by expected usage, an estimate of its overall token consumption — enough to plan capacity and cost before rolling it out.
See also: Text Generation | AI Models