Use structured outputs when
- the model is responding directly to your application
- you need valid JSON in a known shape
- retries and post-processing are too brittle
Do not use structured outputs when
- the model is supposed to decide which tool to call
- you are building a tool-use or function-calling loop
- Structured outputs shape the assistant response
- Function calling / tool use shapes how the model interacts with external functions
Core pattern
Useresponse_format with a json_schema, and keep the system instruction explicit about responding in JSON.
Strong use cases
- extraction and classification
- scoring and evaluation outputs
- UI generation from model responses
- typed automation pipelines