Appearance
Output item types
Run outputs are an ordered array of items. Each item is a discriminated union on the type field:
type | Shape | Description |
|---|---|---|
text | { "type": "text", "data": string } | Generated text content. |
image | { "type": "image", "data": string } | The URL to a generated image resource. The URL is publicly accessible and expires after 24 hours. |
error | { "type": "error", "data": string } | Error message when a step fails during generation. |
Example:
json
[
{ "type": "text", "data": "A witty caption for your image…" },
{ "type": "image", "data": "https://cdn.betterprompt.me/....jpg" }
]Used by:
- Runs: Create a run, Retrieve a run