← Glossary / 40 of 100

n. / Models and tokens

Token

Definition

A token is the unit of text a language model reads and writes, usually a word piece of about four characters of English. Model providers count and bill usage in tokens, and context limits are measured in them.

In more detail

Common words are often one token, while rare words, numbers and code split into several. Other languages can use more tokens for the same meaning. Because price and speed both scale with tokens, knowing how many a call used is the starting point for cost control.

Example

The sentence "Tracing agents is useful" might be split into about five tokens. A 3,000-word document is roughly 4,000 tokens.

Definitions are the start.

Open a real trace and watch these terms move.