Fundamentals

Structured Output

Quick Answer

A general feature for constraining models to return outputs matching a specified schema.

Structured output constrains the model to return outputs matching your specified schema. This goes beyond JSON mode by enforcing not just valid JSON, but specific field names, types, and optional fields. Some APIs support specifying the exact schema structure. Structured output is powerful for data extraction, classification, and any task requiring consistent, machine-readable results. Quality structured output reduces post-processing and validation. Implementation approaches vary: some models use speculative decoding, others use grammar constraints. Testing with your specific schema is important.

Last verified: 2026-04-08

Compare models

See how different LLMs compare on benchmarks, pricing, and speed.

Browse all models →