Inference and generation

Input token

stable definition
Machine-readable Download Markdown

Definition

An input token is one token in the context supplied to a model for an inference call. The count covers more than the words a user typed. Depending on the API and model, it can include system and developer instructions, conversation history, examples, retrieved passages, file contents, tool definitions, prior tool results, and provider-specific representations of images or audio.

The model's tokenizer determines how text becomes tokens, so token count is not the same as word count or character count. The same text can also produce different counts across model families or tokenizer versions. For cost and capacity planning, use the tokenizer and usage fields for the exact model being called rather than a universal words-to-tokens ratio.

Operational significance

Input tokens consume context-window capacity and often contribute to price and latency. A short user message can still produce a large request when a harness attaches a long system prompt, repository files, tool schemas, retrieved documents, and earlier turns.

Some providers report cached input separately or charge it at a different rate. That does not turn cached material into output or remove it from the request. It is still input whose earlier computation has been reused under provider-specific rules.

Distinguish it from nearby terms

  • Output tokens are generated during the response rather than supplied in the request.
  • Reasoning tokens are a provider accounting category for intermediate generation. Some providers include them under output-token usage even when their contents are not shown.
  • A prompt is the content that conditions a response. Input tokens are the units used to represent that content for a particular model call.

Check your understanding

A user sends five words, but the request reports 40,000 input tokens. Name at least four sources of context that could account for the difference and identify where you would verify the actual count.