# Get a clip

URL: https://www.atmee.ai/docs/api/reference/generation/getClip

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

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

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `requestId` | path | yes | The `Idempotency-Key` the clip's `POST /v1/generation/clips` was sent with. |

## Responses

| Status | Description | Schema |
| --- | --- | --- |
| `200` | The clip's status. | `ClipStatusResponse` |
| `400` | invalid_input -- the request id is not a UUID. | `ApiErrorResponse` |
| `401` | Missing or invalid API key, or a user token that is invalid, anonymous or of a user who may act for no account (`invalid_login`). | none |
| `403` | insufficient_scope (needs avatars:read or avatars:write) \| account_not_allowed (`X-Account-Id` names an account the user may not act for) | `ApiErrorResponse` |
| `404` | clip_not_found -- no clip is rendering or made under this request id in this account. | `ApiErrorResponse` |
| `409` | account_ambiguous -- a user token of a user who may act for several accounts, without an `X-Account-Id` header naming one. | `ApiErrorResponse` |
| `503` | generation_unavailable -- this instance does not offer generation. | `ApiErrorResponse` |

## `200` response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `requestId` | string | yes | The clip's request id, its POST's `Idempotency-Key`. |
| `status` | string (`rendering`, `ready`, `expired`, `stalled`) | yes | See the table above. `clip` is present when it is `ready` or `expired`. |
| `clip` | `GeneratedClip` | no |  |
| `retryAfterSeconds` | integer | no | When `status` is `rendering`, seconds to wait before asking again (the same as the `Retry-After` header). |
