Get a clip
Returns the status of the clip that POST /v1/generation/clips made or
is making under this request id (the call's Idempotency-Key). Use it
after a 409 request_in_progress, or from a process that did not make
the call, to wait for the clip and download it. Reading charges
nothing and never starts a render.
status | Meaning |
|---|---|
rendering | The render is running. Ask again after retryAfterSeconds (also the Retry-After header). |
ready | clip is the mp4, with a newly signed url on every read until it expires. |
expired | The clip was made and charged, but its upload has expired (24 hours after it was made): clip.unavailable is true and there is no url. It is not made again. |
stalled | The call stopped without finishing (the server running it went away). Retry POST /v1/generation/clips with the same Idempotency-Key and inputs: it resumes the call, charged at most once. |
404 clip_not_found means this account has no clip under the id: the
id was never used for a clip, or the call ended without a clip
(flagged, refused or failed: nothing was charged and the id is free
again). The POST answers with why; retry it with the same key and
inputs to see the reason or to try again.
Requires avatars:read or avatars:write. Account-wide: the same
request id under another account is not found.
X-Api-Key<token>Your secret API key (sk_atmee_...; older keys start sk_live_),
sent as X-Api-Key. Keep it on your server and never send it to a
browser.
requestId*stringThe Idempotency-Key the clip's POST /v1/generation/clips was sent with.
uuidThe clip's status.
application/json- response
requestId*stringThe clip's request id, its POST's Idempotency-Key.
uuidstatus*stringSee the table above. clip is present when it is ready or expired.
"rendering""ready""expired""stalled"clip?retryAfterSeconds?integerWhen status is rendering, seconds to wait before asking again (the same as the Retry-After header).
curl -X GET 'https://api.atmanity.us/v1/generation/clips/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6", "status": "rendering", "clip": { "upload": "upload:3f1c2a9e-8d4b-4f6a-9c2e-1b7d5a0e4c11", "url": "http://example.com", "expiresAt": "2019-08-24T14:15:22Z", "durationSeconds": 0, "width": 0, "height": 0, "unavailable": true }, "retryAfterSeconds": 0}
