Generate a clip
Renders a short mp4 (1 to 15 seconds, 25 fps) of the person or character
in image, moving as prompt describes and optionally speaking
audio. No avatar is needed.
- Inputs:
imageis aportraitupload or a public https link (jpg, png or webp, up to 10 MB);audiois avoiceupload or link. The audio plays once from the start, padded with silence or cut at the end. The prompt and the image are moderated; if the image shows a real person other than you, get their permission first. - Duration:
durationSecondsis required withaudio(set it to the audio's length; the file is not measured) and defaults to 8 for a silent clip; 1 to 15 seconds at every size. - Resolution: 480 × 480 unless you pass
resolution, the clip's output size, one of the sizes inClipResolution(listed with their prices inpricing.generation.clipSizesonGET /v1/account). 1080p sizes are coming soon. - Output: the clip as
upload:<uploadId>(kept 24 hours), with a short-livedurlto download it. - Billing: a price per clip set by its size and its length tier:
up to 5, 10 or 15 seconds, charged at the next length up, so a
7-second clip pays the up-to-10-seconds price
(
pricing.generation.clipPrices). Charged only when the clip comes back. - Slow starts: a cold render can take minutes. After about 45
seconds the call answers
409 request_in_progressand the render goes on. Follow it withGET /v1/generation/clips/{requestId}(theIdempotency-Keyis the request id, and the409names that path inLocation), or retry this call with the same key afterRetry-Afterto get the clip, charged once. - Access: video clips are on every plan, Free included, and need
no Atmee V2 access or invite code (building Atmee V2 avatars needs
Pro and up, or an invite code below Pro). They spend credits
by length and size; any credits pay for them. An account whose video
generation is turned off answers
403 video_generation_not_in_plan(limits.videoGenerationonGET /v1/account); an older billing setup may still answer403 v2_access_required. - Scope:
generation:write. A clip is not avatar editing, so it needs no avatar scope: withgeneration:writealone a key can upload the clip's portrait and voice (POST /v1/uploads), make the clip, and read it back (GET /v1/generation/clips/{requestId},GET /v1/uploads/{uploadId}).
| Error | When |
|---|---|
400 invalid_input | A bad input, audio without durationSeconds, or an input the renderer cannot use: input_failure image or audio (no face, an unreadable file), a size that is not a clip size or not served here yet (the message lists the sizes), input_failure resolution (a size the renderer cannot serve right now) |
503 generation_unavailable | Clips are not offered here |
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.
Idempotency-Key*stringA new UUID minted for this request. Reuse it only to retry the same request: a retry never charges twice and returns the first result. A malformed key, or a key already used with different inputs, gets 400 invalid_input.
length <= 255application/json- body
image*stringWho or what the clip shows, upload:<uploadId> (a portrait upload) or a public https link (jpg, png or webp, at most 10 MB).
1 <= length <= 2048prompt*stringThe shot and the motion, e.g. "she walks along the beach at sunset, the camera following".
1 <= length <= 2000audio?stringWhat the clip says or plays, upload:<uploadId> (a voice upload) or a public https link to an audio file. Absent, the clip is silent.
1 <= length <= 2048durationSeconds?integerThe clip's length, 1 to 15 at every size. Required with audio (set it to the audio's length; it is not read from the file); default 8 for a silent clip.
1 <= value <= 15resolution?A clip's output size in pixels, one of these. Credits per clip by length; a clip pays the next length up (7 seconds pays the up-to-10-seconds price):
| Size | Sizes | Up to 5 s | Up to 10 s | Up to 15 s |
|---|---|---|---|---|
| 480p square, 4:3, 3:4 | 480 x 480, 640 x 480, 480 x 640 | 0.1 | 0.3 | 0.5 |
| 480p 16:9, 9:16 | 832 x 468, 468 x 832 | 0.3 | 0.7 | 1 |
| 720p square, 4:3, 3:4 | 720 x 720, 960 x 720, 720 x 960 | 0.5 | 1 | 1.5 |
| 720p 16:9, 9:16 | 1280 x 720, 720 x 1280 | 0.8 | 1.4 | 2 |
| 1080p | any | coming soon |
Default 480 x 480. The renderer works at each side rounded up to a
multiple of 32 (1280 x 720 at 1280 x 736) and crops the centre to
the size asked for. GET /v1/account pricing.generation.clipSizes
lists the sizes served here with their prices; another size is
400 invalid_input, naming the sizes.
seed?integerThe render's seed; another seed gives other motion. Default 0.
int640 <= valueThe clip (or the replayed first result).
application/json- response
clip*microcreditsCharged*integerWhat this call charged to credits (100 microcredits = 1 credit), the clip's price for its size and length tier (pricing.generation.clipPrices); 0 on a replay.
microcreditsFree*integerAlways 0. A plan's free generation allowance does not cover clips; the field is here so every generation answer has the same shape.
replayed*booleanTrue when an earlier call with the same Idempotency-Key was replayed.
curl -X POST 'https://api.atmanity.us/v1/generation/clips' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "image": "string", "prompt": "string"}'{ "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 }, "microcreditsCharged": 0, "microcreditsFree": 0, "replayed": true}
