Endpoints
Videos
Any scene you can describe, from a prompt and up to 12 reference pictures, with no editorial filter. The model is tuned for UGC and product placement: keep a product, a face or a style from your references, and people on screen can say your line in their own voice. A take runs in the background: start it, then poll it, follow it live, or let Rend call your webhook when it is done.
POSThttps://rend.ai/api/v1/videos
GEThttps://rend.ai/api/v1/videos/{id}
GEThttps://rend.ai/api/v1/videos/{id}/events
GEThttps://rend.ai/api/v1/videos/{id}/content
Start a take
POSThttps://rend.ai/api/v1/videos
The take’s price is quoted and held when it starts, and charged only when the video is delivered. size and seconds in the reply are what Rend renders: with dialogue, the take is fitted to the line and priced at that length.
A take that fails costs nothing. You pay only when the video is delivered.
Request body
| Field | Type | Description |
|---|---|---|
prompt |
string required | What happens in the shot, up to 8,000 characters. Refer to a person picture by its name, as @Maya. |
model |
string | rend-video. |
seconds |
integer | Length, 4 to 15 seconds. Default 5. With dialogue it is the most the take may run; the take is fitted to the line. |
size |
string | 1280x720, 720x1280, 1024x1024, 1920x1080 or 1080x1920, or any WIDTHxHEIGHT with both sides multiples of 32 from 320 to 1536 and the short side at most 768. Default 1280x720. The reply shows the size rendered. Bigger takes cost more. |
images |
array | Up to 12 reference pictures in all. Each is an https address, a data URI or plain base64, or an object { "url" or "b64_json", "role", "name" }. Roles: person, product, place, style or reference (the default). PNG, JPEG or WebP, up to 16 MB each. |
input_reference |
string | One picture that sets the opening frame. It guides the opening; it is not copied pixel for pixel. Counts toward the 12. |
dialogue |
string | A line the person on screen speaks, up to 400 characters, in the take’s own voice with matching lips and room sound. |
callback_url |
string | A public https address Rend calls once when the take completes or fails. See Webhooks. |
seed |
integer | A whole number for more repeatable takes. Random when left out. |
store |
boolean | false deletes the saved file after 24 hours, whatever the plan. The default is true. |
project |
string | A project id of yours. The finished video is also added to that project’s media. |
folder |
string | The Library folder to save in, made if missing. The default is API. |
tags |
array | Up to 10 short words added to the file’s tags in the Library. |
- People need a picture. Give each person a
personpicture and a name, then use@Namein the prompt. A name with no picture is refused. - Products must be in the prompt. A
productpicture has to be mentioned in the prompt, or the request is refused with a message saying how to place it. - Safe retries. Send an
Idempotency-Keyheader (up to 128 letters, digits and_.:-). A repeat with the same key returns the first video instead of starting and charging another. - The request body may be up to 48 MB, for base64 pictures.
curl https://api.rend.ai/v1/videos \
-H "Authorization: Bearer $REND_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-take-1" \
-d '{
"model": "rend-video",
"prompt": "Handheld selfie video. @Maya stands in a sunny kitchen and holds up the face cream jar toward the camera.",
"images": [
{"url": "https://example.com/maya.jpg", "role": "person", "name": "Maya"},
{"url": "https://example.com/face-cream.png", "role": "product", "name": "face cream jar"}
],
"dialogue": "I did not expect this to work in a week.",
"seconds": 8,
"size": "720x1280",
"callback_url": "https://example.com/hooks/rend"
}'import os, requests
headers = {"Authorization": f"Bearer {os.environ['REND_API_KEY']}"}
video = requests.post("https://api.rend.ai/v1/videos", headers=headers, json={
"model": "rend-video",
"prompt": "Handheld selfie video. @Maya stands in a sunny kitchen and holds up the face cream jar toward the camera.",
"images": [
{"url": "https://example.com/maya.jpg", "role": "person", "name": "Maya"},
{"url": "https://example.com/face-cream.png", "role": "product", "name": "face cream jar"},
],
"dialogue": "I did not expect this to work in a week.",
"seconds": 8,
"size": "720x1280",
}).json()
print(video["id"], video["status"], video["price"]["usd"])const response = await fetch("https://api.rend.ai/v1/videos", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.REND_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
model: "rend-video",
prompt: "Handheld selfie video. @Maya stands in a sunny kitchen and holds up the face cream jar toward the camera.",
images: [
{ url: "https://example.com/maya.jpg", role: "person", name: "Maya" },
{ url: "https://example.com/face-cream.png", role: "product", name: "face cream jar" },
],
dialogue: "I did not expect this to work in a week.",
seconds: 8,
size: "720x1280",
}),
});
const video = await response.json();
console.log(video.id, video.status, video.price.usd);{
"id": "video_3f9a0c...",
"object": "video",
"model": "rend-video",
"status": "queued",
"progress": 0,
"seconds": 4,
"size": "640x1152",
"created_at": 1796500000,
"completed_at": null,
"price": { "usd": 0.59, "microusd": 590000, "charged": null },
"error": null,
"callback_secret": "whsec_..."
}Check on a take
GEThttps://rend.ai/api/v1/videos/{id}
status |
Meaning |
|---|---|
queued |
Waiting for a free video lane. It starts on its own; no need to retry. |
in_progress |
Being made and checked. progress runs from 0 to 100. |
completed |
Ready, and saved in your Library. The object has file_id, url (a download link that works for 24 hours, until url_expires_at) and expires_at (when the file is deleted, or null while you keep it; see Where results go). Fetch the object again for a fresh link. price.charged is true. |
failed |
Not made. error has a message and a code, and price.charged is false: nothing was charged. |
Failure codes include generation_failed, content_withheld, check_failed, queue_timeout, canceled and insufficient_credit. Every finished video is checked before it is delivered; a video that can’t be delivered is withheld and never charged. Most takes take a minute or two. Poll every 10 seconds or so, follow it live, or use callback_url and skip polling. A video id is only visible to its own account.
curl https://api.rend.ai/v1/videos/video_3f9a0c... -H "Authorization: Bearer $REND_API_KEY"import time
while video["status"] not in ("completed", "failed"):
time.sleep(10)
video = requests.get(f"https://api.rend.ai/v1/videos/{video['id']}", headers=headers).json()
print(video["status"], video.get("url"))let take = video;
while (!["completed", "failed"].includes(take.status)) {
await new Promise(resolve => setTimeout(resolve, 10_000));
take = await (await fetch(`https://api.rend.ai/v1/videos/${take.id}`, { headers: { Authorization: `Bearer ${process.env.REND_API_KEY}` } })).json();
}
console.log(take.status, take.url);Follow a take live
GEThttps://rend.ai/api/v1/videos/{id}/events
The take’s progress as server-sent events, so your app can show it without polling. The first event is the take’s state right now. A video.progress event follows each time status or progress changes, and the stream ends with video.completed or video.failed, carrying the same body as the webhook. Each event’s data is the video object.
A stream lasts up to 10 minutes. If the take is still running then, or your connection drops, open it again: it starts with the current state, so you miss nothing. Comment lines (: keep-alive) hold the connection open; skip them.
curl -N https://api.rend.ai/v1/videos/video_3f9a0c.../events -H "Authorization: Bearer $REND_API_KEY"import json
with requests.get(f"https://api.rend.ai/v1/videos/{video['id']}/events", headers=headers, stream=True) as events:
for line in events.iter_lines(decode_unicode=True):
if line.startswith("data: "):
event = json.loads(line[6:])
print(event["type"], event["data"]["progress"])const response = await fetch(`https://api.rend.ai/v1/videos/${video.id}/events`, { headers: { Authorization: `Bearer ${process.env.REND_API_KEY}` } });
const decoder = new TextDecoder();
let buffer = "";
for await (const chunk of response.body) {
buffer += decoder.decode(chunk, { stream: true });
const parts = buffer.split("\n\n");
buffer = parts.pop();
for (const part of parts) {
const data = part.split("\n").find(line => line.startsWith("data: "));
if (data) { const event = JSON.parse(data.slice(6)); console.log(event.type, event.data.progress); }
}
}event: video.progress
data: {"id":"video_3f9a0c...:in_progress:42","type":"video.progress","created":1796500060,"data":{"id":"video_3f9a0c...","status":"in_progress","progress":42,...}}
event: video.completed
data: {"id":"evt_...","type":"video.completed","created":1796500120,"data":{"id":"video_3f9a0c...","status":"completed","progress":100,...}}Download the video
GEThttps://rend.ai/api/v1/videos/{id}/content
Redirects to the MP4 once the take is completed. Before that, or after a failure, it returns a 409 with code video_not_ready; once the file is deleted, a 410 with code file_deleted. The same file is at /v1/files/{file_id}/content.
curl -L https://api.rend.ai/v1/videos/video_3f9a0c.../content \
-H "Authorization: Bearer $REND_API_KEY" -o take.mp4Price
A take is priced the way Rend prices takes in the app: a fixed part per take plus a rate for the work it needs, which grows with its length and size and with each reference picture. A take that shows a person needs about twice the work, so it costs more. The create call returns the exact price before anything runs, and that is all you pay. A take that fails or is withheld is free.
GET /v1/models lists rend-video with the live fixed_usd and per_expected_gpu_second_usd, plus worked examples. A queued take is priced again when it starts, and its reply shows the new price.
Errors
| Status | Code | Why |
|---|---|---|
| 400 | (varies) | A bad field, a person named with no picture, or a product not placed in the prompt. The message says what to change. |
| 402 | insufficient_credit |
Not enough credit for the quoted price. |
| 403 | email_unverified |
Verify your account’s email first. |
| 403 | project_not_owned |
project is shared with you; files can only join your own projects. |
| 404 | project_not_found |
No project with that id on this account. Nothing is charged. |
| 404 | (none) | No video with that id on your account. |
| 409 | video_not_ready |
/content before the take completed. |
| 410 | file_deleted |
/content after the video’s file was deleted. |
| 413 | (none) | The request is too large, or your storage is full. |
| 503 | (none) | Video is briefly unavailable. Nothing is charged. |