Inference and generation

Output token

stable definition
Machine-readable Download Markdown

Definition

An output token is a token generated by a model during an inference call. Visible answer text, serialized tool arguments, and structured data can all contribute to output usage. Providers usually meter output separately from input, often at a different price.

The term can refer narrowly to tokens visible in the returned content or more broadly to a provider's output_tokens or completion_tokens field. Those meanings are not always identical. OpenAI, for example, reports non-visible reasoning tokens inside output-token accounting for supported reasoning models. Check the API's detailed usage fields before treating visible text length as total generated usage.

Operational significance

Output tokens affect response time, cost, and context capacity. Streaming changes when the application receives them, not how many the model generated. A short final answer can still follow extensive hidden reasoning or several earlier calls, so per-response output count is only one part of an agent's total inference budget.

An output limit may end generation before a structure is complete. Downstream code should inspect the provider's stop or completion reason and validate the result instead of assuming that returned text is complete.

Distinguish it from nearby terms

  • Input tokens represent the context supplied for the call. Output tokens are generated after the call begins.
  • Reasoning tokens are intermediate generated tokens reported by some providers. They may be a subset of output accounting even when they are not exposed as text.
  • A maximum-output setting caps generation. It does not report what was actually used.

Check your understanding

An API returns a 120-token answer but reports 2,400 output tokens, including 2,280 reasoning tokens. Explain why both numbers can be correct and which one belongs in cost accounting.