OpenAI deep research API structured output
06:09 21 Nov 2025

Using o3-deep-research, I need strictly structured JSON for a research report with fixed keys and nested values. The keys are set, value structures are set, but ideally the LLM would be able to choose to add new keys with the same value structure.

I've been using Pydantic BaseModel & turning this into a JSON schema to pass in, but deep research simply will not play nicely. Something like:

  • topic

  • sections[] → each has overview and metrics[]

  • metrics[] items: value, confidence, evidence_id

  • sources[] items: evidence_id, url, kind

  • allow optional extras the model may add - ideally it could add new sections that take the same structure.

What is the correct way to force this shape using with o3-deep-research?

python openai-api