Structured outputs
Structured outputs constrain a model’s response to a defined schema (such as JSON), guaranteeing parseable, valid output.
Structured outputs make a model return data that conforms to a schema you provide, so downstream code can parse it reliably instead of coping with free-form text. This is essential for extraction, classification, and any pipeline step that consumes the model’s output programmatically.
Modern APIs enforce the schema at generation time, eliminating a whole class of parsing errors and brittle prompt hacks (like prefilling a response).
Structured outputs pair with evals and tool use to make LLM features predictable enough for production.