Token
The smallest unit of text an LLM processes. Roughly one token per word, but punctuation, code symbols, and subwords each count separately.
A token is the basic unit of input and output for a large language model. The model does not read characters or whole words; it breaks text into tokens using a tokenizer. For English prose, one token is roughly 3/4 of a word. Code tends to use more tokens per line because symbols, indentation, and variable names get split into multiple pieces.
Tokens matter for two practical reasons: cost and context. API pricing is per-token (input + output). Context windows are measured in tokens. A 200,000-token context window can hold roughly 150,000 words of prose, or about 4,000-6,000 lines of code depending on density.
When someone says "this request costs 10K tokens," they mean the combined size of the prompt and the response. Understanding token budgets helps you write efficient prompts and avoid hitting context limits mid-conversation.
Related Courses
Links open the course details directly on the Courses page.