curl --request POST \
--url https://api.framelane.io/v1/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"render_request": {
"width": 1920,
"height": 1080,
"duration": 15,
"frame_rate": 30,
"output_format": "mp4",
"output_filename": "my-render",
"background_color": "#000000ff",
"background_image_url": "https://cdn.example.com/bg.jpg",
"alpha": false,
"elements": [
{
"source_url": "https://cdn.example.com/clip.mp4",
"lut_url": "<string>",
"lut_intensity": 100,
"brightness": 0,
"contrast": 0,
"saturation": 0,
"exposure": 0,
"sharpness": 0,
"blur": 0,
"noise": 0,
"vignette": 0,
"hue_rotate": 0,
"temperature": 0,
"tint": 0,
"vibrance": 0,
"highlights": 0,
"shadows": 0,
"crop_top": 0,
"crop_bottom": 0,
"crop_left": 0,
"crop_right": 0,
"border_radius": 0,
"border_color": "<string>",
"border_width": 0,
"shadow_color": "<string>",
"shadow_blur": 0,
"shadow_x": 0,
"shadow_y": 0,
"x": "50%",
"y": "50%",
"width": "100%",
"height": "100%",
"aspect_ratio": 123,
"x_anchor": "50%",
"y_anchor": "50%",
"x_rotation": "0°",
"y_rotation": "0°",
"z_rotation": "0°",
"x_scale": "100%",
"y_scale": "100%",
"flip_horizontal": false,
"flip_vertical": false,
"opacity": 100,
"z_index": 123,
"blend_mode": "none",
"mask": {
"feather": 0,
"scale": 1,
"center": {
"x": 0.5,
"y": 0.5
}
},
"mask_keyframes": [
{
"time": 1,
"feather": 123,
"scale": 123,
"center": {
"x": 0.5,
"y": 0.5
},
"easing": "<string>"
}
],
"matte": {
"source": "<string>",
"mode": "alpha",
"invert": false
},
"backdrop_blur": 0,
"clip": false,
"color_overlay": "<string>",
"type": "video",
"id": "clip_01",
"name": "<string>",
"track": 127,
"time": 0,
"visible": true,
"in_point": 0,
"out_point": 6,
"speed": 1,
"playback_rate_keyframes": [
{
"time": 1,
"rate": 1
}
],
"volume": 100,
"fade_in_duration": 0,
"fade_out_duration": 0,
"effects": [],
"motion": []
}
],
"transitions": [
{
"type": "fade",
"duration": 0.5,
"from_id": "video_01",
"to_id": "video_02",
"z_index": 1
}
],
"groups": [
{
"id": "hero",
"parent": "<string>",
"pivot": {
"x": 0.5,
"y": 0.5
},
"translate": {
"x": 0.5,
"y": 0.5
},
"scale": 1,
"rotation_degrees": 0,
"opacity": 1,
"members": [
"<string>"
],
"animations": [],
"layout": {
"type": "stack",
"direction": "row",
"gap": 0,
"align": "center",
"origin": {
"x": 0.5,
"y": 0.5
}
}
}
],
"motion_blur": {
"samples": 17,
"shutter": 0.5
},
"background_gradient": {
"stops": [
{
"offset": 0.5,
"color": "#e07a4f"
}
],
"kind": "linear",
"angle_degrees": 0
},
"watermark_url": "<string>",
"custom_animations": {
"element": [],
"text": []
},
"metadata": {
"project_id": "proj_123"
},
"webhook_url": "https://app.example.com/hooks/framelane",
"ingest_external": true
},
"at": 1,
"window": {
"from": 1,
"to": 123
},
"contact_sheet": {
"detail": "balanced",
"columns": 6,
"max_cells": 32
},
"width": 1928,
"dry_run": false,
"target_duration_sec": 1,
"target_tolerance_sec": 0.5
}
'import requests
url = "https://api.framelane.io/v1/preview"
payload = {
"render_request": {
"width": 1920,
"height": 1080,
"duration": 15,
"frame_rate": 30,
"output_format": "mp4",
"output_filename": "my-render",
"background_color": "#000000ff",
"background_image_url": "https://cdn.example.com/bg.jpg",
"alpha": False,
"elements": [
{
"source_url": "https://cdn.example.com/clip.mp4",
"lut_url": "<string>",
"lut_intensity": 100,
"brightness": 0,
"contrast": 0,
"saturation": 0,
"exposure": 0,
"sharpness": 0,
"blur": 0,
"noise": 0,
"vignette": 0,
"hue_rotate": 0,
"temperature": 0,
"tint": 0,
"vibrance": 0,
"highlights": 0,
"shadows": 0,
"crop_top": 0,
"crop_bottom": 0,
"crop_left": 0,
"crop_right": 0,
"border_radius": 0,
"border_color": "<string>",
"border_width": 0,
"shadow_color": "<string>",
"shadow_blur": 0,
"shadow_x": 0,
"shadow_y": 0,
"x": "50%",
"y": "50%",
"width": "100%",
"height": "100%",
"aspect_ratio": 123,
"x_anchor": "50%",
"y_anchor": "50%",
"x_rotation": "0°",
"y_rotation": "0°",
"z_rotation": "0°",
"x_scale": "100%",
"y_scale": "100%",
"flip_horizontal": False,
"flip_vertical": False,
"opacity": 100,
"z_index": 123,
"blend_mode": "none",
"mask": {
"feather": 0,
"scale": 1,
"center": {
"x": 0.5,
"y": 0.5
}
},
"mask_keyframes": [
{
"time": 1,
"feather": 123,
"scale": 123,
"center": {
"x": 0.5,
"y": 0.5
},
"easing": "<string>"
}
],
"matte": {
"source": "<string>",
"mode": "alpha",
"invert": False
},
"backdrop_blur": 0,
"clip": False,
"color_overlay": "<string>",
"type": "video",
"id": "clip_01",
"name": "<string>",
"track": 127,
"time": 0,
"visible": True,
"in_point": 0,
"out_point": 6,
"speed": 1,
"playback_rate_keyframes": [
{
"time": 1,
"rate": 1
}
],
"volume": 100,
"fade_in_duration": 0,
"fade_out_duration": 0,
"effects": [],
"motion": []
}
],
"transitions": [
{
"type": "fade",
"duration": 0.5,
"from_id": "video_01",
"to_id": "video_02",
"z_index": 1
}
],
"groups": [
{
"id": "hero",
"parent": "<string>",
"pivot": {
"x": 0.5,
"y": 0.5
},
"translate": {
"x": 0.5,
"y": 0.5
},
"scale": 1,
"rotation_degrees": 0,
"opacity": 1,
"members": ["<string>"],
"animations": [],
"layout": {
"type": "stack",
"direction": "row",
"gap": 0,
"align": "center",
"origin": {
"x": 0.5,
"y": 0.5
}
}
}
],
"motion_blur": {
"samples": 17,
"shutter": 0.5
},
"background_gradient": {
"stops": [
{
"offset": 0.5,
"color": "#e07a4f"
}
],
"kind": "linear",
"angle_degrees": 0
},
"watermark_url": "<string>",
"custom_animations": {
"element": [],
"text": []
},
"metadata": { "project_id": "proj_123" },
"webhook_url": "https://app.example.com/hooks/framelane",
"ingest_external": True
},
"at": 1,
"window": {
"from": 1,
"to": 123
},
"contact_sheet": {
"detail": "balanced",
"columns": 6,
"max_cells": 32
},
"width": 1928,
"dry_run": False,
"target_duration_sec": 1,
"target_tolerance_sec": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
render_request: {
width: 1920,
height: 1080,
duration: 15,
frame_rate: 30,
output_format: 'mp4',
output_filename: 'my-render',
background_color: '#000000ff',
background_image_url: 'https://cdn.example.com/bg.jpg',
alpha: false,
elements: [
{
source_url: 'https://cdn.example.com/clip.mp4',
lut_url: '<string>',
lut_intensity: 100,
brightness: 0,
contrast: 0,
saturation: 0,
exposure: 0,
sharpness: 0,
blur: 0,
noise: 0,
vignette: 0,
hue_rotate: 0,
temperature: 0,
tint: 0,
vibrance: 0,
highlights: 0,
shadows: 0,
crop_top: 0,
crop_bottom: 0,
crop_left: 0,
crop_right: 0,
border_radius: 0,
border_color: '<string>',
border_width: 0,
shadow_color: '<string>',
shadow_blur: 0,
shadow_x: 0,
shadow_y: 0,
x: '50%',
y: '50%',
width: '100%',
height: '100%',
aspect_ratio: 123,
x_anchor: '50%',
y_anchor: '50%',
x_rotation: '0°',
y_rotation: '0°',
z_rotation: '0°',
x_scale: '100%',
y_scale: '100%',
flip_horizontal: false,
flip_vertical: false,
opacity: 100,
z_index: 123,
blend_mode: 'none',
mask: {feather: 0, scale: 1, center: {x: 0.5, y: 0.5}},
mask_keyframes: [
{
time: 1,
feather: 123,
scale: 123,
center: {x: 0.5, y: 0.5},
easing: '<string>'
}
],
matte: {source: '<string>', mode: 'alpha', invert: false},
backdrop_blur: 0,
clip: false,
color_overlay: '<string>',
type: 'video',
id: 'clip_01',
name: '<string>',
track: 127,
time: 0,
visible: true,
in_point: 0,
out_point: 6,
speed: 1,
playback_rate_keyframes: [{time: 1, rate: 1}],
volume: 100,
fade_in_duration: 0,
fade_out_duration: 0,
effects: [],
motion: []
}
],
transitions: [
{
type: 'fade',
duration: 0.5,
from_id: 'video_01',
to_id: 'video_02',
z_index: 1
}
],
groups: [
{
id: 'hero',
parent: '<string>',
pivot: {x: 0.5, y: 0.5},
translate: {x: 0.5, y: 0.5},
scale: 1,
rotation_degrees: 0,
opacity: 1,
members: ['<string>'],
animations: [],
layout: {
type: 'stack',
direction: 'row',
gap: 0,
align: 'center',
origin: {x: 0.5, y: 0.5}
}
}
],
motion_blur: {samples: 17, shutter: 0.5},
background_gradient: {stops: [{offset: 0.5, color: '#e07a4f'}], kind: 'linear', angle_degrees: 0},
watermark_url: '<string>',
custom_animations: {element: [], text: []},
metadata: {project_id: 'proj_123'},
webhook_url: 'https://app.example.com/hooks/framelane',
ingest_external: true
},
at: 1,
window: {from: 1, to: 123},
contact_sheet: {detail: 'balanced', columns: 6, max_cells: 32},
width: 1928,
dry_run: false,
target_duration_sec: 1,
target_tolerance_sec: 0.5
})
};
fetch('https://api.framelane.io/v1/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.framelane.io/v1/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'render_request' => [
'width' => 1920,
'height' => 1080,
'duration' => 15,
'frame_rate' => 30,
'output_format' => 'mp4',
'output_filename' => 'my-render',
'background_color' => '#000000ff',
'background_image_url' => 'https://cdn.example.com/bg.jpg',
'alpha' => false,
'elements' => [
[
'source_url' => 'https://cdn.example.com/clip.mp4',
'lut_url' => '<string>',
'lut_intensity' => 100,
'brightness' => 0,
'contrast' => 0,
'saturation' => 0,
'exposure' => 0,
'sharpness' => 0,
'blur' => 0,
'noise' => 0,
'vignette' => 0,
'hue_rotate' => 0,
'temperature' => 0,
'tint' => 0,
'vibrance' => 0,
'highlights' => 0,
'shadows' => 0,
'crop_top' => 0,
'crop_bottom' => 0,
'crop_left' => 0,
'crop_right' => 0,
'border_radius' => 0,
'border_color' => '<string>',
'border_width' => 0,
'shadow_color' => '<string>',
'shadow_blur' => 0,
'shadow_x' => 0,
'shadow_y' => 0,
'x' => '50%',
'y' => '50%',
'width' => '100%',
'height' => '100%',
'aspect_ratio' => 123,
'x_anchor' => '50%',
'y_anchor' => '50%',
'x_rotation' => '0°',
'y_rotation' => '0°',
'z_rotation' => '0°',
'x_scale' => '100%',
'y_scale' => '100%',
'flip_horizontal' => false,
'flip_vertical' => false,
'opacity' => 100,
'z_index' => 123,
'blend_mode' => 'none',
'mask' => [
'feather' => 0,
'scale' => 1,
'center' => [
'x' => 0.5,
'y' => 0.5
]
],
'mask_keyframes' => [
[
'time' => 1,
'feather' => 123,
'scale' => 123,
'center' => [
'x' => 0.5,
'y' => 0.5
],
'easing' => '<string>'
]
],
'matte' => [
'source' => '<string>',
'mode' => 'alpha',
'invert' => false
],
'backdrop_blur' => 0,
'clip' => false,
'color_overlay' => '<string>',
'type' => 'video',
'id' => 'clip_01',
'name' => '<string>',
'track' => 127,
'time' => 0,
'visible' => true,
'in_point' => 0,
'out_point' => 6,
'speed' => 1,
'playback_rate_keyframes' => [
[
'time' => 1,
'rate' => 1
]
],
'volume' => 100,
'fade_in_duration' => 0,
'fade_out_duration' => 0,
'effects' => [
],
'motion' => [
]
]
],
'transitions' => [
[
'type' => 'fade',
'duration' => 0.5,
'from_id' => 'video_01',
'to_id' => 'video_02',
'z_index' => 1
]
],
'groups' => [
[
'id' => 'hero',
'parent' => '<string>',
'pivot' => [
'x' => 0.5,
'y' => 0.5
],
'translate' => [
'x' => 0.5,
'y' => 0.5
],
'scale' => 1,
'rotation_degrees' => 0,
'opacity' => 1,
'members' => [
'<string>'
],
'animations' => [
],
'layout' => [
'type' => 'stack',
'direction' => 'row',
'gap' => 0,
'align' => 'center',
'origin' => [
'x' => 0.5,
'y' => 0.5
]
]
]
],
'motion_blur' => [
'samples' => 17,
'shutter' => 0.5
],
'background_gradient' => [
'stops' => [
[
'offset' => 0.5,
'color' => '#e07a4f'
]
],
'kind' => 'linear',
'angle_degrees' => 0
],
'watermark_url' => '<string>',
'custom_animations' => [
'element' => [
],
'text' => [
]
],
'metadata' => [
'project_id' => 'proj_123'
],
'webhook_url' => 'https://app.example.com/hooks/framelane',
'ingest_external' => true
],
'at' => 1,
'window' => [
'from' => 1,
'to' => 123
],
'contact_sheet' => [
'detail' => 'balanced',
'columns' => 6,
'max_cells' => 32
],
'width' => 1928,
'dry_run' => false,
'target_duration_sec' => 1,
'target_tolerance_sec' => 0.5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.framelane.io/v1/preview"
payload := strings.NewReader("{\n \"render_request\": {\n \"width\": 1920,\n \"height\": 1080,\n \"duration\": 15,\n \"frame_rate\": 30,\n \"output_format\": \"mp4\",\n \"output_filename\": \"my-render\",\n \"background_color\": \"#000000ff\",\n \"background_image_url\": \"https://cdn.example.com/bg.jpg\",\n \"alpha\": false,\n \"elements\": [\n {\n \"source_url\": \"https://cdn.example.com/clip.mp4\",\n \"lut_url\": \"<string>\",\n \"lut_intensity\": 100,\n \"brightness\": 0,\n \"contrast\": 0,\n \"saturation\": 0,\n \"exposure\": 0,\n \"sharpness\": 0,\n \"blur\": 0,\n \"noise\": 0,\n \"vignette\": 0,\n \"hue_rotate\": 0,\n \"temperature\": 0,\n \"tint\": 0,\n \"vibrance\": 0,\n \"highlights\": 0,\n \"shadows\": 0,\n \"crop_top\": 0,\n \"crop_bottom\": 0,\n \"crop_left\": 0,\n \"crop_right\": 0,\n \"border_radius\": 0,\n \"border_color\": \"<string>\",\n \"border_width\": 0,\n \"shadow_color\": \"<string>\",\n \"shadow_blur\": 0,\n \"shadow_x\": 0,\n \"shadow_y\": 0,\n \"x\": \"50%\",\n \"y\": \"50%\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"aspect_ratio\": 123,\n \"x_anchor\": \"50%\",\n \"y_anchor\": \"50%\",\n \"x_rotation\": \"0°\",\n \"y_rotation\": \"0°\",\n \"z_rotation\": \"0°\",\n \"x_scale\": \"100%\",\n \"y_scale\": \"100%\",\n \"flip_horizontal\": false,\n \"flip_vertical\": false,\n \"opacity\": 100,\n \"z_index\": 123,\n \"blend_mode\": \"none\",\n \"mask\": {\n \"feather\": 0,\n \"scale\": 1,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n },\n \"mask_keyframes\": [\n {\n \"time\": 1,\n \"feather\": 123,\n \"scale\": 123,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"easing\": \"<string>\"\n }\n ],\n \"matte\": {\n \"source\": \"<string>\",\n \"mode\": \"alpha\",\n \"invert\": false\n },\n \"backdrop_blur\": 0,\n \"clip\": false,\n \"color_overlay\": \"<string>\",\n \"type\": \"video\",\n \"id\": \"clip_01\",\n \"name\": \"<string>\",\n \"track\": 127,\n \"time\": 0,\n \"visible\": true,\n \"in_point\": 0,\n \"out_point\": 6,\n \"speed\": 1,\n \"playback_rate_keyframes\": [\n {\n \"time\": 1,\n \"rate\": 1\n }\n ],\n \"volume\": 100,\n \"fade_in_duration\": 0,\n \"fade_out_duration\": 0,\n \"effects\": [],\n \"motion\": []\n }\n ],\n \"transitions\": [\n {\n \"type\": \"fade\",\n \"duration\": 0.5,\n \"from_id\": \"video_01\",\n \"to_id\": \"video_02\",\n \"z_index\": 1\n }\n ],\n \"groups\": [\n {\n \"id\": \"hero\",\n \"parent\": \"<string>\",\n \"pivot\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"translate\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"scale\": 1,\n \"rotation_degrees\": 0,\n \"opacity\": 1,\n \"members\": [\n \"<string>\"\n ],\n \"animations\": [],\n \"layout\": {\n \"type\": \"stack\",\n \"direction\": \"row\",\n \"gap\": 0,\n \"align\": \"center\",\n \"origin\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n }\n }\n ],\n \"motion_blur\": {\n \"samples\": 17,\n \"shutter\": 0.5\n },\n \"background_gradient\": {\n \"stops\": [\n {\n \"offset\": 0.5,\n \"color\": \"#e07a4f\"\n }\n ],\n \"kind\": \"linear\",\n \"angle_degrees\": 0\n },\n \"watermark_url\": \"<string>\",\n \"custom_animations\": {\n \"element\": [],\n \"text\": []\n },\n \"metadata\": {\n \"project_id\": \"proj_123\"\n },\n \"webhook_url\": \"https://app.example.com/hooks/framelane\",\n \"ingest_external\": true\n },\n \"at\": 1,\n \"window\": {\n \"from\": 1,\n \"to\": 123\n },\n \"contact_sheet\": {\n \"detail\": \"balanced\",\n \"columns\": 6,\n \"max_cells\": 32\n },\n \"width\": 1928,\n \"dry_run\": false,\n \"target_duration_sec\": 1,\n \"target_tolerance_sec\": 0.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.framelane.io/v1/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"render_request\": {\n \"width\": 1920,\n \"height\": 1080,\n \"duration\": 15,\n \"frame_rate\": 30,\n \"output_format\": \"mp4\",\n \"output_filename\": \"my-render\",\n \"background_color\": \"#000000ff\",\n \"background_image_url\": \"https://cdn.example.com/bg.jpg\",\n \"alpha\": false,\n \"elements\": [\n {\n \"source_url\": \"https://cdn.example.com/clip.mp4\",\n \"lut_url\": \"<string>\",\n \"lut_intensity\": 100,\n \"brightness\": 0,\n \"contrast\": 0,\n \"saturation\": 0,\n \"exposure\": 0,\n \"sharpness\": 0,\n \"blur\": 0,\n \"noise\": 0,\n \"vignette\": 0,\n \"hue_rotate\": 0,\n \"temperature\": 0,\n \"tint\": 0,\n \"vibrance\": 0,\n \"highlights\": 0,\n \"shadows\": 0,\n \"crop_top\": 0,\n \"crop_bottom\": 0,\n \"crop_left\": 0,\n \"crop_right\": 0,\n \"border_radius\": 0,\n \"border_color\": \"<string>\",\n \"border_width\": 0,\n \"shadow_color\": \"<string>\",\n \"shadow_blur\": 0,\n \"shadow_x\": 0,\n \"shadow_y\": 0,\n \"x\": \"50%\",\n \"y\": \"50%\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"aspect_ratio\": 123,\n \"x_anchor\": \"50%\",\n \"y_anchor\": \"50%\",\n \"x_rotation\": \"0°\",\n \"y_rotation\": \"0°\",\n \"z_rotation\": \"0°\",\n \"x_scale\": \"100%\",\n \"y_scale\": \"100%\",\n \"flip_horizontal\": false,\n \"flip_vertical\": false,\n \"opacity\": 100,\n \"z_index\": 123,\n \"blend_mode\": \"none\",\n \"mask\": {\n \"feather\": 0,\n \"scale\": 1,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n },\n \"mask_keyframes\": [\n {\n \"time\": 1,\n \"feather\": 123,\n \"scale\": 123,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"easing\": \"<string>\"\n }\n ],\n \"matte\": {\n \"source\": \"<string>\",\n \"mode\": \"alpha\",\n \"invert\": false\n },\n \"backdrop_blur\": 0,\n \"clip\": false,\n \"color_overlay\": \"<string>\",\n \"type\": \"video\",\n \"id\": \"clip_01\",\n \"name\": \"<string>\",\n \"track\": 127,\n \"time\": 0,\n \"visible\": true,\n \"in_point\": 0,\n \"out_point\": 6,\n \"speed\": 1,\n \"playback_rate_keyframes\": [\n {\n \"time\": 1,\n \"rate\": 1\n }\n ],\n \"volume\": 100,\n \"fade_in_duration\": 0,\n \"fade_out_duration\": 0,\n \"effects\": [],\n \"motion\": []\n }\n ],\n \"transitions\": [\n {\n \"type\": \"fade\",\n \"duration\": 0.5,\n \"from_id\": \"video_01\",\n \"to_id\": \"video_02\",\n \"z_index\": 1\n }\n ],\n \"groups\": [\n {\n \"id\": \"hero\",\n \"parent\": \"<string>\",\n \"pivot\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"translate\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"scale\": 1,\n \"rotation_degrees\": 0,\n \"opacity\": 1,\n \"members\": [\n \"<string>\"\n ],\n \"animations\": [],\n \"layout\": {\n \"type\": \"stack\",\n \"direction\": \"row\",\n \"gap\": 0,\n \"align\": \"center\",\n \"origin\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n }\n }\n ],\n \"motion_blur\": {\n \"samples\": 17,\n \"shutter\": 0.5\n },\n \"background_gradient\": {\n \"stops\": [\n {\n \"offset\": 0.5,\n \"color\": \"#e07a4f\"\n }\n ],\n \"kind\": \"linear\",\n \"angle_degrees\": 0\n },\n \"watermark_url\": \"<string>\",\n \"custom_animations\": {\n \"element\": [],\n \"text\": []\n },\n \"metadata\": {\n \"project_id\": \"proj_123\"\n },\n \"webhook_url\": \"https://app.example.com/hooks/framelane\",\n \"ingest_external\": true\n },\n \"at\": 1,\n \"window\": {\n \"from\": 1,\n \"to\": 123\n },\n \"contact_sheet\": {\n \"detail\": \"balanced\",\n \"columns\": 6,\n \"max_cells\": 32\n },\n \"width\": 1928,\n \"dry_run\": false,\n \"target_duration_sec\": 1,\n \"target_tolerance_sec\": 0.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.framelane.io/v1/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"render_request\": {\n \"width\": 1920,\n \"height\": 1080,\n \"duration\": 15,\n \"frame_rate\": 30,\n \"output_format\": \"mp4\",\n \"output_filename\": \"my-render\",\n \"background_color\": \"#000000ff\",\n \"background_image_url\": \"https://cdn.example.com/bg.jpg\",\n \"alpha\": false,\n \"elements\": [\n {\n \"source_url\": \"https://cdn.example.com/clip.mp4\",\n \"lut_url\": \"<string>\",\n \"lut_intensity\": 100,\n \"brightness\": 0,\n \"contrast\": 0,\n \"saturation\": 0,\n \"exposure\": 0,\n \"sharpness\": 0,\n \"blur\": 0,\n \"noise\": 0,\n \"vignette\": 0,\n \"hue_rotate\": 0,\n \"temperature\": 0,\n \"tint\": 0,\n \"vibrance\": 0,\n \"highlights\": 0,\n \"shadows\": 0,\n \"crop_top\": 0,\n \"crop_bottom\": 0,\n \"crop_left\": 0,\n \"crop_right\": 0,\n \"border_radius\": 0,\n \"border_color\": \"<string>\",\n \"border_width\": 0,\n \"shadow_color\": \"<string>\",\n \"shadow_blur\": 0,\n \"shadow_x\": 0,\n \"shadow_y\": 0,\n \"x\": \"50%\",\n \"y\": \"50%\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"aspect_ratio\": 123,\n \"x_anchor\": \"50%\",\n \"y_anchor\": \"50%\",\n \"x_rotation\": \"0°\",\n \"y_rotation\": \"0°\",\n \"z_rotation\": \"0°\",\n \"x_scale\": \"100%\",\n \"y_scale\": \"100%\",\n \"flip_horizontal\": false,\n \"flip_vertical\": false,\n \"opacity\": 100,\n \"z_index\": 123,\n \"blend_mode\": \"none\",\n \"mask\": {\n \"feather\": 0,\n \"scale\": 1,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n },\n \"mask_keyframes\": [\n {\n \"time\": 1,\n \"feather\": 123,\n \"scale\": 123,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"easing\": \"<string>\"\n }\n ],\n \"matte\": {\n \"source\": \"<string>\",\n \"mode\": \"alpha\",\n \"invert\": false\n },\n \"backdrop_blur\": 0,\n \"clip\": false,\n \"color_overlay\": \"<string>\",\n \"type\": \"video\",\n \"id\": \"clip_01\",\n \"name\": \"<string>\",\n \"track\": 127,\n \"time\": 0,\n \"visible\": true,\n \"in_point\": 0,\n \"out_point\": 6,\n \"speed\": 1,\n \"playback_rate_keyframes\": [\n {\n \"time\": 1,\n \"rate\": 1\n }\n ],\n \"volume\": 100,\n \"fade_in_duration\": 0,\n \"fade_out_duration\": 0,\n \"effects\": [],\n \"motion\": []\n }\n ],\n \"transitions\": [\n {\n \"type\": \"fade\",\n \"duration\": 0.5,\n \"from_id\": \"video_01\",\n \"to_id\": \"video_02\",\n \"z_index\": 1\n }\n ],\n \"groups\": [\n {\n \"id\": \"hero\",\n \"parent\": \"<string>\",\n \"pivot\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"translate\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"scale\": 1,\n \"rotation_degrees\": 0,\n \"opacity\": 1,\n \"members\": [\n \"<string>\"\n ],\n \"animations\": [],\n \"layout\": {\n \"type\": \"stack\",\n \"direction\": \"row\",\n \"gap\": 0,\n \"align\": \"center\",\n \"origin\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n }\n }\n ],\n \"motion_blur\": {\n \"samples\": 17,\n \"shutter\": 0.5\n },\n \"background_gradient\": {\n \"stops\": [\n {\n \"offset\": 0.5,\n \"color\": \"#e07a4f\"\n }\n ],\n \"kind\": \"linear\",\n \"angle_degrees\": 0\n },\n \"watermark_url\": \"<string>\",\n \"custom_animations\": {\n \"element\": [],\n \"text\": []\n },\n \"metadata\": {\n \"project_id\": \"proj_123\"\n },\n \"webhook_url\": \"https://app.example.com/hooks/framelane\",\n \"ingest_external\": true\n },\n \"at\": 1,\n \"window\": {\n \"from\": 1,\n \"to\": 123\n },\n \"contact_sheet\": {\n \"detail\": \"balanced\",\n \"columns\": 6,\n \"max_cells\": 32\n },\n \"width\": 1928,\n \"dry_run\": false,\n \"target_duration_sec\": 1,\n \"target_tolerance_sec\": 0.5\n}"
response = http.request(request)
puts response.read_body{
"kind": "<string>",
"ok": true,
"violations": [
{
"code": "<string>",
"message": "<string>",
"severity": "error",
"path": "<string>"
}
],
"job": {
"id": "render_01J8QR2K5VKDGN2T4FBM3CZYX7",
"kind": "render",
"workspace_id": "ws_01J8QR2K5VKDGN2T4FBM3CZYX8",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_preview": false,
"task_type": "transcribe",
"progress_percent": 0,
"progress_stage": "compositing",
"output": {
"url": "https://cdn-user.framelane.io/render_01J.../output.mp4",
"width": 1920,
"height": 1080,
"duration": 15.3,
"size_bytes": 12582912
},
"error": {
"code": "invalid_source",
"message": "Source URL returned 404."
},
"metadata": {
"project_id": "proj_123",
"user_ref": "usr_abc"
},
"completed_at": "2023-11-07T05:31:56Z"
},
"sheet": {
"columns": 123,
"rows": 123,
"width": 123,
"window": {
"from": 1,
"to": 123
},
"cells": [
{
"index": 123,
"at": 123
}
]
}
}{
"kind": "<string>",
"ok": true,
"violations": [
{
"code": "<string>",
"message": "<string>",
"severity": "error",
"path": "<string>"
}
],
"job": {
"id": "render_01J8QR2K5VKDGN2T4FBM3CZYX7",
"kind": "render",
"workspace_id": "ws_01J8QR2K5VKDGN2T4FBM3CZYX8",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_preview": false,
"task_type": "transcribe",
"progress_percent": 0,
"progress_stage": "compositing",
"output": {
"url": "https://cdn-user.framelane.io/render_01J.../output.mp4",
"width": 1920,
"height": 1080,
"duration": 15.3,
"size_bytes": 12582912
},
"error": {
"code": "invalid_source",
"message": "Source URL returned 404."
},
"metadata": {
"project_id": "proj_123",
"user_ref": "usr_abc"
},
"completed_at": "2023-11-07T05:31:56Z"
},
"sheet": {
"columns": 123,
"rows": 123,
"width": 123,
"window": {
"from": 1,
"to": 123
},
"cells": [
{
"index": 123,
"at": 123
}
]
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}Validate or preview a composition
Validate a RenderRequest cheaply, or preview it at a single frame or over a short window without a full render. Pass dry_run: true for the free linter (cross-element and whole-timeline invariants, no render). A pixel preview reuses the exact render pipeline restricted to an outputSlice, so it is faithful to the final export; the returned job is a preview (not billed) that you poll via GET /v1/renders/.
curl --request POST \
--url https://api.framelane.io/v1/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"render_request": {
"width": 1920,
"height": 1080,
"duration": 15,
"frame_rate": 30,
"output_format": "mp4",
"output_filename": "my-render",
"background_color": "#000000ff",
"background_image_url": "https://cdn.example.com/bg.jpg",
"alpha": false,
"elements": [
{
"source_url": "https://cdn.example.com/clip.mp4",
"lut_url": "<string>",
"lut_intensity": 100,
"brightness": 0,
"contrast": 0,
"saturation": 0,
"exposure": 0,
"sharpness": 0,
"blur": 0,
"noise": 0,
"vignette": 0,
"hue_rotate": 0,
"temperature": 0,
"tint": 0,
"vibrance": 0,
"highlights": 0,
"shadows": 0,
"crop_top": 0,
"crop_bottom": 0,
"crop_left": 0,
"crop_right": 0,
"border_radius": 0,
"border_color": "<string>",
"border_width": 0,
"shadow_color": "<string>",
"shadow_blur": 0,
"shadow_x": 0,
"shadow_y": 0,
"x": "50%",
"y": "50%",
"width": "100%",
"height": "100%",
"aspect_ratio": 123,
"x_anchor": "50%",
"y_anchor": "50%",
"x_rotation": "0°",
"y_rotation": "0°",
"z_rotation": "0°",
"x_scale": "100%",
"y_scale": "100%",
"flip_horizontal": false,
"flip_vertical": false,
"opacity": 100,
"z_index": 123,
"blend_mode": "none",
"mask": {
"feather": 0,
"scale": 1,
"center": {
"x": 0.5,
"y": 0.5
}
},
"mask_keyframes": [
{
"time": 1,
"feather": 123,
"scale": 123,
"center": {
"x": 0.5,
"y": 0.5
},
"easing": "<string>"
}
],
"matte": {
"source": "<string>",
"mode": "alpha",
"invert": false
},
"backdrop_blur": 0,
"clip": false,
"color_overlay": "<string>",
"type": "video",
"id": "clip_01",
"name": "<string>",
"track": 127,
"time": 0,
"visible": true,
"in_point": 0,
"out_point": 6,
"speed": 1,
"playback_rate_keyframes": [
{
"time": 1,
"rate": 1
}
],
"volume": 100,
"fade_in_duration": 0,
"fade_out_duration": 0,
"effects": [],
"motion": []
}
],
"transitions": [
{
"type": "fade",
"duration": 0.5,
"from_id": "video_01",
"to_id": "video_02",
"z_index": 1
}
],
"groups": [
{
"id": "hero",
"parent": "<string>",
"pivot": {
"x": 0.5,
"y": 0.5
},
"translate": {
"x": 0.5,
"y": 0.5
},
"scale": 1,
"rotation_degrees": 0,
"opacity": 1,
"members": [
"<string>"
],
"animations": [],
"layout": {
"type": "stack",
"direction": "row",
"gap": 0,
"align": "center",
"origin": {
"x": 0.5,
"y": 0.5
}
}
}
],
"motion_blur": {
"samples": 17,
"shutter": 0.5
},
"background_gradient": {
"stops": [
{
"offset": 0.5,
"color": "#e07a4f"
}
],
"kind": "linear",
"angle_degrees": 0
},
"watermark_url": "<string>",
"custom_animations": {
"element": [],
"text": []
},
"metadata": {
"project_id": "proj_123"
},
"webhook_url": "https://app.example.com/hooks/framelane",
"ingest_external": true
},
"at": 1,
"window": {
"from": 1,
"to": 123
},
"contact_sheet": {
"detail": "balanced",
"columns": 6,
"max_cells": 32
},
"width": 1928,
"dry_run": false,
"target_duration_sec": 1,
"target_tolerance_sec": 0.5
}
'import requests
url = "https://api.framelane.io/v1/preview"
payload = {
"render_request": {
"width": 1920,
"height": 1080,
"duration": 15,
"frame_rate": 30,
"output_format": "mp4",
"output_filename": "my-render",
"background_color": "#000000ff",
"background_image_url": "https://cdn.example.com/bg.jpg",
"alpha": False,
"elements": [
{
"source_url": "https://cdn.example.com/clip.mp4",
"lut_url": "<string>",
"lut_intensity": 100,
"brightness": 0,
"contrast": 0,
"saturation": 0,
"exposure": 0,
"sharpness": 0,
"blur": 0,
"noise": 0,
"vignette": 0,
"hue_rotate": 0,
"temperature": 0,
"tint": 0,
"vibrance": 0,
"highlights": 0,
"shadows": 0,
"crop_top": 0,
"crop_bottom": 0,
"crop_left": 0,
"crop_right": 0,
"border_radius": 0,
"border_color": "<string>",
"border_width": 0,
"shadow_color": "<string>",
"shadow_blur": 0,
"shadow_x": 0,
"shadow_y": 0,
"x": "50%",
"y": "50%",
"width": "100%",
"height": "100%",
"aspect_ratio": 123,
"x_anchor": "50%",
"y_anchor": "50%",
"x_rotation": "0°",
"y_rotation": "0°",
"z_rotation": "0°",
"x_scale": "100%",
"y_scale": "100%",
"flip_horizontal": False,
"flip_vertical": False,
"opacity": 100,
"z_index": 123,
"blend_mode": "none",
"mask": {
"feather": 0,
"scale": 1,
"center": {
"x": 0.5,
"y": 0.5
}
},
"mask_keyframes": [
{
"time": 1,
"feather": 123,
"scale": 123,
"center": {
"x": 0.5,
"y": 0.5
},
"easing": "<string>"
}
],
"matte": {
"source": "<string>",
"mode": "alpha",
"invert": False
},
"backdrop_blur": 0,
"clip": False,
"color_overlay": "<string>",
"type": "video",
"id": "clip_01",
"name": "<string>",
"track": 127,
"time": 0,
"visible": True,
"in_point": 0,
"out_point": 6,
"speed": 1,
"playback_rate_keyframes": [
{
"time": 1,
"rate": 1
}
],
"volume": 100,
"fade_in_duration": 0,
"fade_out_duration": 0,
"effects": [],
"motion": []
}
],
"transitions": [
{
"type": "fade",
"duration": 0.5,
"from_id": "video_01",
"to_id": "video_02",
"z_index": 1
}
],
"groups": [
{
"id": "hero",
"parent": "<string>",
"pivot": {
"x": 0.5,
"y": 0.5
},
"translate": {
"x": 0.5,
"y": 0.5
},
"scale": 1,
"rotation_degrees": 0,
"opacity": 1,
"members": ["<string>"],
"animations": [],
"layout": {
"type": "stack",
"direction": "row",
"gap": 0,
"align": "center",
"origin": {
"x": 0.5,
"y": 0.5
}
}
}
],
"motion_blur": {
"samples": 17,
"shutter": 0.5
},
"background_gradient": {
"stops": [
{
"offset": 0.5,
"color": "#e07a4f"
}
],
"kind": "linear",
"angle_degrees": 0
},
"watermark_url": "<string>",
"custom_animations": {
"element": [],
"text": []
},
"metadata": { "project_id": "proj_123" },
"webhook_url": "https://app.example.com/hooks/framelane",
"ingest_external": True
},
"at": 1,
"window": {
"from": 1,
"to": 123
},
"contact_sheet": {
"detail": "balanced",
"columns": 6,
"max_cells": 32
},
"width": 1928,
"dry_run": False,
"target_duration_sec": 1,
"target_tolerance_sec": 0.5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
render_request: {
width: 1920,
height: 1080,
duration: 15,
frame_rate: 30,
output_format: 'mp4',
output_filename: 'my-render',
background_color: '#000000ff',
background_image_url: 'https://cdn.example.com/bg.jpg',
alpha: false,
elements: [
{
source_url: 'https://cdn.example.com/clip.mp4',
lut_url: '<string>',
lut_intensity: 100,
brightness: 0,
contrast: 0,
saturation: 0,
exposure: 0,
sharpness: 0,
blur: 0,
noise: 0,
vignette: 0,
hue_rotate: 0,
temperature: 0,
tint: 0,
vibrance: 0,
highlights: 0,
shadows: 0,
crop_top: 0,
crop_bottom: 0,
crop_left: 0,
crop_right: 0,
border_radius: 0,
border_color: '<string>',
border_width: 0,
shadow_color: '<string>',
shadow_blur: 0,
shadow_x: 0,
shadow_y: 0,
x: '50%',
y: '50%',
width: '100%',
height: '100%',
aspect_ratio: 123,
x_anchor: '50%',
y_anchor: '50%',
x_rotation: '0°',
y_rotation: '0°',
z_rotation: '0°',
x_scale: '100%',
y_scale: '100%',
flip_horizontal: false,
flip_vertical: false,
opacity: 100,
z_index: 123,
blend_mode: 'none',
mask: {feather: 0, scale: 1, center: {x: 0.5, y: 0.5}},
mask_keyframes: [
{
time: 1,
feather: 123,
scale: 123,
center: {x: 0.5, y: 0.5},
easing: '<string>'
}
],
matte: {source: '<string>', mode: 'alpha', invert: false},
backdrop_blur: 0,
clip: false,
color_overlay: '<string>',
type: 'video',
id: 'clip_01',
name: '<string>',
track: 127,
time: 0,
visible: true,
in_point: 0,
out_point: 6,
speed: 1,
playback_rate_keyframes: [{time: 1, rate: 1}],
volume: 100,
fade_in_duration: 0,
fade_out_duration: 0,
effects: [],
motion: []
}
],
transitions: [
{
type: 'fade',
duration: 0.5,
from_id: 'video_01',
to_id: 'video_02',
z_index: 1
}
],
groups: [
{
id: 'hero',
parent: '<string>',
pivot: {x: 0.5, y: 0.5},
translate: {x: 0.5, y: 0.5},
scale: 1,
rotation_degrees: 0,
opacity: 1,
members: ['<string>'],
animations: [],
layout: {
type: 'stack',
direction: 'row',
gap: 0,
align: 'center',
origin: {x: 0.5, y: 0.5}
}
}
],
motion_blur: {samples: 17, shutter: 0.5},
background_gradient: {stops: [{offset: 0.5, color: '#e07a4f'}], kind: 'linear', angle_degrees: 0},
watermark_url: '<string>',
custom_animations: {element: [], text: []},
metadata: {project_id: 'proj_123'},
webhook_url: 'https://app.example.com/hooks/framelane',
ingest_external: true
},
at: 1,
window: {from: 1, to: 123},
contact_sheet: {detail: 'balanced', columns: 6, max_cells: 32},
width: 1928,
dry_run: false,
target_duration_sec: 1,
target_tolerance_sec: 0.5
})
};
fetch('https://api.framelane.io/v1/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.framelane.io/v1/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'render_request' => [
'width' => 1920,
'height' => 1080,
'duration' => 15,
'frame_rate' => 30,
'output_format' => 'mp4',
'output_filename' => 'my-render',
'background_color' => '#000000ff',
'background_image_url' => 'https://cdn.example.com/bg.jpg',
'alpha' => false,
'elements' => [
[
'source_url' => 'https://cdn.example.com/clip.mp4',
'lut_url' => '<string>',
'lut_intensity' => 100,
'brightness' => 0,
'contrast' => 0,
'saturation' => 0,
'exposure' => 0,
'sharpness' => 0,
'blur' => 0,
'noise' => 0,
'vignette' => 0,
'hue_rotate' => 0,
'temperature' => 0,
'tint' => 0,
'vibrance' => 0,
'highlights' => 0,
'shadows' => 0,
'crop_top' => 0,
'crop_bottom' => 0,
'crop_left' => 0,
'crop_right' => 0,
'border_radius' => 0,
'border_color' => '<string>',
'border_width' => 0,
'shadow_color' => '<string>',
'shadow_blur' => 0,
'shadow_x' => 0,
'shadow_y' => 0,
'x' => '50%',
'y' => '50%',
'width' => '100%',
'height' => '100%',
'aspect_ratio' => 123,
'x_anchor' => '50%',
'y_anchor' => '50%',
'x_rotation' => '0°',
'y_rotation' => '0°',
'z_rotation' => '0°',
'x_scale' => '100%',
'y_scale' => '100%',
'flip_horizontal' => false,
'flip_vertical' => false,
'opacity' => 100,
'z_index' => 123,
'blend_mode' => 'none',
'mask' => [
'feather' => 0,
'scale' => 1,
'center' => [
'x' => 0.5,
'y' => 0.5
]
],
'mask_keyframes' => [
[
'time' => 1,
'feather' => 123,
'scale' => 123,
'center' => [
'x' => 0.5,
'y' => 0.5
],
'easing' => '<string>'
]
],
'matte' => [
'source' => '<string>',
'mode' => 'alpha',
'invert' => false
],
'backdrop_blur' => 0,
'clip' => false,
'color_overlay' => '<string>',
'type' => 'video',
'id' => 'clip_01',
'name' => '<string>',
'track' => 127,
'time' => 0,
'visible' => true,
'in_point' => 0,
'out_point' => 6,
'speed' => 1,
'playback_rate_keyframes' => [
[
'time' => 1,
'rate' => 1
]
],
'volume' => 100,
'fade_in_duration' => 0,
'fade_out_duration' => 0,
'effects' => [
],
'motion' => [
]
]
],
'transitions' => [
[
'type' => 'fade',
'duration' => 0.5,
'from_id' => 'video_01',
'to_id' => 'video_02',
'z_index' => 1
]
],
'groups' => [
[
'id' => 'hero',
'parent' => '<string>',
'pivot' => [
'x' => 0.5,
'y' => 0.5
],
'translate' => [
'x' => 0.5,
'y' => 0.5
],
'scale' => 1,
'rotation_degrees' => 0,
'opacity' => 1,
'members' => [
'<string>'
],
'animations' => [
],
'layout' => [
'type' => 'stack',
'direction' => 'row',
'gap' => 0,
'align' => 'center',
'origin' => [
'x' => 0.5,
'y' => 0.5
]
]
]
],
'motion_blur' => [
'samples' => 17,
'shutter' => 0.5
],
'background_gradient' => [
'stops' => [
[
'offset' => 0.5,
'color' => '#e07a4f'
]
],
'kind' => 'linear',
'angle_degrees' => 0
],
'watermark_url' => '<string>',
'custom_animations' => [
'element' => [
],
'text' => [
]
],
'metadata' => [
'project_id' => 'proj_123'
],
'webhook_url' => 'https://app.example.com/hooks/framelane',
'ingest_external' => true
],
'at' => 1,
'window' => [
'from' => 1,
'to' => 123
],
'contact_sheet' => [
'detail' => 'balanced',
'columns' => 6,
'max_cells' => 32
],
'width' => 1928,
'dry_run' => false,
'target_duration_sec' => 1,
'target_tolerance_sec' => 0.5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.framelane.io/v1/preview"
payload := strings.NewReader("{\n \"render_request\": {\n \"width\": 1920,\n \"height\": 1080,\n \"duration\": 15,\n \"frame_rate\": 30,\n \"output_format\": \"mp4\",\n \"output_filename\": \"my-render\",\n \"background_color\": \"#000000ff\",\n \"background_image_url\": \"https://cdn.example.com/bg.jpg\",\n \"alpha\": false,\n \"elements\": [\n {\n \"source_url\": \"https://cdn.example.com/clip.mp4\",\n \"lut_url\": \"<string>\",\n \"lut_intensity\": 100,\n \"brightness\": 0,\n \"contrast\": 0,\n \"saturation\": 0,\n \"exposure\": 0,\n \"sharpness\": 0,\n \"blur\": 0,\n \"noise\": 0,\n \"vignette\": 0,\n \"hue_rotate\": 0,\n \"temperature\": 0,\n \"tint\": 0,\n \"vibrance\": 0,\n \"highlights\": 0,\n \"shadows\": 0,\n \"crop_top\": 0,\n \"crop_bottom\": 0,\n \"crop_left\": 0,\n \"crop_right\": 0,\n \"border_radius\": 0,\n \"border_color\": \"<string>\",\n \"border_width\": 0,\n \"shadow_color\": \"<string>\",\n \"shadow_blur\": 0,\n \"shadow_x\": 0,\n \"shadow_y\": 0,\n \"x\": \"50%\",\n \"y\": \"50%\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"aspect_ratio\": 123,\n \"x_anchor\": \"50%\",\n \"y_anchor\": \"50%\",\n \"x_rotation\": \"0°\",\n \"y_rotation\": \"0°\",\n \"z_rotation\": \"0°\",\n \"x_scale\": \"100%\",\n \"y_scale\": \"100%\",\n \"flip_horizontal\": false,\n \"flip_vertical\": false,\n \"opacity\": 100,\n \"z_index\": 123,\n \"blend_mode\": \"none\",\n \"mask\": {\n \"feather\": 0,\n \"scale\": 1,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n },\n \"mask_keyframes\": [\n {\n \"time\": 1,\n \"feather\": 123,\n \"scale\": 123,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"easing\": \"<string>\"\n }\n ],\n \"matte\": {\n \"source\": \"<string>\",\n \"mode\": \"alpha\",\n \"invert\": false\n },\n \"backdrop_blur\": 0,\n \"clip\": false,\n \"color_overlay\": \"<string>\",\n \"type\": \"video\",\n \"id\": \"clip_01\",\n \"name\": \"<string>\",\n \"track\": 127,\n \"time\": 0,\n \"visible\": true,\n \"in_point\": 0,\n \"out_point\": 6,\n \"speed\": 1,\n \"playback_rate_keyframes\": [\n {\n \"time\": 1,\n \"rate\": 1\n }\n ],\n \"volume\": 100,\n \"fade_in_duration\": 0,\n \"fade_out_duration\": 0,\n \"effects\": [],\n \"motion\": []\n }\n ],\n \"transitions\": [\n {\n \"type\": \"fade\",\n \"duration\": 0.5,\n \"from_id\": \"video_01\",\n \"to_id\": \"video_02\",\n \"z_index\": 1\n }\n ],\n \"groups\": [\n {\n \"id\": \"hero\",\n \"parent\": \"<string>\",\n \"pivot\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"translate\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"scale\": 1,\n \"rotation_degrees\": 0,\n \"opacity\": 1,\n \"members\": [\n \"<string>\"\n ],\n \"animations\": [],\n \"layout\": {\n \"type\": \"stack\",\n \"direction\": \"row\",\n \"gap\": 0,\n \"align\": \"center\",\n \"origin\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n }\n }\n ],\n \"motion_blur\": {\n \"samples\": 17,\n \"shutter\": 0.5\n },\n \"background_gradient\": {\n \"stops\": [\n {\n \"offset\": 0.5,\n \"color\": \"#e07a4f\"\n }\n ],\n \"kind\": \"linear\",\n \"angle_degrees\": 0\n },\n \"watermark_url\": \"<string>\",\n \"custom_animations\": {\n \"element\": [],\n \"text\": []\n },\n \"metadata\": {\n \"project_id\": \"proj_123\"\n },\n \"webhook_url\": \"https://app.example.com/hooks/framelane\",\n \"ingest_external\": true\n },\n \"at\": 1,\n \"window\": {\n \"from\": 1,\n \"to\": 123\n },\n \"contact_sheet\": {\n \"detail\": \"balanced\",\n \"columns\": 6,\n \"max_cells\": 32\n },\n \"width\": 1928,\n \"dry_run\": false,\n \"target_duration_sec\": 1,\n \"target_tolerance_sec\": 0.5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.framelane.io/v1/preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"render_request\": {\n \"width\": 1920,\n \"height\": 1080,\n \"duration\": 15,\n \"frame_rate\": 30,\n \"output_format\": \"mp4\",\n \"output_filename\": \"my-render\",\n \"background_color\": \"#000000ff\",\n \"background_image_url\": \"https://cdn.example.com/bg.jpg\",\n \"alpha\": false,\n \"elements\": [\n {\n \"source_url\": \"https://cdn.example.com/clip.mp4\",\n \"lut_url\": \"<string>\",\n \"lut_intensity\": 100,\n \"brightness\": 0,\n \"contrast\": 0,\n \"saturation\": 0,\n \"exposure\": 0,\n \"sharpness\": 0,\n \"blur\": 0,\n \"noise\": 0,\n \"vignette\": 0,\n \"hue_rotate\": 0,\n \"temperature\": 0,\n \"tint\": 0,\n \"vibrance\": 0,\n \"highlights\": 0,\n \"shadows\": 0,\n \"crop_top\": 0,\n \"crop_bottom\": 0,\n \"crop_left\": 0,\n \"crop_right\": 0,\n \"border_radius\": 0,\n \"border_color\": \"<string>\",\n \"border_width\": 0,\n \"shadow_color\": \"<string>\",\n \"shadow_blur\": 0,\n \"shadow_x\": 0,\n \"shadow_y\": 0,\n \"x\": \"50%\",\n \"y\": \"50%\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"aspect_ratio\": 123,\n \"x_anchor\": \"50%\",\n \"y_anchor\": \"50%\",\n \"x_rotation\": \"0°\",\n \"y_rotation\": \"0°\",\n \"z_rotation\": \"0°\",\n \"x_scale\": \"100%\",\n \"y_scale\": \"100%\",\n \"flip_horizontal\": false,\n \"flip_vertical\": false,\n \"opacity\": 100,\n \"z_index\": 123,\n \"blend_mode\": \"none\",\n \"mask\": {\n \"feather\": 0,\n \"scale\": 1,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n },\n \"mask_keyframes\": [\n {\n \"time\": 1,\n \"feather\": 123,\n \"scale\": 123,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"easing\": \"<string>\"\n }\n ],\n \"matte\": {\n \"source\": \"<string>\",\n \"mode\": \"alpha\",\n \"invert\": false\n },\n \"backdrop_blur\": 0,\n \"clip\": false,\n \"color_overlay\": \"<string>\",\n \"type\": \"video\",\n \"id\": \"clip_01\",\n \"name\": \"<string>\",\n \"track\": 127,\n \"time\": 0,\n \"visible\": true,\n \"in_point\": 0,\n \"out_point\": 6,\n \"speed\": 1,\n \"playback_rate_keyframes\": [\n {\n \"time\": 1,\n \"rate\": 1\n }\n ],\n \"volume\": 100,\n \"fade_in_duration\": 0,\n \"fade_out_duration\": 0,\n \"effects\": [],\n \"motion\": []\n }\n ],\n \"transitions\": [\n {\n \"type\": \"fade\",\n \"duration\": 0.5,\n \"from_id\": \"video_01\",\n \"to_id\": \"video_02\",\n \"z_index\": 1\n }\n ],\n \"groups\": [\n {\n \"id\": \"hero\",\n \"parent\": \"<string>\",\n \"pivot\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"translate\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"scale\": 1,\n \"rotation_degrees\": 0,\n \"opacity\": 1,\n \"members\": [\n \"<string>\"\n ],\n \"animations\": [],\n \"layout\": {\n \"type\": \"stack\",\n \"direction\": \"row\",\n \"gap\": 0,\n \"align\": \"center\",\n \"origin\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n }\n }\n ],\n \"motion_blur\": {\n \"samples\": 17,\n \"shutter\": 0.5\n },\n \"background_gradient\": {\n \"stops\": [\n {\n \"offset\": 0.5,\n \"color\": \"#e07a4f\"\n }\n ],\n \"kind\": \"linear\",\n \"angle_degrees\": 0\n },\n \"watermark_url\": \"<string>\",\n \"custom_animations\": {\n \"element\": [],\n \"text\": []\n },\n \"metadata\": {\n \"project_id\": \"proj_123\"\n },\n \"webhook_url\": \"https://app.example.com/hooks/framelane\",\n \"ingest_external\": true\n },\n \"at\": 1,\n \"window\": {\n \"from\": 1,\n \"to\": 123\n },\n \"contact_sheet\": {\n \"detail\": \"balanced\",\n \"columns\": 6,\n \"max_cells\": 32\n },\n \"width\": 1928,\n \"dry_run\": false,\n \"target_duration_sec\": 1,\n \"target_tolerance_sec\": 0.5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.framelane.io/v1/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"render_request\": {\n \"width\": 1920,\n \"height\": 1080,\n \"duration\": 15,\n \"frame_rate\": 30,\n \"output_format\": \"mp4\",\n \"output_filename\": \"my-render\",\n \"background_color\": \"#000000ff\",\n \"background_image_url\": \"https://cdn.example.com/bg.jpg\",\n \"alpha\": false,\n \"elements\": [\n {\n \"source_url\": \"https://cdn.example.com/clip.mp4\",\n \"lut_url\": \"<string>\",\n \"lut_intensity\": 100,\n \"brightness\": 0,\n \"contrast\": 0,\n \"saturation\": 0,\n \"exposure\": 0,\n \"sharpness\": 0,\n \"blur\": 0,\n \"noise\": 0,\n \"vignette\": 0,\n \"hue_rotate\": 0,\n \"temperature\": 0,\n \"tint\": 0,\n \"vibrance\": 0,\n \"highlights\": 0,\n \"shadows\": 0,\n \"crop_top\": 0,\n \"crop_bottom\": 0,\n \"crop_left\": 0,\n \"crop_right\": 0,\n \"border_radius\": 0,\n \"border_color\": \"<string>\",\n \"border_width\": 0,\n \"shadow_color\": \"<string>\",\n \"shadow_blur\": 0,\n \"shadow_x\": 0,\n \"shadow_y\": 0,\n \"x\": \"50%\",\n \"y\": \"50%\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"aspect_ratio\": 123,\n \"x_anchor\": \"50%\",\n \"y_anchor\": \"50%\",\n \"x_rotation\": \"0°\",\n \"y_rotation\": \"0°\",\n \"z_rotation\": \"0°\",\n \"x_scale\": \"100%\",\n \"y_scale\": \"100%\",\n \"flip_horizontal\": false,\n \"flip_vertical\": false,\n \"opacity\": 100,\n \"z_index\": 123,\n \"blend_mode\": \"none\",\n \"mask\": {\n \"feather\": 0,\n \"scale\": 1,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n },\n \"mask_keyframes\": [\n {\n \"time\": 1,\n \"feather\": 123,\n \"scale\": 123,\n \"center\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"easing\": \"<string>\"\n }\n ],\n \"matte\": {\n \"source\": \"<string>\",\n \"mode\": \"alpha\",\n \"invert\": false\n },\n \"backdrop_blur\": 0,\n \"clip\": false,\n \"color_overlay\": \"<string>\",\n \"type\": \"video\",\n \"id\": \"clip_01\",\n \"name\": \"<string>\",\n \"track\": 127,\n \"time\": 0,\n \"visible\": true,\n \"in_point\": 0,\n \"out_point\": 6,\n \"speed\": 1,\n \"playback_rate_keyframes\": [\n {\n \"time\": 1,\n \"rate\": 1\n }\n ],\n \"volume\": 100,\n \"fade_in_duration\": 0,\n \"fade_out_duration\": 0,\n \"effects\": [],\n \"motion\": []\n }\n ],\n \"transitions\": [\n {\n \"type\": \"fade\",\n \"duration\": 0.5,\n \"from_id\": \"video_01\",\n \"to_id\": \"video_02\",\n \"z_index\": 1\n }\n ],\n \"groups\": [\n {\n \"id\": \"hero\",\n \"parent\": \"<string>\",\n \"pivot\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"translate\": {\n \"x\": 0.5,\n \"y\": 0.5\n },\n \"scale\": 1,\n \"rotation_degrees\": 0,\n \"opacity\": 1,\n \"members\": [\n \"<string>\"\n ],\n \"animations\": [],\n \"layout\": {\n \"type\": \"stack\",\n \"direction\": \"row\",\n \"gap\": 0,\n \"align\": \"center\",\n \"origin\": {\n \"x\": 0.5,\n \"y\": 0.5\n }\n }\n }\n ],\n \"motion_blur\": {\n \"samples\": 17,\n \"shutter\": 0.5\n },\n \"background_gradient\": {\n \"stops\": [\n {\n \"offset\": 0.5,\n \"color\": \"#e07a4f\"\n }\n ],\n \"kind\": \"linear\",\n \"angle_degrees\": 0\n },\n \"watermark_url\": \"<string>\",\n \"custom_animations\": {\n \"element\": [],\n \"text\": []\n },\n \"metadata\": {\n \"project_id\": \"proj_123\"\n },\n \"webhook_url\": \"https://app.example.com/hooks/framelane\",\n \"ingest_external\": true\n },\n \"at\": 1,\n \"window\": {\n \"from\": 1,\n \"to\": 123\n },\n \"contact_sheet\": {\n \"detail\": \"balanced\",\n \"columns\": 6,\n \"max_cells\": 32\n },\n \"width\": 1928,\n \"dry_run\": false,\n \"target_duration_sec\": 1,\n \"target_tolerance_sec\": 0.5\n}"
response = http.request(request)
puts response.read_body{
"kind": "<string>",
"ok": true,
"violations": [
{
"code": "<string>",
"message": "<string>",
"severity": "error",
"path": "<string>"
}
],
"job": {
"id": "render_01J8QR2K5VKDGN2T4FBM3CZYX7",
"kind": "render",
"workspace_id": "ws_01J8QR2K5VKDGN2T4FBM3CZYX8",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_preview": false,
"task_type": "transcribe",
"progress_percent": 0,
"progress_stage": "compositing",
"output": {
"url": "https://cdn-user.framelane.io/render_01J.../output.mp4",
"width": 1920,
"height": 1080,
"duration": 15.3,
"size_bytes": 12582912
},
"error": {
"code": "invalid_source",
"message": "Source URL returned 404."
},
"metadata": {
"project_id": "proj_123",
"user_ref": "usr_abc"
},
"completed_at": "2023-11-07T05:31:56Z"
},
"sheet": {
"columns": 123,
"rows": 123,
"width": 123,
"window": {
"from": 1,
"to": 123
},
"cells": [
{
"index": 123,
"at": 123
}
]
}
}{
"kind": "<string>",
"ok": true,
"violations": [
{
"code": "<string>",
"message": "<string>",
"severity": "error",
"path": "<string>"
}
],
"job": {
"id": "render_01J8QR2K5VKDGN2T4FBM3CZYX7",
"kind": "render",
"workspace_id": "ws_01J8QR2K5VKDGN2T4FBM3CZYX8",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_preview": false,
"task_type": "transcribe",
"progress_percent": 0,
"progress_stage": "compositing",
"output": {
"url": "https://cdn-user.framelane.io/render_01J.../output.mp4",
"width": 1920,
"height": 1080,
"duration": 15.3,
"size_bytes": 12582912
},
"error": {
"code": "invalid_source",
"message": "Source URL returned 404."
},
"metadata": {
"project_id": "proj_123",
"user_ref": "usr_abc"
},
"completed_at": "2023-11-07T05:31:56Z"
},
"sheet": {
"columns": 123,
"rows": 123,
"width": 123,
"window": {
"from": 1,
"to": 123
},
"cells": [
{
"index": 123,
"at": 123
}
]
}
}{
"error": {
"message": "<string>",
"details": {}
}
}{
"error": {
"message": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The composition to preview.
Show child attributes
Show child attributes
Timeline seconds for a single-frame preview. Mutually exclusive with 'window' and 'contact_sheet'.
x >= 0Time range for a short clip preview (with audio), or the range a contact_sheet spans.
Show child attributes
Show child attributes
Produce a contact sheet (grid of composition-aware frames) instead of a single frame or clip.
Show child attributes
Show child attributes
Preview width in px; height derives from the aspect ratio. Defaults to a small draft width.
16 <= x <= 3840Validate only: run the linter and return violations, no render.
Optional target timeline length; emits TARGET_DURATION_MISSED when outside tolerance.
x > 0x >= 0Response
Validation result (dry-run).
'validation' (dry-run), 'frame', 'window', or 'contact_sheet'.
True when there are no error-severity violations.
Show child attributes
Show child attributes
For a pixel preview: the preview render job to poll via GET /v1/renders/{id} (is_preview=true, not billed). Absent for a dry-run.
Show child attributes
Show child attributes
For a contact_sheet: the sampling plan (cells + grid shape). Present even on a dry-run.
Show child attributes
Show child attributes

