Stop reason
stop-reason
The stop_reason field in an API response tells you why the model stopped generating. Common values: end_turn (the model decided it was done), max_tokens (it hit the output cap and was cut off), stop_sequence (a configured stop string was emitted), tool_use (the model wants to call a tool and is pausing for input).
This is one of the most useful fields in the response, and one of the most ignored. If a chat answer feels truncated mid-sentence, the stop_reason will almost always say max_tokens, which means the response was clipped at the configured ceiling and the model had more to say. Raising max_tokens on the next turn or asking the model to continue will recover the rest.
end_turn means the model produced a coherent ending point and stopped on its own. This is the normal, healthy stop reason for a finished answer.
tool_use means the model has decided it needs to call a function or external tool and has emitted a tool-use block. The conversation is not finished; the application is expected to execute the tool, return the result, and call the model again with that result appended.
stop_sequence is rarer in modern chat applications but useful when you want the model to stop emitting once it produces a particular marker. It is more common in completion-style use cases than in chat.
Watching this field across turns is a quiet way to diagnose whether your output token budget is too small.
Related concepts