Skip to main content

AI coding · Basics

Token

Also called: Tokens, Token count, Token usage

The smallest unit a large model reads and writes. How much the model can read and how much a call costs are both counted in tokens.

In detail

Models don't read text word by word or letter by letter. They first split it into tokens. In English, a token is about three quarters of a word. In Chinese, one character is usually one or two tokens.

Tokens matter to you in two ways. First, the Context Window is measured in tokens: if the conversation gets too long or you paste too much code, the model "forgets" earlier content. Second, API calls are billed by the number of input and output tokens.

So when working with AI, only paste the files related to the problem, not the whole project. After you finish one stage of a long conversation, starting a new one often works better.

Developer info
Term ID
ai-token
DOM selectors
No DOM cues. This concept isn't detected directly on a page.
Priority
1 · when several match at the same level, the higher priority wins
Version
v1 · updated Sep 29, 2026