Atmee.aiDocs
APIAPI referenceGeneration

List generations

GET
/v1/generation

The account's generations, newest first: every clip, portrait and voice call that finished (charged), and every one still running, so a clip shows here as rendering as soon as its POST starts. A call that was flagged, refused or failed charged nothing and is not listed. Calls made before this list existed show madeBy: null and inputs: null.

Each item says who made it (madeBy: a member of the account or an API key), what it was made from (inputs, enough to make it again; remake says what must be given again), what it charged, and its outputs. A ready output has a fresh download url on every read (a link on this API's host or a Storage link, depending on the server, saving the file as atmee-clip-xxxxxxxx.mp4). A clip's output carries a small JPEG poster of its first frame, kept after the file has gone, so an expired clip still shows a picture.

statusMeaning
renderingThe call is running.
readyAt least one output can be downloaded (outputs[].url).
expiredThe outputs were made but can no longer be downloaded: past expiresAt (a clip is kept 30 days, a portrait or voice 7), or used by an avatar.
deletedThe outputs were deleted (DELETE /v1/generation/{requestId} or DELETE /v1/uploads/{uploadId}).
stalledThe call stopped without finishing; retry its POST with the same Idempotency-Key and inputs.

Page with cursor: pass the nextCursor of the previous page, with the same filters; nextCursor is null on the last page.

Any member of the account sees every generation of the account. An API key scoped to an avatar sees only the generations made by keys of that avatar. Requires generation:write, avatars:read or avatars:write. Reading charges nothing.

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.

Query Parameters

kind?string

Only generations of this kind. Absent lists every kind.

Value in"clip""portrait""voice"
mode?array<>

Only clips made one of these ways: picture (from an image), avatar (a saved avatar speaking) or unknown (made before modes were recorded, as clipModes.unknown counts them). Repeat it, or separate values with commas. Implies kind=clip.

Itemsitems <= 2
madeBy?array<>

Only generations made by any of these: me (the caller), apiKeys (any API key), former (any former member), or a member's user id or an API key id (GET /v1/generation/summary lists them). Repeat it, or separate values with commas.

Itemsitems <= 50
status?array<>

Only generations in one of these states: rendering (stalled included), ready, expiringSoon (ready, ending within 3 days), expired or deleted. Repeat it, or separate values with commas.

Itemsitems <= 5
since?string

Only generations started at or after this time.

Formatdate-time
q?string

Only generations whose prompt, script or description contains this text, ignoring case.

Lengthlength <= 200
limit?integer
Range1 <= value <= 50
Default24
cursor?string

The nextCursor of the previous page.

Lengthlength <= 512

Response Body

One page of generations.

application/json
  1. response
items*array<>
nextCursor?string

Pass as cursor for the next page; null on the last page.

Example Request
curl -X GET 'https://api.atmanity.us/v1/generation'
Example Response
{  "items": [    {      "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",      "kind": "clip",      "operation": "clip",      "status": "rendering",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z",      "deletedAt": "2019-08-24T14:15:22Z",      "madeBy": {        "type": "member",        "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",        "apiKeyId": "37ba0474-c0bb-4910-bfb5-d6cebb614366",        "name": "string",        "avatarUrl": "http://example.com",        "formerMember": true,        "revoked": true      },      "inputs": {        "mode": "picture",        "prompt": "string",        "transcript": "string",        "avatarId": "ac572b6e-802b-4b9e-a602-0786d4441e67",        "image": {          "source": "upload",          "url": "http://example.com"        },        "audio": {          "source": "upload",          "url": "http://example.com"        },        "lengthSeconds": 0,        "size": {          "width": 256,          "height": 256        },        "seed": 0,        "description": "string",        "engine": "string",        "count": 0,        "voiceDescription": "string",        "avatarName": "string",        "language": "string",        "sampleText": "string"      },      "remake": {        "possible": true,        "imageUploadRequired": true,        "audioUploadRequired": true      },      "outputs": [        {          "uploadId": "ef523ba8-509e-47af-8e2c-5fa751596497",          "status": "ready",          "expiresAt": "2019-08-24T14:15:22Z",          "durationSeconds": 0,          "width": 0,          "height": 0,          "poster": "string",          "provider": "string",          "spokenText": "string",          "url": "http://example.com",          "urlExpiresAt": "2019-08-24T14:15:22Z"        }      ],      "microcreditsCharged": 0    }  ],  "nextCursor": "string"}