Create Scenes Video
curl --request POST \
--url https://api.slidevid.ai/v1/project/create/scenes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Product Tutorial",
"scenes": [
{
"type": "avatar",
"script": "Welcome to our product demo! Let me show you how it works.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
},
{
"type": "video",
"mediaId": "product_demo_video_id"
},
{
"type": "start_end_frame",
"startFrameMediaId": "start_image_id",
"endFrameMediaId": "end_image_id",
"frameModel": "veo_3_1",
"framePrompt": "Smooth camera zoom out revealing the full scene",
"frameDuration": 5
},
{
"type": "picture_in_picture",
"script": "As you can see here, the interface is intuitive and easy to use.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id",
"mediaId": "screenshot_id"
},
{
"type": "avatar",
"script": "Try it today and see the difference!",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
}
],
"musicId": "upbeat_background_id",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "modern",
"alignment": "bottom",
"disabled": false
},
"addStickers": false,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": true
},
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"tutorialId": "getting-started",
"version": "1.0"
}
}
'import requests
url = "https://api.slidevid.ai/v1/project/create/scenes"
payload = {
"name": "Product Tutorial",
"scenes": [
{
"type": "avatar",
"script": "Welcome to our product demo! Let me show you how it works.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
},
{
"type": "video",
"mediaId": "product_demo_video_id"
},
{
"type": "start_end_frame",
"startFrameMediaId": "start_image_id",
"endFrameMediaId": "end_image_id",
"frameModel": "veo_3_1",
"framePrompt": "Smooth camera zoom out revealing the full scene",
"frameDuration": 5
},
{
"type": "picture_in_picture",
"script": "As you can see here, the interface is intuitive and easy to use.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id",
"mediaId": "screenshot_id"
},
{
"type": "avatar",
"script": "Try it today and see the difference!",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
}
],
"musicId": "upbeat_background_id",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "modern",
"alignment": "bottom",
"disabled": False
},
"addStickers": False,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": True
},
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"tutorialId": "getting-started",
"version": "1.0"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Product Tutorial',
scenes: [
{
type: 'avatar',
script: 'Welcome to our product demo! Let me show you how it works.',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id'
},
{type: 'video', mediaId: 'product_demo_video_id'},
{
type: 'start_end_frame',
startFrameMediaId: 'start_image_id',
endFrameMediaId: 'end_image_id',
frameModel: 'veo_3_1',
framePrompt: 'Smooth camera zoom out revealing the full scene',
frameDuration: 5
},
{
type: 'picture_in_picture',
script: 'As you can see here, the interface is intuitive and easy to use.',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id',
mediaId: 'screenshot_id'
},
{
type: 'avatar',
script: 'Try it today and see the difference!',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id'
}
],
musicId: 'upbeat_background_id',
aspectRatio: 'ratio_9_16',
caption: {preset: 'modern', alignment: 'bottom', disabled: false},
addStickers: false,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
language: 'en',
webhook: 'https://yoursite.com/webhook',
metadata: {tutorialId: 'getting-started', version: '1.0'}
})
};
fetch('https://api.slidevid.ai/v1/project/create/scenes', 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.slidevid.ai/v1/project/create/scenes",
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([
'name' => 'Product Tutorial',
'scenes' => [
[
'type' => 'avatar',
'script' => 'Welcome to our product demo! Let me show you how it works.',
'avatarId' => 'professional_avatar_id',
'voiceId' => 'confident_voice_id'
],
[
'type' => 'video',
'mediaId' => 'product_demo_video_id'
],
[
'type' => 'start_end_frame',
'startFrameMediaId' => 'start_image_id',
'endFrameMediaId' => 'end_image_id',
'frameModel' => 'veo_3_1',
'framePrompt' => 'Smooth camera zoom out revealing the full scene',
'frameDuration' => 5
],
[
'type' => 'picture_in_picture',
'script' => 'As you can see here, the interface is intuitive and easy to use.',
'avatarId' => 'professional_avatar_id',
'voiceId' => 'confident_voice_id',
'mediaId' => 'screenshot_id'
],
[
'type' => 'avatar',
'script' => 'Try it today and see the difference!',
'avatarId' => 'professional_avatar_id',
'voiceId' => 'confident_voice_id'
]
],
'musicId' => 'upbeat_background_id',
'aspectRatio' => 'ratio_9_16',
'caption' => [
'preset' => 'modern',
'alignment' => 'bottom',
'disabled' => false
],
'addStickers' => false,
'audio' => [
'speed' => 1,
'stability' => 0.5,
'similarityBoost' => 0.75,
'style' => 0,
'useSpeakerBoost' => true
],
'language' => 'en',
'webhook' => 'https://yoursite.com/webhook',
'metadata' => [
'tutorialId' => 'getting-started',
'version' => '1.0'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.slidevid.ai/v1/project/create/scenes"
payload := strings.NewReader("{\n \"name\": \"Product Tutorial\",\n \"scenes\": [\n {\n \"type\": \"avatar\",\n \"script\": \"Welcome to our product demo! Let me show you how it works.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n },\n {\n \"type\": \"video\",\n \"mediaId\": \"product_demo_video_id\"\n },\n {\n \"type\": \"start_end_frame\",\n \"startFrameMediaId\": \"start_image_id\",\n \"endFrameMediaId\": \"end_image_id\",\n \"frameModel\": \"veo_3_1\",\n \"framePrompt\": \"Smooth camera zoom out revealing the full scene\",\n \"frameDuration\": 5\n },\n {\n \"type\": \"picture_in_picture\",\n \"script\": \"As you can see here, the interface is intuitive and easy to use.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\",\n \"mediaId\": \"screenshot_id\"\n },\n {\n \"type\": \"avatar\",\n \"script\": \"Try it today and see the difference!\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n }\n ],\n \"musicId\": \"upbeat_background_id\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"modern\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": false,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"tutorialId\": \"getting-started\",\n \"version\": \"1.0\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.slidevid.ai/v1/project/create/scenes")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Product Tutorial\",\n \"scenes\": [\n {\n \"type\": \"avatar\",\n \"script\": \"Welcome to our product demo! Let me show you how it works.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n },\n {\n \"type\": \"video\",\n \"mediaId\": \"product_demo_video_id\"\n },\n {\n \"type\": \"start_end_frame\",\n \"startFrameMediaId\": \"start_image_id\",\n \"endFrameMediaId\": \"end_image_id\",\n \"frameModel\": \"veo_3_1\",\n \"framePrompt\": \"Smooth camera zoom out revealing the full scene\",\n \"frameDuration\": 5\n },\n {\n \"type\": \"picture_in_picture\",\n \"script\": \"As you can see here, the interface is intuitive and easy to use.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\",\n \"mediaId\": \"screenshot_id\"\n },\n {\n \"type\": \"avatar\",\n \"script\": \"Try it today and see the difference!\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n }\n ],\n \"musicId\": \"upbeat_background_id\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"modern\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": false,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"tutorialId\": \"getting-started\",\n \"version\": \"1.0\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slidevid.ai/v1/project/create/scenes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Product Tutorial\",\n \"scenes\": [\n {\n \"type\": \"avatar\",\n \"script\": \"Welcome to our product demo! Let me show you how it works.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n },\n {\n \"type\": \"video\",\n \"mediaId\": \"product_demo_video_id\"\n },\n {\n \"type\": \"start_end_frame\",\n \"startFrameMediaId\": \"start_image_id\",\n \"endFrameMediaId\": \"end_image_id\",\n \"frameModel\": \"veo_3_1\",\n \"framePrompt\": \"Smooth camera zoom out revealing the full scene\",\n \"frameDuration\": 5\n },\n {\n \"type\": \"picture_in_picture\",\n \"script\": \"As you can see here, the interface is intuitive and easy to use.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\",\n \"mediaId\": \"screenshot_id\"\n },\n {\n \"type\": \"avatar\",\n \"script\": \"Try it today and see the difference!\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n }\n ],\n \"musicId\": \"upbeat_background_id\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"modern\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": false,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"tutorialId\": \"getting-started\",\n \"version\": \"1.0\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"projectId": "proj_scenes_abc123xyz",
"message": "Scenes project successfully created"
}
{
"success": false,
"message": "At least one scene is required"
}
{
"success": false,
"message": "scenes.0.script: Script is required for avatar scenes"
}
{
"success": false,
"message": "Not enough credits for scenes video. Estimated: 50, Available: 25"
}
Videos
Scenes
Create multi-scene videos combining avatars, video clips, and AI-generated transitions
POST
/
v1
/
project
/
create
/
scenes
Create Scenes Video
curl --request POST \
--url https://api.slidevid.ai/v1/project/create/scenes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Product Tutorial",
"scenes": [
{
"type": "avatar",
"script": "Welcome to our product demo! Let me show you how it works.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
},
{
"type": "video",
"mediaId": "product_demo_video_id"
},
{
"type": "start_end_frame",
"startFrameMediaId": "start_image_id",
"endFrameMediaId": "end_image_id",
"frameModel": "veo_3_1",
"framePrompt": "Smooth camera zoom out revealing the full scene",
"frameDuration": 5
},
{
"type": "picture_in_picture",
"script": "As you can see here, the interface is intuitive and easy to use.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id",
"mediaId": "screenshot_id"
},
{
"type": "avatar",
"script": "Try it today and see the difference!",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
}
],
"musicId": "upbeat_background_id",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "modern",
"alignment": "bottom",
"disabled": false
},
"addStickers": false,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": true
},
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"tutorialId": "getting-started",
"version": "1.0"
}
}
'import requests
url = "https://api.slidevid.ai/v1/project/create/scenes"
payload = {
"name": "Product Tutorial",
"scenes": [
{
"type": "avatar",
"script": "Welcome to our product demo! Let me show you how it works.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
},
{
"type": "video",
"mediaId": "product_demo_video_id"
},
{
"type": "start_end_frame",
"startFrameMediaId": "start_image_id",
"endFrameMediaId": "end_image_id",
"frameModel": "veo_3_1",
"framePrompt": "Smooth camera zoom out revealing the full scene",
"frameDuration": 5
},
{
"type": "picture_in_picture",
"script": "As you can see here, the interface is intuitive and easy to use.",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id",
"mediaId": "screenshot_id"
},
{
"type": "avatar",
"script": "Try it today and see the difference!",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
}
],
"musicId": "upbeat_background_id",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "modern",
"alignment": "bottom",
"disabled": False
},
"addStickers": False,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": True
},
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"tutorialId": "getting-started",
"version": "1.0"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Product Tutorial',
scenes: [
{
type: 'avatar',
script: 'Welcome to our product demo! Let me show you how it works.',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id'
},
{type: 'video', mediaId: 'product_demo_video_id'},
{
type: 'start_end_frame',
startFrameMediaId: 'start_image_id',
endFrameMediaId: 'end_image_id',
frameModel: 'veo_3_1',
framePrompt: 'Smooth camera zoom out revealing the full scene',
frameDuration: 5
},
{
type: 'picture_in_picture',
script: 'As you can see here, the interface is intuitive and easy to use.',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id',
mediaId: 'screenshot_id'
},
{
type: 'avatar',
script: 'Try it today and see the difference!',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id'
}
],
musicId: 'upbeat_background_id',
aspectRatio: 'ratio_9_16',
caption: {preset: 'modern', alignment: 'bottom', disabled: false},
addStickers: false,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
language: 'en',
webhook: 'https://yoursite.com/webhook',
metadata: {tutorialId: 'getting-started', version: '1.0'}
})
};
fetch('https://api.slidevid.ai/v1/project/create/scenes', 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.slidevid.ai/v1/project/create/scenes",
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([
'name' => 'Product Tutorial',
'scenes' => [
[
'type' => 'avatar',
'script' => 'Welcome to our product demo! Let me show you how it works.',
'avatarId' => 'professional_avatar_id',
'voiceId' => 'confident_voice_id'
],
[
'type' => 'video',
'mediaId' => 'product_demo_video_id'
],
[
'type' => 'start_end_frame',
'startFrameMediaId' => 'start_image_id',
'endFrameMediaId' => 'end_image_id',
'frameModel' => 'veo_3_1',
'framePrompt' => 'Smooth camera zoom out revealing the full scene',
'frameDuration' => 5
],
[
'type' => 'picture_in_picture',
'script' => 'As you can see here, the interface is intuitive and easy to use.',
'avatarId' => 'professional_avatar_id',
'voiceId' => 'confident_voice_id',
'mediaId' => 'screenshot_id'
],
[
'type' => 'avatar',
'script' => 'Try it today and see the difference!',
'avatarId' => 'professional_avatar_id',
'voiceId' => 'confident_voice_id'
]
],
'musicId' => 'upbeat_background_id',
'aspectRatio' => 'ratio_9_16',
'caption' => [
'preset' => 'modern',
'alignment' => 'bottom',
'disabled' => false
],
'addStickers' => false,
'audio' => [
'speed' => 1,
'stability' => 0.5,
'similarityBoost' => 0.75,
'style' => 0,
'useSpeakerBoost' => true
],
'language' => 'en',
'webhook' => 'https://yoursite.com/webhook',
'metadata' => [
'tutorialId' => 'getting-started',
'version' => '1.0'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.slidevid.ai/v1/project/create/scenes"
payload := strings.NewReader("{\n \"name\": \"Product Tutorial\",\n \"scenes\": [\n {\n \"type\": \"avatar\",\n \"script\": \"Welcome to our product demo! Let me show you how it works.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n },\n {\n \"type\": \"video\",\n \"mediaId\": \"product_demo_video_id\"\n },\n {\n \"type\": \"start_end_frame\",\n \"startFrameMediaId\": \"start_image_id\",\n \"endFrameMediaId\": \"end_image_id\",\n \"frameModel\": \"veo_3_1\",\n \"framePrompt\": \"Smooth camera zoom out revealing the full scene\",\n \"frameDuration\": 5\n },\n {\n \"type\": \"picture_in_picture\",\n \"script\": \"As you can see here, the interface is intuitive and easy to use.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\",\n \"mediaId\": \"screenshot_id\"\n },\n {\n \"type\": \"avatar\",\n \"script\": \"Try it today and see the difference!\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n }\n ],\n \"musicId\": \"upbeat_background_id\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"modern\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": false,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"tutorialId\": \"getting-started\",\n \"version\": \"1.0\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.slidevid.ai/v1/project/create/scenes")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Product Tutorial\",\n \"scenes\": [\n {\n \"type\": \"avatar\",\n \"script\": \"Welcome to our product demo! Let me show you how it works.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n },\n {\n \"type\": \"video\",\n \"mediaId\": \"product_demo_video_id\"\n },\n {\n \"type\": \"start_end_frame\",\n \"startFrameMediaId\": \"start_image_id\",\n \"endFrameMediaId\": \"end_image_id\",\n \"frameModel\": \"veo_3_1\",\n \"framePrompt\": \"Smooth camera zoom out revealing the full scene\",\n \"frameDuration\": 5\n },\n {\n \"type\": \"picture_in_picture\",\n \"script\": \"As you can see here, the interface is intuitive and easy to use.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\",\n \"mediaId\": \"screenshot_id\"\n },\n {\n \"type\": \"avatar\",\n \"script\": \"Try it today and see the difference!\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n }\n ],\n \"musicId\": \"upbeat_background_id\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"modern\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": false,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"tutorialId\": \"getting-started\",\n \"version\": \"1.0\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slidevid.ai/v1/project/create/scenes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Product Tutorial\",\n \"scenes\": [\n {\n \"type\": \"avatar\",\n \"script\": \"Welcome to our product demo! Let me show you how it works.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n },\n {\n \"type\": \"video\",\n \"mediaId\": \"product_demo_video_id\"\n },\n {\n \"type\": \"start_end_frame\",\n \"startFrameMediaId\": \"start_image_id\",\n \"endFrameMediaId\": \"end_image_id\",\n \"frameModel\": \"veo_3_1\",\n \"framePrompt\": \"Smooth camera zoom out revealing the full scene\",\n \"frameDuration\": 5\n },\n {\n \"type\": \"picture_in_picture\",\n \"script\": \"As you can see here, the interface is intuitive and easy to use.\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\",\n \"mediaId\": \"screenshot_id\"\n },\n {\n \"type\": \"avatar\",\n \"script\": \"Try it today and see the difference!\",\n \"avatarId\": \"professional_avatar_id\",\n \"voiceId\": \"confident_voice_id\"\n }\n ],\n \"musicId\": \"upbeat_background_id\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"modern\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": false,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"tutorialId\": \"getting-started\",\n \"version\": \"1.0\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"projectId": "proj_scenes_abc123xyz",
"message": "Scenes project successfully created"
}
{
"success": false,
"message": "At least one scene is required"
}
{
"success": false,
"message": "scenes.0.script: Script is required for avatar scenes"
}
{
"success": false,
"message": "Not enough credits for scenes video. Estimated: 50, Available: 25"
}
Try it out! Use the API playground on the right to test the Scenes endpoint directly.
Overview
Scenes allows you to create complex, multi-scene videos by combining different content types in a storyboard format. Each scene can be one of four types:- Avatar: A talking avatar scene with script and voice
- Video: A video or image clip with optional voiceover
- Picture in Picture: An avatar overlaid on a video/image background
- Start/End Frame: AI-generated video transition between two images
- Long-form content with multiple segments
- Tutorials with avatar explanations and demo clips
- Marketing videos with varied visual styles
- Storytelling with scene transitions
- Educational content mixing talking heads and visuals
Scenes automatically handles transitions between different scene types and maintains consistent captions throughout the video.
Endpoint
POST /v1/project/create/scenes
Required Fields
array
required
Array of scene objects (1-50 scenes). Each scene defines a segment of your video.
Show Scene Object
Show Scene Object
string
required
The type of scene:
avatar: Talking avatar scenevideo: Video/image clip scenepicture_in_picture: Avatar overlaid on video/imagestart_end_frame: AI-generated video from start/end images
string
The script for the avatar to speak (max 5,000 characters). Required for
avatar and picture_in_picture types.string
Avatar ID from
/v1/avatar/list. Required for avatar and picture_in_picture types.string
Voice ID from
/v1/voice/list. Required for avatar and picture_in_picture types.string
Media ID for video/image content. Required for
video and picture_in_picture types.string
Media ID for the starting frame image. Required for
start_end_frame type.string
Media ID for the ending frame image. Required for
start_end_frame type.string
AI model for generating the transition video:
kling_2_5: Kling 2.5 modelveo_3_1: Google Veo 3.1 model
string
Prompt describing the transition between start and end frames (max 2,000 characters).
number
Duration of the AI-generated transition video in seconds. Must be between 1 and 300. Default: 5.
Optional Fields
string
Video name (max 100 characters). If not provided, a name will be auto-generated from the scene scripts.
string
Background music ID from
/v1/music/list.object
Caption settings for the video
Show Caption Object
Show Caption Object
string
default:"classic"
Caption preset style. Available presets:
default, beast, umi, tiktok, wrap1, wrap2, ariel, hooked, classic, active, bubble, glass, comic, glow, pastel, neon, retroTV, red, marker, modern, blue, vivid.string
default:"bottom"
Caption position on the video:
top, middle, or bottomboolean
default:"true"
Set to
false to show captions on the videostring
default:"ratio_9_16"
Video aspect ratio:
ratio_9_16: Vertical (TikTok, Reels, Shorts) - Recommendedratio_16_9: Horizontal (YouTube)ratio_1_1: Square (Instagram)
string
default:"en"
Language code for the video (2 characters). Example:
en, esstring
HTTPS URL to receive completion notification (max 500 characters). Highly recommended for production use.
object
Custom metadata object (max 5KB). Store any additional data you need to associate with this video.
{
"courseId": "course_123",
"lessonNumber": 5
}
Scene Types
Avatar Scene
A talking avatar presents content with synchronized lip movements.{
"type": "avatar",
"script": "Welcome to our tutorial! Today we'll learn about...",
"avatarId": "professional_avatar_id",
"voiceId": "confident_voice_id"
}
script, avatarId, voiceId
Video Scene
A video or image clip plays, optionally with voiceover.{
"type": "video",
"mediaId": "demo_video_id",
"script": "As you can see in this demo...",
"voiceId": "professional_voice_id"
}
mediaId
Picture in Picture Scene
An avatar appears overlaid on a video/image background.{
"type": "picture_in_picture",
"script": "As you can see in this demo...",
"avatarId": "presenter_avatar_id",
"voiceId": "professional_voice_id",
"mediaId": "background_video_id"
}
script, avatarId, voiceId, mediaId
Start/End Frame Scene
AI generates a video transition between two images.{
"type": "start_end_frame",
"startFrameMediaId": "start_image_id",
"endFrameMediaId": "end_image_id",
"frameModel": "veo_3_1",
"framePrompt": "Smooth camera zoom out revealing the full scene",
"frameDuration": 5
}
startFrameMediaId, endFrameMediaId, framePrompt
Request Examples
Basic Multi-Scene Video
const response = await fetch('https://api.slidevid.ai/v1/project/create/scenes', {
method: 'POST',
headers: {
'x-api-key': process.env.SLIDEVID_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
scenes: [
{
type: 'avatar',
script: 'Welcome to our product demo! Let me show you how it works.',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id'
},
{
type: 'video',
mediaId: 'product_demo_video_id'
},
{
type: 'avatar',
script: 'As you can see, it is incredibly easy to use. Try it today!',
avatarId: 'professional_avatar_id',
voiceId: 'confident_voice_id'
}
]
})
});
const data = await response.json();
console.log('Project ID:', data.projectId);
Tutorial with Picture in Picture
const createTutorial = async () => {
const response = await fetch('https://api.slidevid.ai/v1/project/create/scenes', {
method: 'POST',
headers: {
'x-api-key': process.env.SLIDEVID_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Getting Started Tutorial',
scenes: [
{
type: 'avatar',
script: 'Hi there! In this tutorial, I will walk you through the setup process step by step.',
avatarId: 'friendly_avatar_id',
voiceId: 'warm_voice_id'
},
{
type: 'picture_in_picture',
script: 'First, click on the settings icon in the top right corner.',
avatarId: 'friendly_avatar_id',
voiceId: 'warm_voice_id',
mediaId: 'settings_screenshot_id'
},
{
type: 'picture_in_picture',
script: 'Then, navigate to the integrations tab and enable the API access.',
avatarId: 'friendly_avatar_id',
voiceId: 'warm_voice_id',
mediaId: 'integrations_screenshot_id'
},
{
type: 'avatar',
script: 'And that is it! You are all set up and ready to go.',
avatarId: 'friendly_avatar_id',
voiceId: 'warm_voice_id'
}
],
musicId: 'upbeat_background_id',
aspectRatio: 'ratio_16_9',
caption: {
preset: 'modern',
alignment: 'bottom',
disabled: false
},
language: 'en',
webhook: 'https://yoursite.com/webhook',
metadata: {
tutorialId: 'getting-started',
version: '1.0'
}
})
});
return await response.json();
};
AI Transition Video
const createTransitionVideo = async () => {
const response = await fetch('https://api.slidevid.ai/v1/project/create/scenes', {
method: 'POST',
headers: {
'x-api-key': process.env.SLIDEVID_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
scenes: [
{
type: 'avatar',
script: 'Watch this amazing transformation!',
avatarId: 'energetic_avatar_id',
voiceId: 'excited_voice_id'
},
{
type: 'start_end_frame',
startFrameMediaId: 'before_image_id',
endFrameMediaId: 'after_image_id',
frameModel: 'veo_3_1',
framePrompt: 'Smooth morphing transition from the before state to the after state with elegant camera movement'
},
{
type: 'avatar',
script: 'Incredible, right? This is the power of our solution.',
avatarId: 'energetic_avatar_id',
voiceId: 'excited_voice_id'
}
],
aspectRatio: 'ratio_9_16'
})
});
return await response.json();
};
Response
{
"success": true,
"projectId": "proj_scenes_abc123xyz",
"message": "Scenes project successfully created"
}
{
"success": false,
"message": "At least one scene is required"
}
{
"success": false,
"message": "scenes.0.script: Script is required for avatar scenes"
}
{
"success": false,
"message": "Not enough credits for scenes video. Estimated: 50, Available: 25"
}
Webhook Notification
When your video is ready, we’ll POST to your webhook URL:Webhook Payload
{
"status": "COMPLETED",
"data": {
"videoId": "vid_scenes_abc123xyz",
"status": "COMPLETED",
"url": "https://cdn.slidevid.ai/videos/abc123xyz.mp4",
"shareUrl": "https://cdn.slidevid.ai/shared/abc123xyz.mp4",
"metadata": {
"projectId": "proj_scenes_abc123xyz",
"tutorialId": "getting-started"
}
},
"message": "Video completed"
}
Your webhook endpoint must return a
200 status code. We’ll retry up to 3 times if the request fails.Scene Type Requirements
| Scene Type | Required Fields | Optional Fields |
|---|---|---|
avatar | script, avatarId, voiceId | |
video | mediaId | script, voiceId, |
picture_in_picture | script, avatarId, voiceId, mediaId | |
start_end_frame | startFrameMediaId, endFrameMediaId, framePrompt | frameModel, frameDuration |
AI Models for Start/End Frame
| Model | Description | Best For |
|---|---|---|
kling_2_5 | Kling 2.5 model | Fast generation, general transitions |
veo_3_1 | Google Veo 3.1 | High quality, complex camera movements |
Caption Presets
Available caption presets for thecaption.preset field:
| Preset | Description |
|---|---|
default | Default caption style with bold text and shadow effects |
beast | Bold uppercase style with Komika font |
umi | Yellow glowing text style |
tiktok | Viral & trendy style, perfect for social media |
wrap1 | Wrapped style with red background highlight |
wrap2 | Wrapped style with blue background highlight (uppercase) |
ariel | Bold uppercase style with purple highlight |
hooked | Brand style with purple background |
classic | Clean, simple captions with black background |
active | Green background with bold text |
bubble | White background bubble style |
glass | Glassmorphic transparency effect |
comic | Comic Sans font with colorful style |
glow | Pink and orange glow effects |
pastel | Soft pastel pink background |
neon | Green neon glow effect |
retroTV | Retro TV style with cyan glow |
red | Red glow effect with white text |
marker | Yellow marker/highlighter style |
modern | Contemporary white background style |
blue | Blue background style |
vivid | Vibrant pink background with uppercase text |
Best Practices
Plan Your Storyboard
Outline your scenes before creating. Each scene should serve a clear purpose in the narrative.
Consistent Avatar
Use the same avatar across scenes for continuity, unless intentionally switching perspectives.
Vary Scene Types
Mix avatar, video, and PiP scenes to keep viewers engaged and add visual variety.
Smooth Transitions
Write scripts that flow naturally between scenes. End one scene leading into the next.
Optimize Duration
Keep individual scenes focused. Split long content into multiple shorter scenes.
Use Start/End Frames
Leverage AI transitions for impressive visual effects between static images.
Error Handling
| Error | Description | Solution |
|---|---|---|
At least one scene is required | Empty scenes array | Add at least one scene to the array |
Cannot have more than 50 scenes | Too many scenes | Reduce the number of scenes to 50 or fewer |
Script is required for avatar scenes | Missing script in avatar scene | Add the script field |
Avatar ID is required for avatar scenes | Missing avatarId | Add a valid avatarId from /v1/avatar/list |
Voice ID is required for avatar scenes | Missing voiceId | Add a valid voiceId from /v1/voice/list |
Media ID is required for video scenes | Missing mediaId in video scene | Add a valid mediaId |
Not enough credits | Insufficient credits | Top up your account credits |
Credits
Scenes videos use a credit model based on:- Base credits: Fixed cost per video
- Avatar scene credits: Charged based on script duration (similar to UGC Video)
- Video scenes: Included in base credits (no additional charge)
- Start/End Frame: Additional credits for AI generation
Next Steps
List Avatars
Browse available avatars for your scenes
List Voices
Find the perfect voice for your avatars
List Music
Add background music to your video
Webhooks Guide
Learn how to handle webhook notifications
Authorizations
Body
application/json
Array of scene objects (1-50 scenes)
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Video name (max 100 characters)
Maximum string length:
100Background music ID from /v1/music/list
Maximum string length:
30Video aspect ratio
Available options:
ratio_9_16, ratio_16_9, ratio_1_1 Show child attributes
Show child attributes
Add AI-generated stickers to enhance video engagement
Language code (2 characters)
Required string length:
2HTTPS URL to receive completion notification
Maximum string length:
500Custom metadata object (max 5KB)
⌘I