Skip to main content

Render

POST /v1/render

Submit a timeline for video rendering. This is the primary endpoint for composing and rendering videos.

Request

FieldTypeRequiredDescription
timelineobjectYesTimeline with tracks and clips
outputobjectYesOutput format, resolution, and options
callbackstringNoWebhook URL for completion notification
metadataobjectNoCustom key-value metadata attached to the job

Full Multi-Track Example

This example creates a 15-second video with:

  • Track 0 (foreground): Title text with fade transition
  • Track 1 (middle): Logo overlay in the corner
  • Track 2 (background): Two image clips with slide transitions

curl

curl -X POST https://api.vidiking.com/v1/render \
-H "Authorization: Bearer $VIDIKING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"timeline": {
"background": "#1a1a2e",
"soundtrack": {
"src": "https://example.com/bgm.mp3",
"effect": "fadeInFadeOut",
"volume": 0.3
},
"tracks": [
{
"clips": [
{
"asset": {
"type": "title",
"text": "Product Launch 2025",
"style": "future",
"size": "large",
"color": "#ffffff"
},
"start": 1,
"length": 5,
"transition": {
"in": "fade",
"out": "fade"
}
},
{
"asset": {
"type": "title",
"text": "Available Now",
"style": "minimal",
"size": "medium",
"color": "#00d4ff"
},
"start": 8,
"length": 5,
"transition": {
"in": "slideUp",
"out": "fade"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://example.com/logo.png"
},
"start": 0,
"length": 15,
"scale": 0.15,
"offset": { "x": 0.4, "y": -0.4 },
"opacity": 0.8
}
]
},
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://example.com/hero-1.jpg"
},
"start": 0,
"length": 7.5,
"fit": "cover",
"transition": {
"in": "fade",
"out": "slideLeft"
},
"effect": "zoomIn"
},
{
"asset": {
"type": "image",
"src": "https://example.com/hero-2.jpg"
},
"start": 7.5,
"length": 7.5,
"fit": "cover",
"transition": {
"in": "slideRight",
"out": "fade"
},
"effect": "zoomOut"
}
]
}
]
},
"output": {
"format": "mp4",
"resolution": "1080",
"fps": 30,
"quality": "high",
"aspectRatio": "16:9"
},
"callback": "https://your-server.com/webhooks/vidiking"
}'

Node.js

import Vidiai from '@vidiking/sdk';

const client = new Vidiai({ apiKey: process.env.VIDIKING_API_KEY });

const { jobId } = await client.render({
timeline: {
background: '#1a1a2e',
soundtrack: {
src: 'https://example.com/bgm.mp3',
effect: 'fadeInFadeOut',
volume: 0.3,
},
tracks: [
{
clips: [
{
asset: { type: 'title', text: 'Product Launch 2025', style: 'future', size: 'large' },
start: 1,
length: 5,
transition: { in: 'fade', out: 'fade' },
},
{
asset: { type: 'title', text: 'Available Now', style: 'minimal', size: 'medium', color: '#00d4ff' },
start: 8,
length: 5,
transition: { in: 'slideUp', out: 'fade' },
},
],
},
{
clips: [
{
asset: { type: 'image', src: 'https://example.com/logo.png' },
start: 0,
length: 15,
scale: 0.15,
offset: { x: 0.4, y: -0.4 },
opacity: 0.8,
},
],
},
{
clips: [
{
asset: { type: 'image', src: 'https://example.com/hero-1.jpg' },
start: 0,
length: 7.5,
fit: 'cover',
transition: { in: 'fade', out: 'slideLeft' },
effect: 'zoomIn',
},
{
asset: { type: 'image', src: 'https://example.com/hero-2.jpg' },
start: 7.5,
length: 7.5,
fit: 'cover',
transition: { in: 'slideRight', out: 'fade' },
effect: 'zoomOut',
},
],
},
],
},
output: { format: 'mp4', resolution: '1080', fps: 30, quality: 'high' },
callback: 'https://your-server.com/webhooks/vidiking',
});

console.log('Job submitted:', jobId);

Python

from vidiai import Vidiai

client = Vidiking(api_key="your_api_key")

result = client.render({
"timeline": {
"background": "#1a1a2e",
"soundtrack": {
"src": "https://example.com/bgm.mp3",
"effect": "fadeInFadeOut",
"volume": 0.3,
},
"tracks": [
{
"clips": [
{
"asset": {"type": "title", "text": "Product Launch 2025", "style": "future", "size": "large"},
"start": 1,
"length": 5,
"transition": {"in": "fade", "out": "fade"},
},
{
"asset": {"type": "title", "text": "Available Now", "style": "minimal", "size": "medium"},
"start": 8,
"length": 5,
"transition": {"in": "slideUp", "out": "fade"},
},
]
},
{
"clips": [
{
"asset": {"type": "image", "src": "https://example.com/logo.png"},
"start": 0,
"length": 15,
"scale": 0.15,
"offset": {"x": 0.4, "y": -0.4},
"opacity": 0.8,
}
]
},
{
"clips": [
{
"asset": {"type": "image", "src": "https://example.com/hero-1.jpg"},
"start": 0,
"length": 7.5,
"fit": "cover",
"transition": {"in": "fade", "out": "slideLeft"},
},
{
"asset": {"type": "image", "src": "https://example.com/hero-2.jpg"},
"start": 7.5,
"length": 7.5,
"fit": "cover",
"transition": {"in": "slideRight", "out": "fade"},
},
]
},
],
},
"output": {"format": "mp4", "resolution": "1080", "fps": 30, "quality": "high"},
"callback": "https://your-server.com/webhooks/vidiking",
})

print("Job submitted:", result.job_id)

Response

{
"id": "job_abc123",
"status": "QUEUED",
"created_at": "2025-01-15T10:30:00Z"
}

Get Render Status

GET /v1/render/{id}

curl https://api.vidiking.com/v1/render/job_abc123 \
-H "Authorization: Bearer $VIDIKING_API_KEY"

See Jobs & Rendering for full lifecycle details.

Output Options

ParameterTypeValuesDefault
formatstringmp4, gif, webm, movmp4
resolutionstringpreview, sd, hd, 1080, 4khd
fpsnumber15, 24, 25, 30, 6025
qualitystringlow, medium, highmedium
aspectRatiostring16:9, 9:16, 1:1, 4:516:9

Effects

Apply motion effects to clips:

EffectDescription
zoomInSlow zoom in
zoomOutSlow zoom out
slideLeftSlow pan left
slideRightSlow pan right
slideUpSlow pan up
slideDownSlow pan down

Error Codes

CodeHTTP StatusDescription
INVALID_TIMELINE400Timeline JSON is malformed
INVALID_OUTPUT400Invalid output configuration
INSUFFICIENT_CREDITS402Not enough balance
RATE_LIMITED429Too many requests