Structured outputs
The model’s answer is constrained to match a JSON schema you provide.
Instead of asking for JSON and hoping, you pass a schema and the API guarantees the shape. Your code can parse it without regex and fragile retries. The content can still be wrong; only the format is guaranteed.
Related terms
- Tool use (function calling): The model returns a structured request to run a function you defined; your code runs it.
- Evals: A repeatable test set that scores an AI feature, so changes can be measured instead of guessed.
