Send a schema
Addschema to the request body:
Read the output
When the session iscompleted, read it:
output follows your schema. outputSchema echoes the schema you sent. output is also in GET /v1/sessions/{id}/artifacts.
Tips
- Describe the task in
promptand the result’s shape inschema. The schema does not replace instructions. - Mark the fields you always need as
required. - Use
descriptionon properties to say what each field means, for example the currency format you want. outputis filled only when the session completes. A failed session haserrorinstead.

