Get a render
One render and its files.
curl https://api.muzekit.com/v1/renders/rnd_vQ8VEOnjY5H \
-H "Authorization: Bearer $MUZEKIT_SECRET_KEY"const res = await fetch("https://api.muzekit.com/v1/renders/rnd_vQ8VEOnjY5H", {
headers: { Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}` },
});
const render = await res.json();import os
import requests
render = requests.get(
"https://api.muzekit.com/v1/renders/rnd_vQ8VEOnjY5H",
headers={"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"},
).json()Answers the same object as Render a template. status is queued or processing while a video, a batch item or a large render runs, then succeeded or failed; a failed render has an error and no outputs. A video's outputs carry their duration in seconds, and the render its video_seconds.
Any render of this environment can be read here: ones you asked for (trigger: "api"), render on save ("save") and videos your users downloaded in the editor or files their AI app made ("download"). A render still queued or rendering after an hour is marked failed with render_interrupted; render it again.
Examples
Poll a render until it's ready
Use this for a video or a batch item, which answer before their files exist. Wait a few seconds between calls.
until curl -s https://api.muzekit.com/v1/renders/rnd_vQ8VEOnjY5H \
-H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
| jq -e '.status == "succeeded" or .status == "failed"' > /dev/null
do sleep 5; doneasync function waitForRender(id) {
const url = `https://api.muzekit.com/v1/renders/${id}`;
const auth = { Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}` };
for (;;) {
const render = await (await fetch(url, { headers: auth })).json();
if (render.status === "succeeded" || render.status === "failed") return render;
await new Promise((resolve) => setTimeout(resolve, 5000));
}
}
const render = await waitForRender("rnd_vQ8VEOnjY5H");import os
import time
import requests
def wait_for_render(render_id):
url = f"https://api.muzekit.com/v1/renders/{render_id}"
auth = {"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"}
while True:
render = requests.get(url, headers=auth).json()
if render["status"] in ("succeeded", "failed"):
return render
time.sleep(5)
render = wait_for_render("rnd_vQ8VEOnjY5H")If your server takes webhooks, render.succeeded and render.failed tell you the same thing without polling.
Keep the files before they expire
Output URLs work until expires_at. Copy the files to your own storage when you need them longer.
curl -s https://api.muzekit.com/v1/renders/rnd_vQ8VEOnjY5H \
-H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
| jq -r '.outputs[].url' \
| xargs -n 1 curl -s -Oimport { writeFile } from "node:fs/promises";
const res = await fetch("https://api.muzekit.com/v1/renders/rnd_vQ8VEOnjY5H", {
headers: { Authorization: `Bearer ${process.env.MUZEKIT_SECRET_KEY}` },
});
const render = await res.json();
for (const output of render.outputs) {
const file = await fetch(output.url);
const name = output.url.split("/").pop();
await writeFile(name, Buffer.from(await file.arrayBuffer()));
}import os
import requests
render = requests.get(
"https://api.muzekit.com/v1/renders/rnd_vQ8VEOnjY5H",
headers={"Authorization": f"Bearer {os.environ['MUZEKIT_SECRET_KEY']}"},
).json()
for output in render["outputs"]:
name = output["url"].rsplit("/", 1)[-1]
with open(name, "wb") as f:
f.write(requests.get(output["url"]).content)The file URLs are public and need no key.
Response
A finished video:
{
"object": "render",
"id": "rnd_vQ8VEOnjY5H",
"status": "succeeded",
"template": "tpl_Vk1t4l9xvQv",
"revision": 4,
"trigger": "api",
"livemode": true,
"format": "mp4",
"pages": [1],
"outputs": [
{
"page": 1,
"part": null,
"url": "https://storage.muzekit.com/r/d90/…/1.mp4",
"content_type": "video/mp4",
"duration": 8
}
],
"video_seconds": 8,
"warnings": [],
"error": null,
"duration_ms": 41870,
"created_at": "2026-11-29T10:02:13.004Z",
"completed_at": "2026-11-29T10:02:54.874Z",
"expires_at": "2027-02-27T10:02:54.874Z"
}A failed one has no outputs and says why:
{
"object": "render",
"id": "rnd_vQ8VEOnjY5H",
"status": "failed",
"outputs": [],
"error": {
"code": "video_limit",
"message": "…"
}
}404 render_not_found when no render of this environment has the id.