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 through output_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

  • OpenAI Chat Completions

    Parameter
    response_format of type json_schema, with your schema and strict: true; type json_object is JSON mode
  • OpenAI Responses

    Parameter
    text.format of type json_schema
  • Anthropic Messages

    Parameter
    output_config.format of type json_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_format to type json_schema with your schema, or to type json_object for JSON of any shape (JSON output).
  • Claude models ignore response_format. For them, call /v1/messages with output_config.format set to type json_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.

One key for every model here.

Top up from $10, change one URL, and pay only for the tokens you use.