Skip to content
Nitmonk
Tokens & Embeddings

Token

The basic unit of text AI models read and generate.

Token — infographic explaining The basic unit of text AI models read and generate.
Token — visual explainer by Nitmonk.

A token is the basic unit of text that AI models read, process and generate. A token can be a whole word, part of a word, a number, punctuation or even a space — models see a sequence of tokens, not raw letters.

In simple terms

The small pieces of text a model actually reads — words, subwords, numbers or symbols.

How it works

  1. 1Text is split into tokens (e.g. 'unbelievable' → 'un' + 'believ' + 'able').
  2. 2Each token maps to a unique ID number.
  3. 3The model reads these IDs to understand the input.
  4. 4It generates output as tokens too, which are turned back into text.

Key points

  • 1 token ≈ 3–4 characters, or about ¾ of a word in English.
  • Context windows are measured in tokens (e.g. 8K, 128K).
  • Cost is usually charged per token — input plus output.
  • Different models tokenize the same text differently.

Why it matters

Tokens are the currency of LLMs: your context limit, speed and bill are all measured in them. Understanding tokens helps you write tighter prompts and predict cost.

Frequently asked questions

Is a token the same as a word?
Not always. Common words are one token, but longer or rare words split into several subword tokens.
Why do tokens matter for cost?
APIs charge by tokens (input + output), so fewer tokens mean lower cost and often faster responses.