Features
Structured outputs
Structured outputs is an API feature that makes a model answer with JSON matching a schema the request supplies, so the answer can be parsed without checking for missing fields or invalid values.
Also called JSON mode, JSON schema output, JSON output
Checked November 29, 2026
At a glance
- Guarantees
- JSON that matches your schema
- JSON mode
- Valid JSON, of any shape
- OpenAI
response_format(Chat),text.format(Responses)- Anthropic
output_config.format- On /model
- GPT through
response_format; Claude throughoutput_config.format
OpenAI calls Structured Outputs the evolution of JSON mode: both produce valid JSON, but only Structured Outputs ensures it follows your schema (OpenAI). JSON mode promises JSON of some shape; structured outputs promise the shape you asked for.
How to ask for it
| API | Parameter |
|---|---|
| OpenAI Chat Completions | response_format of type json_schema, with your schema and strict: true; type json_object is JSON mode |
| OpenAI Responses | text.format of type json_schema |
| Anthropic Messages | output_config.format of type json_schema |
OpenAI Chat Completions
- Parameter
response_formatof typejson_schema, with your schema andstrict: true; typejson_objectis JSON mode
OpenAI Responses
- Parameter
text.formatof typejson_schema
Anthropic Messages
- Parameter
output_config.formatof typejson_schema
Anthropic documents the last (Anthropic). Its OpenAI compatibility layer ignores strict on tools, so for guaranteed schema conformance it points to its native API (Anthropic).
JSON output on /model
- For GPT models, set
response_formatto typejson_schemawith your schema, or to typejson_objectfor JSON of any shape (JSON output). - Claude models ignore
response_format. For them, call/v1/messageswithoutput_config.formatset to typejson_schema; the JSON is the answer's text. - On
/v1/responses, JSON output (text.format) works as at OpenAI (Responses API).
Where it applies on /model
Questions
Is JSON mode enough?
Only if any valid JSON will do. If your code expects certain fields, give a schema: JSON mode doesn't promise them.
Why does Claude ignore my response_format?
Claude models don't read OpenAI's response_format. On /model, send the request to /v1/messages with output_config.format instead.
Sources
The makers' own pages, each opened on November 29, 2026.