Structured output
Require a Codex turn to return JSON that conforms to a schema.
Pass outputSchema to thread.run() when a caller needs machine-readable output. The SDK forwards a JSON Schema to the Codex CLI.
The final response is serialized according to the requested schema. Keep schemas small and explicit, and validate the result at your application boundary.
2026年8月31日に更新