What is a token in AI?
A token is the unit of text, often smaller than a word, that a language model reads and writes in and that usage is billed by. Every instruction, document and question you send is split into tokens, and the model produces its answer one token at a time. The cost, speed and capacity of an AI application are therefore all measured in tokens.
Definition
A token is the unit of text, often smaller than a word, that a language model reads and writes in and that usage is billed by.
How do tokens work?
A large language model does not see text as letters or words. A component called a tokenizer first splits the text into pieces. A short, common word may be one token. A long or rare word becomes several. Punctuation and spaces count too. The model writes its answer in the same unit, choosing the next token at each step. Each model family has its own tokenizer, so the same text produces a different token count on different models.
Why do token counts matter?
For two reasons. The first is cost: providers bill input and output tokens separately, and output tokens usually cost more. The second is capacity: a model’s context window is measured in tokens. A long system instruction is counted again on every request. This is why prompt engineering affects the invoice as well as the quality.
What to watch for across languages
Most tokenizers are most efficient on English. Languages with long, inflected words need more tokens for the same content. Turkish is a clear example: one word can carry several suffixes and be split into many pieces. A cost estimate built on English samples can therefore be too low for a multilingual deployment.
Measure with your own documents and real user questions in each language you serve. For simple, high-volume tasks, a small language model can lower the cost per token considerably.
Further reading
What drives the cost of a RAG project?One-off and running cost drivers of a RAG knowledge assistant, the choices that raise or lower them, and what to prepare before a quote.
How to choose an LLM for your businessCriteria, access routes, data retention, open models and a test method for choosing a language model for business use.
Getting Turkish e-invoices into your ERP automaticallyMethods, matching steps and error checks for moving Turkish e-Fatura, e-Arşiv and PDF invoices into an ERP automatically.Related terms
- Context WindowA context window is the limit, measured in tokens, on how much text a language model can read and take into account in a single request.
- LLM (Large Language Model)An LLM (large language model) is an AI model trained on very large amounts of text that answers questions, summarises, translates and writes by predicting what text should come next.
- EmbeddingAn embedding is a fixed-length array of numbers (a vector) that represents the meaning of a word, sentence, document or image, so that similar content ends up close together.
- Prompt engineeringPrompt engineering is the practice of writing, testing and refining the instructions, examples and context given to a language model so that it produces consistent, accurate results.
- SLM (Small Language Model)An SLM (small language model) is a language model with far fewer parameters than a large language model, which makes it cheaper, faster and able to run on your own infrastructure.
Frequently asked questions
How many words is one token?
There is no fixed ratio. It depends on the language, the word and the tokenizer the model uses. Short, common words can be a single token, while long, inflected or rare words are split into several. For an exact figure, run your own text through the provider's token counter.
Is this the same as an access token or API token?
No. An API key or session token is used for authentication. A token in a language model is the unit that text is split into. The two concepts only share a word.
How can token costs be reduced?
Remove context the model does not need, summarise long chat histories and choose the smallest model that does the job. Use prompt caching for long repeated instructions if your provider supports it. A cap on output length also makes the bill more predictable.
Let’s talk about your transformation
Tell us which work repeats every week. We will tell you honestly whether it is worth automating.
How we start
- A free first callWe pin down the problem and the goal together.
- A 2-week discovery sprintWe look at the data, the process and the tools, and decide where to start.
- A written proposalScope, architecture and timeline, in writing.