Compose API: render video from a JSON timeline
The compose job renders finished video from a declarative JSON timeline. Tracks, clips, transitions, text, per-clip effects, and scene-first authoring.
The compose job renders finished video from a JSON timeline. Tracks hold clips. Clips reference video, image, audio, or text assets. Transitions sit between them. You POST the timeline and get an MP4 back, with progress streamed while it renders.
compose from the JSON timeline below. No editor, no template.What the timeline covers
The timeline covers real editing work, not a fixed template. Per-clip effects include color grading, seven look presets, chroma key, seven blend modes, Ken Burns motion, speed control, blur, sharpen, crop, flip, and keyframed opacity with easing. Text carries font, stroke, background, position, entrance animations, and a drop shadow. Output goes to MP4, WebM, GIF, MP3, or a JPG or PNG still of any frame.
import { createClient, outputUrl } from "@rendobar/sdk";
const client = createClient({ apiKey: "rb_YOUR_KEY" });
const job = await client.jobs.create({ type: "compose", params: { schemaVersion: 1, output: { format: "mp4", resolution: { width: 1080, height: 1920 }, fps: 30 }, timeline: { tracks: [{ clips: [ { asset: { type: "video", src: "https://cdn.rendobar.com/assets/examples/sea.mp4" }, start: 0, length: 4 }, { type: "transition", transition: "crossfade", duration: 1 }, { asset: { type: "video", src: "https://cdn.rendobar.com/assets/examples/sample.mp4" }, start: 3, length: 4 }, ], }], }, },});
console.log(outputUrl(await client.jobs.wait(job.id)));- Two authoring shapes: primitive
tracksfor direct multi-track control, andsceneswith globaloverlaysfor sequential editing. Both compile to the same engine. - A clip can hold a nested timeline, so a whole composition drops onto a track as one unit.
- Live progress streams percent, fps, and render speed while the job runs.
See the Compose API page for a tour of every capability with real renders, or start from the compose reference.
