Structured Output
Using theresponse_format parameter, you can have the model return structured data according to a specified JSON Schema, ensuring reliable and parseable output format.
JSON Mode
The simplest form of structured output, forcing the model to return valid JSON:Response
JSON Schema Mode
Using thejson_schema type, you can precisely define the output structure, and the model will strictly follow the schema:
Response
When using
json_schema mode, setting "strict": true ensures the model strictly follows the schema definition. additionalProperties must be set to false.