What a token is, and why it decides your bill
Models do not read words and they do not charge by the word. They charge by the piece — and the pieces are not where you would put them.
6 modules, drawn as you go. Step through them below, or read them straight down underneath — about 4 minutes either way.
The modules
- 01
You write a sentence
Say you type: unbelievable. One word to you. The model has never seen a word in its life, and it is about to turn this into something it can actually handle.
- 02
It is cut into pieces
The text is chopped into tokens. Common words survive whole. Rarer ones break up — unbelievable becomes something like un, bel, iev, able. The cuts are not syllables and they are not meaningful; they are just the pieces that happened to be worth storing.
- 03
Each piece gets a number
Every token has an ID in a fixed list, usually fifty to two hundred thousand entries long. From this point there is no text anywhere in the system. There are only numbers, and the model has no idea it was ever handed English.
- 04
The numbers go in
Your whole conversation — the question, the instructions, anything pasted in — arrives as one long run of these numbers. That run is the input, and its length is the first half of what you pay for.
- 05
Numbers come back out
The reply is produced the same way, a token at a time, and each one is turned back into text for you to read. Output is the second half of the bill, and it is usually priced higher than input, because generating costs more than reading.
- 06
The pieces are counted
A rough rule for English: a token is about four characters, so a hundred words is around a hundred and thirty tokens. Code, names and other languages break into far more pieces than they look like they should, which is why a short prompt in Hindi or Tamil can cost several times what the same sentence costs in English.
Everything on this page is drawn by the page itself, so it costs nothing to load and reads the same on a slow connection.