← AI glossary

AI glossary · Beginner · Language models

Token

A token is the smallest unit an AI language model uses when processing text. It may be a whole word, part of a word, or a few characters.

About this term
Level
Beginner · Core ideas for first-time readers
Category
Basics
Added
2026-10-07
In plain words Just as you build a house from Lego bricks, AI breaks sentences into bricks called tokens to read them, and joins bricks back together to produce an answer. Unlike Lego, though, the size of the bricks varies by language and word.

How it works

When you give text to an AI, a tool called a 'tokenizer' first cuts it into tokens. Common words become a single token, while rare words are split into several tokens. Each token is converted into a number and fed into the model, which writes its answer by predicting the next token one at a time.

How text gets into a model'Let's understand tokens' → Tokenizer; Tokenizer → Let's | understand | token | s; Let's | understand | token | s → [1523, 87, 9041, 312]; [1523, 87, 9041, 312] → Language model; Language model → Next-token prediction'Let's understandtokens'TokenizerLet's | understand| token | s4 tokens (example)[1523, 87, 9041,312]Numeric IDs (example)Language modelNext-tokenpredictionOne token at a time
How text gets into a model The tokenizer cuts text into pieces (tokens) and converts each token into a number to feed into the model. The splitting method and numbering differ by model, so the values in the figure are examples.

Why it matters

Many AI services charge based on the number of tokens used. The amount a model can read at once (the context window) is also set in tokens. So understanding tokens helps you estimate costs and how long a document can be processed.

Things to know

The same content can require a different number of tokens depending on the language. In general, languages such as Korean are often split into more tokens than English. Each model also has its own tokenizer, so the same text yields different token counts on different models.

Same meaning, different number of pieces

English4조각
Tokenization is useful
Korean7조각
토큰화는 유용하다
This is an illustrative example. The actual splitting and number of pieces differ for each model's tokenizer.

Example

AI service price lists often show separate prices for 'input tokens' and 'output tokens'. This site's news has also included a case that introduced a new API's price on a 'per million tokens' basis; tokens are used in this way as the basic unit for measuring AI usage.

Where it came up on this site

Related terms