Skip to main content
Code Guide
Architecture API

stop_reason

Field in the Anthropic API response indicating why generation stopped: `end_turn` (natural completion), `max_tokens` (limit hit), `tool_use` (tool call initiated), `max_turns` (agentic loop cap), `stop_sequence` (triggered sequence matched).