Skip to main content
Generation endpoints return a consistent response structure. Use this page to understand what you get back, what expires, and what to store on your side.

Response structure

Every completed generation includes these fields:

Sync vs async

Images return HTTP 200 with status: "completed" and the full response body immediately. Videos return HTTP 202 with status: "pending" and only an id when you submit the generation. Poll GET /v2/videos/generations/{id} until the status changes to completed or failed. See Generate videos for the full flow.

The data array

Each item in data represents a generated file. Image items: Video items include additional fields:

Download URLs

The url in each data item is a signed download URL to the generated media.
Generated media is retained for 24 hours. The signed url is valid for that same window and expires at deletes_at.
Download URLs expire 24 hours after generation. Store the file in your own system if you need it for longer.
Read deletes_at rather than computing the deadline yourself, and download as soon as a generation completes. That keeps your delivery flow predictable.

Usage and billing

The usage object contains billing details for the generation.
For spend across generations rather than a single one, use the daily costs endpoint in Billing. For the rates behind unit_price, see the pricing field in Models.