Term
Structured output
An LLM API mode that forces the model to emit a response conforming to a JSON schema (or other grammar). Eliminates parse failures and makes LLM outputs safely consumable as data by downstream code.
Background
Structured output is implemented as constrained decoding — at each step, the tokenizer masks tokens that would violate the schema. The result is guaranteed-valid JSON, XML, or whatever grammar you specify. Anthropic, OpenAI, and Google all support structured output in their 2026 APIs, usually exposed via a `response_format` or `tools` argument. Coding agents use it for tool-call arguments, edit-plan emission, and any place where free-form text would create downstream fragility.