Skip to main content
To request structured outputs, pass a response_format in your request. response_format is a passthrough field with three modes:
  • Default — plain text (Markdown) with inline citations.
  • {"type": "json_object"} — JSON object output.
  • {"type": "json_schema", ...} — strict output conforming to a named OpenAI-compatible JSON schema.
Under either JSON mode, inline Markdown citations are suppressed, but the top-level citations[] extension is still present in the response. The OpenAI SDK’s .parse() helper compiles a Pydantic model to a strict json_schema, sends it as the response_format, and parses the response back into your model, including nested models and lists:

Next steps

  • Structured responses: Step-by-step guidance on schema design, query anchoring, and worked examples across every data scope