---
title: 'Maximum output tokens'
description: 'A request-level ceiling on the tokens a model may generate, which can include hidden reasoning as well as visible output on some APIs.'
canonical_url: 'https://darkfactory.dev/glossary/max-tokens'
markdown_url: 'https://darkfactory.dev/glossary/max-tokens.md'
collection: glossary
date_published: '2026-08-03T00:00:00-04:00'
date_modified: '2026-08-26T00:00:00-04:00'
---

# Maximum output tokens


## Definition

Maximum output tokens is a request-level ceiling on the tokens a model may generate before the API ends or marks the response incomplete. Providers expose the setting under names such as `max_output_tokens`, `max_completion_tokens`, and `max_tokens`, and the exact accounting rules differ.

On some reasoning APIs, the limit covers the combined budget for hidden reasoning, visible answer text, and other generated tokens. A model can therefore exhaust the limit during reasoning and return little or no visible answer. Reaching the cap can also cut off JSON, code, a tool call, or a sentence midway, so a token limit is not a guarantee of a usable completion.

## Operational significance

The setting is useful for bounding one call's worst-case generation, cost, and latency. It is not a complete session budget. Retries, tool loops, parallel calls, and delegated agents can each make additional calls under their own limits. Enforce an aggregate budget outside the model when the real requirement concerns the whole workflow.

## Distinguish it from nearby terms

- A context window is the model's capacity for the context and generated material that must fit during a call. The maximum-output setting reserves or caps only generation under the provider's accounting rules.
- A stop sequence ends generation when a configured pattern is produced. A token cap ends it by quantity.
- A reasoning-effort control asks a supported model to use more or less inference effort. It does not replace a hard output ceiling.

## Check your understanding

A call allows 2,000 maximum output tokens but returns no visible text and reports 2,000 reasoning tokens. Explain why the limit still worked and why the application should treat the response as incomplete.

## Also called

max tokens, maximum completion tokens

## Related terms

- [Context window](https://darkfactory.dev/glossary/context-window)
- [Output token](https://darkfactory.dev/glossary/output-token)
- [Reasoning token](https://darkfactory.dev/glossary/reasoning-token)

## Related factory areas

- [Model selection, routing & budgets](https://darkfactory.dev/factory/model-routing-budgets)

## Evidence and further reading

- [Google Machine Learning Glossary](https://developers.google.com/machine-learning/glossary/)
- [Claude API: Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons)
- [OpenAI API: Reasoning models](https://developers.openai.com/api/docs/guides/reasoning)
- [Token Budgets](https://arxiv.org/abs/2606.04056)
