A. Smyntyna / Code
ENRU

token

The unit a model reads and writes. Not a word and not a character, but a fragment of one, produced by a lookup table built during training. English averages roughly four characters per token, so 1,000 words is about 1,300 tokens. Everything is priced, measured and capped in tokens: context windows, API bills, generation speed.

Common words are single tokens. Rare words, names and code identifiers split into several, which is why a page of source code costs more tokens than a page of prose. The split is fixed when the model is trained, so two models given the same text can disagree about how many tokens it is.

Two things follow from that. Speed is quoted in tokens per second, because the model produces exactly one token per forward pass. And API pricing is quoted per million tokens, split into input and output, with output usually three times the price of input.

Read next