AI Glossary

Token (AI)

A token is the basic unit of text an AI language model reads and writes — usually a word, part of a word or a punctuation mark — and it determines model limits, speed and cost.

Definition

In artificial intelligence, a token is the smallest unit of text that a language model processes. Before a model can read your prompt, a component called a tokenizer splits the text into tokens and converts each one into a number. The model works entirely with these numbers, and when it writes a response it generates one token at a time, which the tokenizer turns back into readable text.

A token is not the same as a word. Common short words like "the" or "and" are usually a single token. Longer or rarer words are split into pieces: "unbelievable" might become "un", "believ" and "able". Spaces, punctuation, numbers and emojis also consume tokens. As a rule of thumb for English, OpenAI estimates that one token is roughly four characters or about three-quarters of a word, so 100 tokens is about 75 words and 1,000 words is about 1,300 tokens.

How tokenization works

Most modern models use subword tokenization methods such as byte-pair encoding (BPE). During development, the tokenizer is trained on a large text sample and learns which character combinations occur most often. Frequent combinations become single tokens; rare ones are built from smaller pieces. This gives the model a fixed vocabulary — typically tens of thousands to a couple of hundred thousand tokens — that can represent any text, including new words, names and code.

Tokenization differs between languages. English is generally the most efficient because tokenizers are trained heavily on English text. Many other languages, including German, Russian, Arabic, Hindi and Japanese, often need more tokens to express the same meaning. That means the same document can be "longer" in tokens, more expensive to process and quicker to fill the context window when written in some languages.

Why tokens matter

Tokens affect almost every practical aspect of using AI:

Example

A customer-support team wants to use an AI model through an API to summarise incoming support emails. Each email averages 300 words, the instructions add another 150 words, and each summary is about 80 words.

Using the rule of thumb, the team estimates roughly 600 input tokens (300 + 150 words, multiplied by about 1.33) and about 110 output tokens per email. At 20,000 emails a month, that is around 12 million input tokens and 2.2 million output tokens. With published per-million-token prices, the team can calculate the monthly cost in minutes and compare models before committing.

They then optimise. Shortening the instructions from 150 to 60 words and stripping email signatures and quoted reply chains cuts input tokens by more than a third. Asking for a fixed three-bullet summary keeps output tokens predictable. The summaries are just as useful, the bill is lower and responses arrive faster. Understanding tokens turned a vague "AI will cost something" into a concrete, controllable budget line.

Tips for working with tokens

  1. Write lean prompts. Clear and concise instructions save tokens and often improve quality.
  2. Remove noise. Strip signatures, disclaimers, duplicated threads and irrelevant appendices.
  3. Control output length. Specify word counts, bullet counts or a format.
  4. Use token counters. Tools such as OpenAI's online tokenizer show exactly how text is split.
  5. Plan for languages. Budget extra tokens for non-English content.
  6. Watch long chats. Every earlier message is re-sent as context, so long conversations consume tokens quickly.

Key takeaways

How this relates to our AI course

Module 1 of the AI POWERED course explains tokens alongside how LLMs work, so you understand why answers get cut off, why long chats drift and how to keep prompts lean. That knowledge feeds directly into the CRAFT framework's Format step, where you learn to control the length and shape of every answer.

Understand LLM basics in free Module 1 →

Related terms

← All glossary terms