Tokens are the unit these systems process, bill and limit in. A token is a fragment of text, usually part of a word, and both your input and the response are counted.
What does a token correspond to?
Roughly three quarters of a word in ordinary English, meaning a hundred words is around a hundred and thirty tokens. Common words are a single token and unusual ones split into several.
Why is the unit not words?
Because models work on subword fragments, which handles unfamiliar words, names and other languages without needing every possible word in a vocabulary.
What counts?
- Your system prompt. Every call.
- The whole conversation history. Every call.
- Attached content. Documents and images.
- The response. Billed separately, usually higher.
Why are input and output priced differently?
Because generating is more expensive than reading. Output typically costs several times input, which means an application producing long responses costs more than one processing long documents.
What uses more tokens than expected?
Code, structured data and languages other than English. Punctuation-heavy text fragments into more tokens, and some languages use several times as many tokens per word as English does.
Does token count predict latency?
Roughly, and output matters far more than input. Reading a long document is fast; generating a long response is slow, because each token is produced in sequence.
That means an application feeling sluggish is usually generating too much rather than sending too much. Asking for shorter output improves both cost and speed, which is unusual in that the two normally trade against each other.
How do you count them accurately?
With the provider's own tool or library, since tokenisation differs between model families. The response also reports actual usage, which is the authoritative number.
What about the response you never see?
Worth remembering that you pay for generation even when the result is discarded. A request abandoned because the user navigated away, or output thrown out by a failed parse, has still been generated and billed.
That makes retry loops and speculative calls more expensive than they appear. Counting what you actually use against what you actually generate occasionally reveals a surprising gap.
What is the practical estimate?
Divide words by four and add a quarter for safety. That is close enough for budgeting and you should measure properly before committing to anything at scale.
How does this relate to context limits?
The limit covers everything together: system prompt, history, attachments and the space for a response. Long conversations approach it gradually, which is why they eventually fail.
What about other languages?
Worth measuring rather than assuming. Some languages use several times as many tokens per word as English, which means the same document costs substantially more to process depending on what it is written in.
That matters for anything multilingual. A cost estimate built on English samples can understate the real figure considerably, and the difference shows up as a bill rather than as any visible change in behaviour.
What about counting before sending?
Worth doing where requests vary in size. Counting tokens locally before a call lets you truncate, split or reject something too large rather than discovering it through a failed request.
It also makes cost predictable per request rather than per month. An application that knows what each call will cost before making it can make sensible decisions about which model to use and whether to proceed at all.
What about images?
Counted in tokens based on dimensions, and frequently more than people expect. A high-resolution image can cost more than several pages of text, which matters for anything processing them in volume.
Why does this matter at all?
Because tokens are simultaneously the bill, the limit and the latency. Understanding the unit is what makes all three predictable rather than surprising.