Atmee.aiDocs
APIAPI referenceGeneration

Get a clip

GET
/v1/generation/clips/{requestId}

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.

statusMeaning
renderingThe render is running. Ask again after retryAfterSeconds (also the Retry-After header).
readyclip is the mp4, with a newly signed url on every read until it expires.
expiredThe 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.
stalledThe 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.

Authorization

headerX-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.

Path Parameters

requestId*string

The Idempotency-Key the clip's POST /v1/generation/clips was sent with.

Formatuuid

Response Body

The clip's status.

application/json
  1. response
requestId*string

The clip's request id, its POST's Idempotency-Key.

Formatuuid
status*string

See the table above. clip is present when it is ready or expired.

Value in"rendering""ready""expired""stalled"
clip?
retryAfterSeconds?integer

When status is rendering, seconds to wait before asking again (the same as the Retry-After header).

Example Request
curl -X GET 'https://api.atmanity.us/v1/generation/clips/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "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}
Get a clip — Atmee Docs