Skip to main content
In public v1, structured outputs are consumed through output_flat.

Pattern

trace = client.runs.steps(run_id)

for step in trace["steps"]:
    flat = step["output_flat"]
    if flat.get("type") == "json":
        structured = flat["primary"]
        print(structured)

Notes

  • Do not rely on raw internal step payloads.
  • Use normalized fields in output_flat.

See also