Retrieve a generation
A generation's status, outputs and cost. Each read signs fresh output links, valid for 24 hours.
To wait for the result, send Prefer: wait=60: the read holds until status is succeeded, failed or canceled, or 60 seconds pass, so a loop of these reads long-polls a video in a few requests. Without it the read answers at once; while the run isn't final, Retry-After says how many seconds to wait before the next read.
Needs an API key with the generations:read scope.
Request
- Base URL: https://api.tryleap.ai
- URL: https://api.tryleap.ai/v1/generations/{id}
- Auth: one of:
- API key in header x-api-key
- HTTP bearer
Path parameters
The generation's ID, gen_....
Headers
wait=N holds the request open for up to N seconds (at most 60) until the generation finishes, and Preference-Applied echoes the wait used. Most images finish inside the wait. If the run is still going when it ends, you get it back queued or running; poll it from there. Without this header the generation comes back queued at once.
Response
The generation, as it is now or when the wait ends.
Changes
No recorded changes to this operation across all 1 revision of this API.