Cost per token: how LLM pricing works
LLMs charge per input token and per output token. What a token is, why output costs more and how to estimate your company's monthly spend.
Cost per token is how language model providers charge for API usage: every piece of text that goes into the model and every piece that comes out is counted in tokens, and the price is set per million tokens. Input and output have different prices, and the total bill depends on how many messages the team sends, how long they are and which model answers.
Understanding this math is the first step to forecasting AI spend and comparing it with the cost of per-seat subscriptions.
What a token is
A token is the unit in which a model reads and writes text. It is not a word or a letter: it is a fragment, which can be a whole short word, part of a long word, a punctuation mark or a space.
A word often becomes more than one token, and this happens more in Portuguese than in English, because tokenizers are trained on more English text and Portuguese words tend to be longer and have more inflections. The exact ratio varies from model to model, so any conversion between words and tokens is an approximation. To estimate, the safest approach is to count a few real conversations with the provider's own token counting tool.
Input and output: why output costs more
Every call to a model has two parts, billed separately:
- Input tokens: everything the model reads. The question, the system instructions, attached documents and the conversation history.
- Output tokens: everything the model writes in its answer.
Output usually costs several times more than input. The reason is technical: the model processes the input in one go, but generates the output one token at a time, and each new token takes another pass through the model. Writing costs more than reading.
Reasoning models add a twist: before the final answer, they "think" in internal tokens, and those tokens are usually billed as output, even when the person never sees them. A short answer may have cost a lot of reasoning tokens.
Context size and caching
Models do not remember the conversation from one message to the next. With every new message, the whole history is sent again as input. This has two consequences:
- Long conversations get more expensive with every message. The tenth question carries the nine before it and their answers.
- Attached documents weigh on every message that follows. A 40-page contract pasted at the start is sent again with every question.
The limit on how much fits in one call is called the context window. Large windows let you attach a lot of content, but they do not make it cheap.
To cut the cost of repetition, many providers offer prompt caching: when the start of the input matches that of a recent call, that part is billed at a discount. Fixed instructions and reused documents benefit the most. Caching rules vary by provider.
Per-seat subscription or API usage
There are two pricing models on the market, and they answer different questions:
| Per-seat subscription | API usage | |
|---|---|---|
| How it charges | Fixed amount per person, per month | Per token consumed |
| Predictability | High | Depends on limits and budgets |
| Light users | Cost the same as heavy users | Cost little |
| Model choice | Whatever the subscription vendor offers | Any model from the providers you contract |
| Control by team | Limited | Possible, with the right tool |
A subscription is easy to forecast, but you pay for idle seats. The API charges only for what is used, but needs limits to avoid surprises. In companies where usage varies a lot from person to person, the gap between the two models can be large, in either direction.
How to estimate the monthly cost
A reasonable estimate needs five numbers:
- How many people will use it and how often.
- Messages per person per working day.
- Average input size, counting instructions, history and attachments, in tokens.
- Average answer size, in tokens.
- The input and output price of the chosen model, from the provider's current price list.
The formula is: messages per month times input tokens times input price, plus messages per month times output tokens times output price. Then add a margin for long conversations and attachments, which push the average up.
An example
The numbers below are hypothetical and only show how the math works. They are not the price of any model.
- 50 people, 20 messages each per working day, 22 working days: 22,000 messages a month.
- Average input of 3,000 tokens and average answer of 600 tokens.
- Example price: US$1 per million input tokens and US$4 per million output tokens.
Input: 22,000 × 3,000 = 66 million tokens, or US$66. Output: 22,000 × 600 = 13.2 million tokens, or US$52.80. Total: about US$119 a month, before the margin.
Notice that input weighs more than output in the total, even though it costs less per token. That is the effect of the history and attachments being sent again with every message.
Prices change often, and each provider has several models in very different price ranges. So instead of fixing numbers here, use the LLM cost calculator, which does this math per model, in Brazilian reais, from public list prices.
Frequently asked questions
How many tokens is a word?
Usually more than one, and more in Portuguese than in English. The exact ratio depends on each model's tokenizer, so any number is an approximation. For a reliable estimate, measure real text from your company.
Why does the same request cost different amounts on different models?
Because each model has its own price per token and its own tokenizer. The same text can turn into a different number of tokens, multiplied by a different price.
How do I reduce token costs?
Pick the right model for each task, start new conversations instead of stretching very long ones, avoid attaching whole documents when an excerpt will do, and use caching when the provider offers it.
Is a per-seat subscription cheaper than the API?
It depends on the usage pattern. With many people using it lightly, the API tends to be cheaper; with a few people using it heavily, a subscription may pay off. Only measuring real usage gives the answer. To model the switch, use the LLM ROI calculator.
How Kluco handles cost
In Kluco's LLM Management, the company uses its own provider keys (OpenAI, Anthropic, Gemini, DeepSeek, Grok and OpenRouter). It can set limits per person and budgets per company, team and access profile, with a warning before the cap and an optional hard stop when it is reached, and it tracks AI spend in Brazilian reais. See the details in LLM Management and pricing.