Skip to main content
The Responses API supports structured output through the standard OpenAI text.format parameter. Provide a JSON Schema and the researched answer is returned as a JSON object conforming to it, JSON-encoded in the output text.

Usage

The structured answer is returned JSON-encoded in the output text — parse output_text to get the object, and handle parse errors as you would for any network payload. Citations still work: annotation start_index/end_index values point into the JSON-encoded string, anchored to the individual field values (e.g. a citation covering "Reykjavik" for the capital field).

Schema guidance

  • Follow OpenAI structured-output schema conventions: object root, required listing every property, and additionalProperties: false.
  • Prefer flat schemas with descriptive field names and descriptions — field descriptions guide the research, so state formats and units explicitly (e.g. “Founding year as a four-digit number”).

Next steps