Skip to main content

Overview

Generate videos from templates by providing variable values for each scene. This is perfect for creating personalized video content at scale.

How Templates Work

Templates in SlideVid use scenes - each scene has a script with {{variables}} that you replace:
  1. Get template details to see scenes and variables
  2. Prepare your data with values for each variable per scene
  3. Generate video with the templateId and scenes array

Request Body

string
required
Video type (must match template type). Use class for template-based videos.
string
required
The template ID to use (1-20 characters)
string
required
Video title (1-100 characters)
boolean
required
Enable auto-generated captions
string
required
Language code for the video (max 2 characters). Example: en, es, fr
array
required
Array of scenes (1-20 scenes). Each scene contains:
string
URL to receive completion notification (max 500 characters)
object
Custom data to pass through to webhook responses. Use this to correlate videos with your internal systems (e.g., course IDs, user IDs, order numbers). Maximum size: 5KB.

Scene Structure

Each scene in the scenes array must include:
string
required
The script for this scene (can include {{variables}})
array
required
Array of {key, type, value} pairs to replace in the script

Bulk Generation Example

Generate personalized videos for multiple customers:
Bulk Generation

Variable Replacement Rules

Variables in scripts use double curly brackets: {{variable_name}}
Variable names are case-sensitive:
  • {{name}}{{Name}}
  • {{firstName}}{{firstname}}
You must provide values for all variables in each scene:
Empty string values are allowed:
This replaces {{optional_field}} with an empty string.

Overriding Template Settings

You can override some template settings:

Best Practices

Validate First

Get template details and validate your data before generating

Use Webhooks

Always provide webhook URLs for async notification

Rate Limiting

Add delays between bulk requests (1 second recommended)

Error Handling

Check for missing variables before generation
Missing Variables: If any required variable is missing, the video generation will fail. Always validate your data against the template’s variable requirements first.

API Limits

Template Details

Get template structure and variables

List Templates

Browse available templates

List Videos

View your generated videos