What is a token in AI?
A token is a piece of text that a language model treats as one unit. Models do not read letters or whole sentences. Text is first cut into tokens, and each token is mapped to a number. A short common word is usually one token. A long or rare word is split into several. Punctuation and spaces count too.
This sense of the word has nothing to do with crypto tokens or with the access tokens used to log in to software.
How many words is a token?
There is no fixed ratio, because each model family has its own tokenizer. As a rule of thumb for English, OpenAI's guidance for its models is that one token is roughly four characters, or about three-quarters of a word, so 100 tokens is about 75 words. Other languages, code and unusual names often use more tokens per word.
For anything that matters, count instead of estimating. Model providers publish token counters for their own models.
Why do tokens matter?
| What | How tokens are involved |
|---|---|
| Cost | API pricing is per token, usually with separate rates for input and output |
| Context window | The most a model can consider at once is a token limit |
| Output length | A cap on output tokens decides how long an answer can be |
| Speed | Output is generated token by token, so longer answers take longer |
| Rate limits | Usage caps are often set in tokens per minute |
Input tokens vs output tokens
Input tokens are everything sent to the model: the instructions, the conversation so far, any documents and tool results. Output tokens are what it writes back. Output usually costs more per token than input. In a long chat the whole conversation is sent again on every turn, so input tokens grow even when each new message is short.
How do you reduce token use?
- Send only the passages the model needs, not whole documents.
- Ask for the format and length you want, so the answer is not padded.
- Start a new conversation when the topic changes.
- Use a smaller model for simple, high-volume steps.
- Use prompt caching where the provider offers it, for instructions repeated on every request.