Video
POSThttps://api.aderra.ai/v1/videos/generations
Makes a clip of 5 to 15 seconds in one of four modes: from the prompt alone, from your most recent image, from references (images and earlier clips), or by editing an earlier clip. Video is priced per second, per model and mode: see Video models.
Request body
promptstringrequired- What happens in the clip. In
imagemode, the motion to add; ineditmode, the change to make. modestringoptionaltext,image,referenceoredit: see Modes. Absent:imageif you have a recent image, otherwisetext. Send it, so a clip never depends on what you did before.durationintegeroptional- Seconds, 5 to 15. Clamped into that range; the clamped length is what is made and paid for. Absent: 5.
modelstringoptional- A video model id from Video models. Absent, or a name Aderra does not know: the mode’s model (
minimax-h3, orwan-editfor edits). A model that does not make the mode is refused withvideo_mode_unavailable. explicitbooleanoptional- With
modeand nomodel: use the mode’s uncensored model. It is used only when the prompt asks for nudity or sex; otherwise the clip is made by the standard model. Defaultfalse. end_framebooleanoptionalimagemode: use your two most recent images, the older as the first frame and the newer as the last. Defaultfalse.image_countintegeroptionalreferencemode: how many of your recent images to use, 0 to 9 (default 1; at most 8 are kept).editmode: 1 to guide the edit with your most recent image (default 0).reference_video_countintegeroptionalreferencemode: how many of your recent clips to use, 0 to 3. Default 0.source_videointegeroptionaleditmode: which clip to edit, counted back from the newest: 1 is your most recent clip. 1 to 20, default 1.video_originstringoptional- Which clips
source_videoandreference_video_countcount:generated(clips Aderra made) orupload(videos uploaded in the Aderra app). Absent: both.
curl https://api.aderra.ai/v1/videos/generations \ --max-time 900 \ -H "Authorization: Bearer $ADERRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Waves crash against a lighthouse at dusk, slow push in", "mode": "text", "duration": 5 }'import osimport requests
r = requests.post( "https://api.aderra.ai/v1/videos/generations", headers={"Authorization": f"Bearer {os.environ['ADERRA_API_KEY']}"}, json={ "prompt": "Waves crash against a lighthouse at dusk, slow push in", "mode": "text", "duration": 5, }, timeout=900, # the call stays open until the clip is ready)r.raise_for_status()clip = r.json()["data"][0]video = requests.get(clip["url"], timeout=120)open("clip.mp4", "wb").write(video.content)import fs from 'node:fs';
const r = await fetch('https://api.aderra.ai/v1/videos/generations', { method: 'POST', headers: { Authorization: `Bearer ${process.env.ADERRA_API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ prompt: 'Waves crash against a lighthouse at dusk, slow push in', mode: 'text', duration: 5, }), signal: AbortSignal.timeout(900_000),});const { data } = await r.json();const clip = await fetch(data[0].url);fs.writeFileSync('clip.mp4', Buffer.from(await clip.arrayBuffer()));{ "created": 1762948800, "data": [{ "url": "https://...", "duration_seconds": 5, "mode": "text" }]}Response: application/json
mode |
What it makes | What it uses | Model (standard / explicit) |
|---|---|---|---|
text |
A clip from the prompt alone | Nothing else | minimax-h3 / sd-fast |
image |
Your most recent image, animated | 1 image, or 2 with end_frame |
minimax-h3 / minimax-h3-spicy |
reference |
A new clip that keeps the subject, style or motion of its references | Up to 8 images (image_count) and up to 3 earlier clips (reference_video_count); at least one |
minimax-h3 / sd-fast |
edit |
An earlier clip, changed as the prompt says | 1 clip (source_video), and optionally 1 image (image_count: 1) |
wan-edit / sd-edit |
The response’s mode says which mode ran.
Where the inputs come from
Section titled “Where the inputs come from”The request never carries an image, a video or a URL. Inputs are named by position, newest first, and come only from your own account:
- Images are the ones you made with
/v1/images/generations, or sent as animage_urlpart to/v1/chat/completions, within roughly the last two hours. Aderra keeps your 8 most recent. To use a picture of your own, send it in a chat completion right before the video call. - Clips are the ones this account made in the last 7 days, through the API or in the Aderra app, and videos uploaded in the Aderra app (kept for 7 days).
source_video: 1is the newest.video_originlimits the count to one kind. Aderra keeps only the link the model returned, not the file, so edit a clip soon after making it.
For example, to animate a photo from its first frame to a second photo:
{ "prompt": "She turns and walks out of frame", "mode": "image", "end_frame": true }To make a new clip from your two latest images and your latest clip:
{ "prompt": "The same character, now running through rain", "mode": "reference", "image_count": 2, "reference_video_count": 1 }To edit the clip before your latest one:
{ "prompt": "Make it snow", "mode": "edit", "source_video": 2 }Uncensored video
Section titled “Uncensored video”explicit: true picks each mode’s uncensored model (sd-fast, minimax-h3-spicy or sd-edit), within the content policy. It is used only when the prompt asks for nudity or sex; any other prompt is made by the standard model, at the standard price. Naming an uncensored model in model works the same way.
sd-fast cannot use images as references: in reference mode with explicit, send image_count: 0 and at least one reference_video_count. Images are refused with reference_images_unavailable.
Prices
Section titled “Prices”Each model’s price per second, for each mode, is in the Video models table. A clip costs that price times its length, held before the clip is made and charged only when it is delivered.
In GET /v1/usage/prices, each video entry’s per_second is the model’s text and image price. A reference clip costs more: $0.18 a second on minimax-h3, $0.30 on sd-fast.
How it works
Section titled “How it works”- The call is synchronous and slow. The connection stays open until the clip is finished: seconds for a short
textclip, several minutes for an edit or an uncensored clip. Aderra gives up after 9 minutes, and charges nothing. Set your HTTP client’s timeout to at least 10 minutes. If the connection drops, the clip may still be made and charged. - Download the clip straight away.
data[0].urlpoints to the finished file. Aderra does not keep a copy, and the link does not last. - Refusals. When a standard model refuses the prompt, Aderra rewords it once and tries again;
prompt_rewritten: truethen appears in the response. Animageclip still refused may be made once more onminimax-h3-open, at that model’s price. A clip refused in the end is not charged.
Errors
Section titled “Errors”| Status | error |
What to do |
|---|---|---|
| 400 | invalid_json, missing_prompt |
Send a JSON body with a non-empty prompt |
| 400 | invalid_duration |
duration must be a whole number above 0 |
| 400 | invalid_mode |
mode must be one of modes in the response |
| 400 | invalid_image_count, invalid_reference_video_count |
A whole number from 0 to max in the response |
| 400 | invalid_source_video, invalid_end_frame, invalid_video_origin, invalid_explicit |
Fix the field’s value |
| 400 | image_required |
image mode with no recent image: generate or send an image first |
| 400 | end_frame_requires_two_images |
end_frame needs two recent images |
| 400 | reference_required |
reference mode found no image or clip to use |
| 400 | source_video_required |
edit mode found no clip at that position |
| 400 | reference_images_unavailable |
The model takes only clips as references: send image_count: 0 |
| 400 | video_mode_unavailable |
The model does not make that mode: drop model, or pick one from Video models |
| 402 | api_wallet_empty, key_spend_cap_reached |
Add funds, or raise the key’s cap |
| 422 | video_content_refused |
The model refused the prompt. Not charged. Reword it |
| 502 | video_failed |
The model failed. Not charged. Try again |
The 400 errors from image_required down also carry a message in plain English. See Errors for the shapes and the limits every endpoint shares.