Create TikTok Slideshow
curl --request POST \
--url https://api.slidevid.ai/v1/project/create/tiktok-slideshow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Summer Collection 2024",
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"musicId": "upbeat_001",
"slides": [
{
"url": "https://your-cdn.com/summer1.jpg",
"mediaId": "media_summer_001",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Summer Collection 2024",
"x": 100,
"y": 150,
"width": 880,
"height": 100,
"fontSize": 52,
"fontWeight": "700",
"color": "#ffffff",
"backgroundColor": "#ff6b6b",
"textAlign": "center",
"borderRadius": 12,
"padding": 20,
"opacity": 0.95
},
{
"text": "Fresh & Stylish",
"x": 200,
"y": 280,
"width": 680,
"height": 70,
"fontSize": 32,
"fontWeight": "600",
"color": "#ffed4e",
"backgroundColor": "transparent",
"textAlign": "center"
}
],
"isAIGenerated": false
},
{
"url": "https://your-cdn.com/summer2.jpg",
"mediaId": "media_summer_002",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "100% Premium Cotton",
"x": 150,
"y": 1400,
"width": 780,
"height": 90,
"fontSize": 36,
"fontWeight": "600",
"color": "#ffffff",
"backgroundColor": "#000000",
"textAlign": "center",
"borderRadius": 10,
"padding": 12,
"opacity": 0.9
}
],
"isAIGenerated": false
},
{
"url": "https://your-cdn.com/summer3.jpg",
"mediaId": "media_summer_003",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Shop Now!",
"x": 200,
"y": 1650,
"width": 680,
"height": 120,
"fontSize": 56,
"fontWeight": "800",
"color": "#000000",
"backgroundColor": "#ffed4e",
"textAlign": "center",
"borderRadius": 20,
"padding": 25,
"scale": 1.1
}
],
"isAIGenerated": false
}
],
"aspectRatio": "ratio_9_16",
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"campaignId": "summer-2024",
"collection": "beachwear",
"variant": "A"
}
}
'import requests
url = "https://api.slidevid.ai/v1/project/create/tiktok-slideshow"
payload = {
"name": "Summer Collection 2024",
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"musicId": "upbeat_001",
"slides": [
{
"url": "https://your-cdn.com/summer1.jpg",
"mediaId": "media_summer_001",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Summer Collection 2024",
"x": 100,
"y": 150,
"width": 880,
"height": 100,
"fontSize": 52,
"fontWeight": "700",
"color": "#ffffff",
"backgroundColor": "#ff6b6b",
"textAlign": "center",
"borderRadius": 12,
"padding": 20,
"opacity": 0.95
},
{
"text": "Fresh & Stylish",
"x": 200,
"y": 280,
"width": 680,
"height": 70,
"fontSize": 32,
"fontWeight": "600",
"color": "#ffed4e",
"backgroundColor": "transparent",
"textAlign": "center"
}
],
"isAIGenerated": False
},
{
"url": "https://your-cdn.com/summer2.jpg",
"mediaId": "media_summer_002",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "100% Premium Cotton",
"x": 150,
"y": 1400,
"width": 780,
"height": 90,
"fontSize": 36,
"fontWeight": "600",
"color": "#ffffff",
"backgroundColor": "#000000",
"textAlign": "center",
"borderRadius": 10,
"padding": 12,
"opacity": 0.9
}
],
"isAIGenerated": False
},
{
"url": "https://your-cdn.com/summer3.jpg",
"mediaId": "media_summer_003",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Shop Now!",
"x": 200,
"y": 1650,
"width": 680,
"height": 120,
"fontSize": 56,
"fontWeight": "800",
"color": "#000000",
"backgroundColor": "#ffed4e",
"textAlign": "center",
"borderRadius": 20,
"padding": 25,
"scale": 1.1
}
],
"isAIGenerated": False
}
],
"aspectRatio": "ratio_9_16",
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"campaignId": "summer-2024",
"collection": "beachwear",
"variant": "A"
}
}
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: 'Summer Collection 2024',
script: 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
avatarId: 'avatar_id',
voiceId: 'tzX5paJ07p5hyWFcU3uG',
musicId: 'upbeat_001',
slides: [
{
url: 'https://your-cdn.com/summer1.jpg',
mediaId: 'media_summer_001',
mediaType: 'image',
duration: 4,
texts: [
{
text: 'Summer Collection 2024',
x: 100,
y: 150,
width: 880,
height: 100,
fontSize: 52,
fontWeight: '700',
color: '#ffffff',
backgroundColor: '#ff6b6b',
textAlign: 'center',
borderRadius: 12,
padding: 20,
opacity: 0.95
},
{
text: 'Fresh & Stylish',
x: 200,
y: 280,
width: 680,
height: 70,
fontSize: 32,
fontWeight: '600',
color: '#ffed4e',
backgroundColor: 'transparent',
textAlign: 'center'
}
],
isAIGenerated: false
},
{
url: 'https://your-cdn.com/summer2.jpg',
mediaId: 'media_summer_002',
mediaType: 'image',
duration: 4,
texts: [
{
text: '100% Premium Cotton',
x: 150,
y: 1400,
width: 780,
height: 90,
fontSize: 36,
fontWeight: '600',
color: '#ffffff',
backgroundColor: '#000000',
textAlign: 'center',
borderRadius: 10,
padding: 12,
opacity: 0.9
}
],
isAIGenerated: false
},
{
url: 'https://your-cdn.com/summer3.jpg',
mediaId: 'media_summer_003',
mediaType: 'image',
duration: 4,
texts: [
{
text: 'Shop Now!',
x: 200,
y: 1650,
width: 680,
height: 120,
fontSize: 56,
fontWeight: '800',
color: '#000000',
backgroundColor: '#ffed4e',
textAlign: 'center',
borderRadius: 20,
padding: 25,
scale: 1.1
}
],
isAIGenerated: false
}
],
aspectRatio: 'ratio_9_16',
language: 'en',
webhook: 'https://yoursite.com/webhook',
metadata: {campaignId: 'summer-2024', collection: 'beachwear', variant: 'A'}
})
};
fetch('https://api.slidevid.ai/v1/project/create/tiktok-slideshow', 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/tiktok-slideshow",
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' => 'Summer Collection 2024',
'script' => 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
'avatarId' => 'avatar_id',
'voiceId' => 'tzX5paJ07p5hyWFcU3uG',
'musicId' => 'upbeat_001',
'slides' => [
[
'url' => 'https://your-cdn.com/summer1.jpg',
'mediaId' => 'media_summer_001',
'mediaType' => 'image',
'duration' => 4,
'texts' => [
[
'text' => 'Summer Collection 2024',
'x' => 100,
'y' => 150,
'width' => 880,
'height' => 100,
'fontSize' => 52,
'fontWeight' => '700',
'color' => '#ffffff',
'backgroundColor' => '#ff6b6b',
'textAlign' => 'center',
'borderRadius' => 12,
'padding' => 20,
'opacity' => 0.95
],
[
'text' => 'Fresh & Stylish',
'x' => 200,
'y' => 280,
'width' => 680,
'height' => 70,
'fontSize' => 32,
'fontWeight' => '600',
'color' => '#ffed4e',
'backgroundColor' => 'transparent',
'textAlign' => 'center'
]
],
'isAIGenerated' => false
],
[
'url' => 'https://your-cdn.com/summer2.jpg',
'mediaId' => 'media_summer_002',
'mediaType' => 'image',
'duration' => 4,
'texts' => [
[
'text' => '100% Premium Cotton',
'x' => 150,
'y' => 1400,
'width' => 780,
'height' => 90,
'fontSize' => 36,
'fontWeight' => '600',
'color' => '#ffffff',
'backgroundColor' => '#000000',
'textAlign' => 'center',
'borderRadius' => 10,
'padding' => 12,
'opacity' => 0.9
]
],
'isAIGenerated' => false
],
[
'url' => 'https://your-cdn.com/summer3.jpg',
'mediaId' => 'media_summer_003',
'mediaType' => 'image',
'duration' => 4,
'texts' => [
[
'text' => 'Shop Now!',
'x' => 200,
'y' => 1650,
'width' => 680,
'height' => 120,
'fontSize' => 56,
'fontWeight' => '800',
'color' => '#000000',
'backgroundColor' => '#ffed4e',
'textAlign' => 'center',
'borderRadius' => 20,
'padding' => 25,
'scale' => 1.1
]
],
'isAIGenerated' => false
]
],
'aspectRatio' => 'ratio_9_16',
'language' => 'en',
'webhook' => 'https://yoursite.com/webhook',
'metadata' => [
'campaignId' => 'summer-2024',
'collection' => 'beachwear',
'variant' => 'A'
]
]),
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/tiktok-slideshow"
payload := strings.NewReader("{\n \"name\": \"Summer Collection 2024\",\n \"script\": \"Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!\",\n \"avatarId\": \"avatar_id\",\n \"voiceId\": \"tzX5paJ07p5hyWFcU3uG\",\n \"musicId\": \"upbeat_001\",\n \"slides\": [\n {\n \"url\": \"https://your-cdn.com/summer1.jpg\",\n \"mediaId\": \"media_summer_001\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Summer Collection 2024\",\n \"x\": 100,\n \"y\": 150,\n \"width\": 880,\n \"height\": 100,\n \"fontSize\": 52,\n \"fontWeight\": \"700\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#ff6b6b\",\n \"textAlign\": \"center\",\n \"borderRadius\": 12,\n \"padding\": 20,\n \"opacity\": 0.95\n },\n {\n \"text\": \"Fresh & Stylish\",\n \"x\": 200,\n \"y\": 280,\n \"width\": 680,\n \"height\": 70,\n \"fontSize\": 32,\n \"fontWeight\": \"600\",\n \"color\": \"#ffed4e\",\n \"backgroundColor\": \"transparent\",\n \"textAlign\": \"center\"\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer2.jpg\",\n \"mediaId\": \"media_summer_002\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"100% Premium Cotton\",\n \"x\": 150,\n \"y\": 1400,\n \"width\": 780,\n \"height\": 90,\n \"fontSize\": 36,\n \"fontWeight\": \"600\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#000000\",\n \"textAlign\": \"center\",\n \"borderRadius\": 10,\n \"padding\": 12,\n \"opacity\": 0.9\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer3.jpg\",\n \"mediaId\": \"media_summer_003\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Shop Now!\",\n \"x\": 200,\n \"y\": 1650,\n \"width\": 680,\n \"height\": 120,\n \"fontSize\": 56,\n \"fontWeight\": \"800\",\n \"color\": \"#000000\",\n \"backgroundColor\": \"#ffed4e\",\n \"textAlign\": \"center\",\n \"borderRadius\": 20,\n \"padding\": 25,\n \"scale\": 1.1\n }\n ],\n \"isAIGenerated\": false\n }\n ],\n \"aspectRatio\": \"ratio_9_16\",\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"campaignId\": \"summer-2024\",\n \"collection\": \"beachwear\",\n \"variant\": \"A\"\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/tiktok-slideshow")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Summer Collection 2024\",\n \"script\": \"Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!\",\n \"avatarId\": \"avatar_id\",\n \"voiceId\": \"tzX5paJ07p5hyWFcU3uG\",\n \"musicId\": \"upbeat_001\",\n \"slides\": [\n {\n \"url\": \"https://your-cdn.com/summer1.jpg\",\n \"mediaId\": \"media_summer_001\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Summer Collection 2024\",\n \"x\": 100,\n \"y\": 150,\n \"width\": 880,\n \"height\": 100,\n \"fontSize\": 52,\n \"fontWeight\": \"700\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#ff6b6b\",\n \"textAlign\": \"center\",\n \"borderRadius\": 12,\n \"padding\": 20,\n \"opacity\": 0.95\n },\n {\n \"text\": \"Fresh & Stylish\",\n \"x\": 200,\n \"y\": 280,\n \"width\": 680,\n \"height\": 70,\n \"fontSize\": 32,\n \"fontWeight\": \"600\",\n \"color\": \"#ffed4e\",\n \"backgroundColor\": \"transparent\",\n \"textAlign\": \"center\"\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer2.jpg\",\n \"mediaId\": \"media_summer_002\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"100% Premium Cotton\",\n \"x\": 150,\n \"y\": 1400,\n \"width\": 780,\n \"height\": 90,\n \"fontSize\": 36,\n \"fontWeight\": \"600\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#000000\",\n \"textAlign\": \"center\",\n \"borderRadius\": 10,\n \"padding\": 12,\n \"opacity\": 0.9\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer3.jpg\",\n \"mediaId\": \"media_summer_003\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Shop Now!\",\n \"x\": 200,\n \"y\": 1650,\n \"width\": 680,\n \"height\": 120,\n \"fontSize\": 56,\n \"fontWeight\": \"800\",\n \"color\": \"#000000\",\n \"backgroundColor\": \"#ffed4e\",\n \"textAlign\": \"center\",\n \"borderRadius\": 20,\n \"padding\": 25,\n \"scale\": 1.1\n }\n ],\n \"isAIGenerated\": false\n }\n ],\n \"aspectRatio\": \"ratio_9_16\",\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"campaignId\": \"summer-2024\",\n \"collection\": \"beachwear\",\n \"variant\": \"A\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slidevid.ai/v1/project/create/tiktok-slideshow")
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\": \"Summer Collection 2024\",\n \"script\": \"Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!\",\n \"avatarId\": \"avatar_id\",\n \"voiceId\": \"tzX5paJ07p5hyWFcU3uG\",\n \"musicId\": \"upbeat_001\",\n \"slides\": [\n {\n \"url\": \"https://your-cdn.com/summer1.jpg\",\n \"mediaId\": \"media_summer_001\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Summer Collection 2024\",\n \"x\": 100,\n \"y\": 150,\n \"width\": 880,\n \"height\": 100,\n \"fontSize\": 52,\n \"fontWeight\": \"700\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#ff6b6b\",\n \"textAlign\": \"center\",\n \"borderRadius\": 12,\n \"padding\": 20,\n \"opacity\": 0.95\n },\n {\n \"text\": \"Fresh & Stylish\",\n \"x\": 200,\n \"y\": 280,\n \"width\": 680,\n \"height\": 70,\n \"fontSize\": 32,\n \"fontWeight\": \"600\",\n \"color\": \"#ffed4e\",\n \"backgroundColor\": \"transparent\",\n \"textAlign\": \"center\"\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer2.jpg\",\n \"mediaId\": \"media_summer_002\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"100% Premium Cotton\",\n \"x\": 150,\n \"y\": 1400,\n \"width\": 780,\n \"height\": 90,\n \"fontSize\": 36,\n \"fontWeight\": \"600\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#000000\",\n \"textAlign\": \"center\",\n \"borderRadius\": 10,\n \"padding\": 12,\n \"opacity\": 0.9\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer3.jpg\",\n \"mediaId\": \"media_summer_003\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Shop Now!\",\n \"x\": 200,\n \"y\": 1650,\n \"width\": 680,\n \"height\": 120,\n \"fontSize\": 56,\n \"fontWeight\": \"800\",\n \"color\": \"#000000\",\n \"backgroundColor\": \"#ffed4e\",\n \"textAlign\": \"center\",\n \"borderRadius\": 20,\n \"padding\": 25,\n \"scale\": 1.1\n }\n ],\n \"isAIGenerated\": false\n }\n ],\n \"aspectRatio\": \"ratio_9_16\",\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"campaignId\": \"summer-2024\",\n \"collection\": \"beachwear\",\n \"variant\": \"A\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"videoId": "vid_tiktok_abc123xyz",
"projectId": "proj_tiktok_abc123xyz",
"status": "STARTED"
},
"message": "TikTok Slideshow successfully created"
}
{
"success": false,
"message": "slides: At least one slide is required"
}
{
"success": false,
"message": "slides.0.texts.0.x: Number must be greater than or equal to 0"
}
{
"success": false,
"message": "voiceId: Voice \"invalid_voice\" not found."
}
Videos
TikTok Slideshow
Create TikTok-style slideshow videos with text overlays and custom positioning
POST
/
v1
/
project
/
create
/
tiktok-slideshow
Create TikTok Slideshow
curl --request POST \
--url https://api.slidevid.ai/v1/project/create/tiktok-slideshow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Summer Collection 2024",
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"musicId": "upbeat_001",
"slides": [
{
"url": "https://your-cdn.com/summer1.jpg",
"mediaId": "media_summer_001",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Summer Collection 2024",
"x": 100,
"y": 150,
"width": 880,
"height": 100,
"fontSize": 52,
"fontWeight": "700",
"color": "#ffffff",
"backgroundColor": "#ff6b6b",
"textAlign": "center",
"borderRadius": 12,
"padding": 20,
"opacity": 0.95
},
{
"text": "Fresh & Stylish",
"x": 200,
"y": 280,
"width": 680,
"height": 70,
"fontSize": 32,
"fontWeight": "600",
"color": "#ffed4e",
"backgroundColor": "transparent",
"textAlign": "center"
}
],
"isAIGenerated": false
},
{
"url": "https://your-cdn.com/summer2.jpg",
"mediaId": "media_summer_002",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "100% Premium Cotton",
"x": 150,
"y": 1400,
"width": 780,
"height": 90,
"fontSize": 36,
"fontWeight": "600",
"color": "#ffffff",
"backgroundColor": "#000000",
"textAlign": "center",
"borderRadius": 10,
"padding": 12,
"opacity": 0.9
}
],
"isAIGenerated": false
},
{
"url": "https://your-cdn.com/summer3.jpg",
"mediaId": "media_summer_003",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Shop Now!",
"x": 200,
"y": 1650,
"width": 680,
"height": 120,
"fontSize": 56,
"fontWeight": "800",
"color": "#000000",
"backgroundColor": "#ffed4e",
"textAlign": "center",
"borderRadius": 20,
"padding": 25,
"scale": 1.1
}
],
"isAIGenerated": false
}
],
"aspectRatio": "ratio_9_16",
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"campaignId": "summer-2024",
"collection": "beachwear",
"variant": "A"
}
}
'import requests
url = "https://api.slidevid.ai/v1/project/create/tiktok-slideshow"
payload = {
"name": "Summer Collection 2024",
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"musicId": "upbeat_001",
"slides": [
{
"url": "https://your-cdn.com/summer1.jpg",
"mediaId": "media_summer_001",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Summer Collection 2024",
"x": 100,
"y": 150,
"width": 880,
"height": 100,
"fontSize": 52,
"fontWeight": "700",
"color": "#ffffff",
"backgroundColor": "#ff6b6b",
"textAlign": "center",
"borderRadius": 12,
"padding": 20,
"opacity": 0.95
},
{
"text": "Fresh & Stylish",
"x": 200,
"y": 280,
"width": 680,
"height": 70,
"fontSize": 32,
"fontWeight": "600",
"color": "#ffed4e",
"backgroundColor": "transparent",
"textAlign": "center"
}
],
"isAIGenerated": False
},
{
"url": "https://your-cdn.com/summer2.jpg",
"mediaId": "media_summer_002",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "100% Premium Cotton",
"x": 150,
"y": 1400,
"width": 780,
"height": 90,
"fontSize": 36,
"fontWeight": "600",
"color": "#ffffff",
"backgroundColor": "#000000",
"textAlign": "center",
"borderRadius": 10,
"padding": 12,
"opacity": 0.9
}
],
"isAIGenerated": False
},
{
"url": "https://your-cdn.com/summer3.jpg",
"mediaId": "media_summer_003",
"mediaType": "image",
"duration": 4,
"texts": [
{
"text": "Shop Now!",
"x": 200,
"y": 1650,
"width": 680,
"height": 120,
"fontSize": 56,
"fontWeight": "800",
"color": "#000000",
"backgroundColor": "#ffed4e",
"textAlign": "center",
"borderRadius": 20,
"padding": 25,
"scale": 1.1
}
],
"isAIGenerated": False
}
],
"aspectRatio": "ratio_9_16",
"language": "en",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"campaignId": "summer-2024",
"collection": "beachwear",
"variant": "A"
}
}
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: 'Summer Collection 2024',
script: 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
avatarId: 'avatar_id',
voiceId: 'tzX5paJ07p5hyWFcU3uG',
musicId: 'upbeat_001',
slides: [
{
url: 'https://your-cdn.com/summer1.jpg',
mediaId: 'media_summer_001',
mediaType: 'image',
duration: 4,
texts: [
{
text: 'Summer Collection 2024',
x: 100,
y: 150,
width: 880,
height: 100,
fontSize: 52,
fontWeight: '700',
color: '#ffffff',
backgroundColor: '#ff6b6b',
textAlign: 'center',
borderRadius: 12,
padding: 20,
opacity: 0.95
},
{
text: 'Fresh & Stylish',
x: 200,
y: 280,
width: 680,
height: 70,
fontSize: 32,
fontWeight: '600',
color: '#ffed4e',
backgroundColor: 'transparent',
textAlign: 'center'
}
],
isAIGenerated: false
},
{
url: 'https://your-cdn.com/summer2.jpg',
mediaId: 'media_summer_002',
mediaType: 'image',
duration: 4,
texts: [
{
text: '100% Premium Cotton',
x: 150,
y: 1400,
width: 780,
height: 90,
fontSize: 36,
fontWeight: '600',
color: '#ffffff',
backgroundColor: '#000000',
textAlign: 'center',
borderRadius: 10,
padding: 12,
opacity: 0.9
}
],
isAIGenerated: false
},
{
url: 'https://your-cdn.com/summer3.jpg',
mediaId: 'media_summer_003',
mediaType: 'image',
duration: 4,
texts: [
{
text: 'Shop Now!',
x: 200,
y: 1650,
width: 680,
height: 120,
fontSize: 56,
fontWeight: '800',
color: '#000000',
backgroundColor: '#ffed4e',
textAlign: 'center',
borderRadius: 20,
padding: 25,
scale: 1.1
}
],
isAIGenerated: false
}
],
aspectRatio: 'ratio_9_16',
language: 'en',
webhook: 'https://yoursite.com/webhook',
metadata: {campaignId: 'summer-2024', collection: 'beachwear', variant: 'A'}
})
};
fetch('https://api.slidevid.ai/v1/project/create/tiktok-slideshow', 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/tiktok-slideshow",
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' => 'Summer Collection 2024',
'script' => 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
'avatarId' => 'avatar_id',
'voiceId' => 'tzX5paJ07p5hyWFcU3uG',
'musicId' => 'upbeat_001',
'slides' => [
[
'url' => 'https://your-cdn.com/summer1.jpg',
'mediaId' => 'media_summer_001',
'mediaType' => 'image',
'duration' => 4,
'texts' => [
[
'text' => 'Summer Collection 2024',
'x' => 100,
'y' => 150,
'width' => 880,
'height' => 100,
'fontSize' => 52,
'fontWeight' => '700',
'color' => '#ffffff',
'backgroundColor' => '#ff6b6b',
'textAlign' => 'center',
'borderRadius' => 12,
'padding' => 20,
'opacity' => 0.95
],
[
'text' => 'Fresh & Stylish',
'x' => 200,
'y' => 280,
'width' => 680,
'height' => 70,
'fontSize' => 32,
'fontWeight' => '600',
'color' => '#ffed4e',
'backgroundColor' => 'transparent',
'textAlign' => 'center'
]
],
'isAIGenerated' => false
],
[
'url' => 'https://your-cdn.com/summer2.jpg',
'mediaId' => 'media_summer_002',
'mediaType' => 'image',
'duration' => 4,
'texts' => [
[
'text' => '100% Premium Cotton',
'x' => 150,
'y' => 1400,
'width' => 780,
'height' => 90,
'fontSize' => 36,
'fontWeight' => '600',
'color' => '#ffffff',
'backgroundColor' => '#000000',
'textAlign' => 'center',
'borderRadius' => 10,
'padding' => 12,
'opacity' => 0.9
]
],
'isAIGenerated' => false
],
[
'url' => 'https://your-cdn.com/summer3.jpg',
'mediaId' => 'media_summer_003',
'mediaType' => 'image',
'duration' => 4,
'texts' => [
[
'text' => 'Shop Now!',
'x' => 200,
'y' => 1650,
'width' => 680,
'height' => 120,
'fontSize' => 56,
'fontWeight' => '800',
'color' => '#000000',
'backgroundColor' => '#ffed4e',
'textAlign' => 'center',
'borderRadius' => 20,
'padding' => 25,
'scale' => 1.1
]
],
'isAIGenerated' => false
]
],
'aspectRatio' => 'ratio_9_16',
'language' => 'en',
'webhook' => 'https://yoursite.com/webhook',
'metadata' => [
'campaignId' => 'summer-2024',
'collection' => 'beachwear',
'variant' => 'A'
]
]),
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/tiktok-slideshow"
payload := strings.NewReader("{\n \"name\": \"Summer Collection 2024\",\n \"script\": \"Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!\",\n \"avatarId\": \"avatar_id\",\n \"voiceId\": \"tzX5paJ07p5hyWFcU3uG\",\n \"musicId\": \"upbeat_001\",\n \"slides\": [\n {\n \"url\": \"https://your-cdn.com/summer1.jpg\",\n \"mediaId\": \"media_summer_001\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Summer Collection 2024\",\n \"x\": 100,\n \"y\": 150,\n \"width\": 880,\n \"height\": 100,\n \"fontSize\": 52,\n \"fontWeight\": \"700\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#ff6b6b\",\n \"textAlign\": \"center\",\n \"borderRadius\": 12,\n \"padding\": 20,\n \"opacity\": 0.95\n },\n {\n \"text\": \"Fresh & Stylish\",\n \"x\": 200,\n \"y\": 280,\n \"width\": 680,\n \"height\": 70,\n \"fontSize\": 32,\n \"fontWeight\": \"600\",\n \"color\": \"#ffed4e\",\n \"backgroundColor\": \"transparent\",\n \"textAlign\": \"center\"\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer2.jpg\",\n \"mediaId\": \"media_summer_002\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"100% Premium Cotton\",\n \"x\": 150,\n \"y\": 1400,\n \"width\": 780,\n \"height\": 90,\n \"fontSize\": 36,\n \"fontWeight\": \"600\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#000000\",\n \"textAlign\": \"center\",\n \"borderRadius\": 10,\n \"padding\": 12,\n \"opacity\": 0.9\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer3.jpg\",\n \"mediaId\": \"media_summer_003\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Shop Now!\",\n \"x\": 200,\n \"y\": 1650,\n \"width\": 680,\n \"height\": 120,\n \"fontSize\": 56,\n \"fontWeight\": \"800\",\n \"color\": \"#000000\",\n \"backgroundColor\": \"#ffed4e\",\n \"textAlign\": \"center\",\n \"borderRadius\": 20,\n \"padding\": 25,\n \"scale\": 1.1\n }\n ],\n \"isAIGenerated\": false\n }\n ],\n \"aspectRatio\": \"ratio_9_16\",\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"campaignId\": \"summer-2024\",\n \"collection\": \"beachwear\",\n \"variant\": \"A\"\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/tiktok-slideshow")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Summer Collection 2024\",\n \"script\": \"Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!\",\n \"avatarId\": \"avatar_id\",\n \"voiceId\": \"tzX5paJ07p5hyWFcU3uG\",\n \"musicId\": \"upbeat_001\",\n \"slides\": [\n {\n \"url\": \"https://your-cdn.com/summer1.jpg\",\n \"mediaId\": \"media_summer_001\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Summer Collection 2024\",\n \"x\": 100,\n \"y\": 150,\n \"width\": 880,\n \"height\": 100,\n \"fontSize\": 52,\n \"fontWeight\": \"700\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#ff6b6b\",\n \"textAlign\": \"center\",\n \"borderRadius\": 12,\n \"padding\": 20,\n \"opacity\": 0.95\n },\n {\n \"text\": \"Fresh & Stylish\",\n \"x\": 200,\n \"y\": 280,\n \"width\": 680,\n \"height\": 70,\n \"fontSize\": 32,\n \"fontWeight\": \"600\",\n \"color\": \"#ffed4e\",\n \"backgroundColor\": \"transparent\",\n \"textAlign\": \"center\"\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer2.jpg\",\n \"mediaId\": \"media_summer_002\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"100% Premium Cotton\",\n \"x\": 150,\n \"y\": 1400,\n \"width\": 780,\n \"height\": 90,\n \"fontSize\": 36,\n \"fontWeight\": \"600\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#000000\",\n \"textAlign\": \"center\",\n \"borderRadius\": 10,\n \"padding\": 12,\n \"opacity\": 0.9\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer3.jpg\",\n \"mediaId\": \"media_summer_003\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Shop Now!\",\n \"x\": 200,\n \"y\": 1650,\n \"width\": 680,\n \"height\": 120,\n \"fontSize\": 56,\n \"fontWeight\": \"800\",\n \"color\": \"#000000\",\n \"backgroundColor\": \"#ffed4e\",\n \"textAlign\": \"center\",\n \"borderRadius\": 20,\n \"padding\": 25,\n \"scale\": 1.1\n }\n ],\n \"isAIGenerated\": false\n }\n ],\n \"aspectRatio\": \"ratio_9_16\",\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"campaignId\": \"summer-2024\",\n \"collection\": \"beachwear\",\n \"variant\": \"A\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.slidevid.ai/v1/project/create/tiktok-slideshow")
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\": \"Summer Collection 2024\",\n \"script\": \"Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!\",\n \"avatarId\": \"avatar_id\",\n \"voiceId\": \"tzX5paJ07p5hyWFcU3uG\",\n \"musicId\": \"upbeat_001\",\n \"slides\": [\n {\n \"url\": \"https://your-cdn.com/summer1.jpg\",\n \"mediaId\": \"media_summer_001\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Summer Collection 2024\",\n \"x\": 100,\n \"y\": 150,\n \"width\": 880,\n \"height\": 100,\n \"fontSize\": 52,\n \"fontWeight\": \"700\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#ff6b6b\",\n \"textAlign\": \"center\",\n \"borderRadius\": 12,\n \"padding\": 20,\n \"opacity\": 0.95\n },\n {\n \"text\": \"Fresh & Stylish\",\n \"x\": 200,\n \"y\": 280,\n \"width\": 680,\n \"height\": 70,\n \"fontSize\": 32,\n \"fontWeight\": \"600\",\n \"color\": \"#ffed4e\",\n \"backgroundColor\": \"transparent\",\n \"textAlign\": \"center\"\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer2.jpg\",\n \"mediaId\": \"media_summer_002\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"100% Premium Cotton\",\n \"x\": 150,\n \"y\": 1400,\n \"width\": 780,\n \"height\": 90,\n \"fontSize\": 36,\n \"fontWeight\": \"600\",\n \"color\": \"#ffffff\",\n \"backgroundColor\": \"#000000\",\n \"textAlign\": \"center\",\n \"borderRadius\": 10,\n \"padding\": 12,\n \"opacity\": 0.9\n }\n ],\n \"isAIGenerated\": false\n },\n {\n \"url\": \"https://your-cdn.com/summer3.jpg\",\n \"mediaId\": \"media_summer_003\",\n \"mediaType\": \"image\",\n \"duration\": 4,\n \"texts\": [\n {\n \"text\": \"Shop Now!\",\n \"x\": 200,\n \"y\": 1650,\n \"width\": 680,\n \"height\": 120,\n \"fontSize\": 56,\n \"fontWeight\": \"800\",\n \"color\": \"#000000\",\n \"backgroundColor\": \"#ffed4e\",\n \"textAlign\": \"center\",\n \"borderRadius\": 20,\n \"padding\": 25,\n \"scale\": 1.1\n }\n ],\n \"isAIGenerated\": false\n }\n ],\n \"aspectRatio\": \"ratio_9_16\",\n \"language\": \"en\",\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"campaignId\": \"summer-2024\",\n \"collection\": \"beachwear\",\n \"variant\": \"A\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"videoId": "vid_tiktok_abc123xyz",
"projectId": "proj_tiktok_abc123xyz",
"status": "STARTED"
},
"message": "TikTok Slideshow successfully created"
}
{
"success": false,
"message": "slides: At least one slide is required"
}
{
"success": false,
"message": "slides.0.texts.0.x: Number must be greater than or equal to 0"
}
{
"success": false,
"message": "voiceId: Voice \"invalid_voice\" not found."
}
Try it out! Use the API playground on the right to test the TikTok Slideshow endpoint directly.
Overview
TikTok Slideshow videos combine multiple images or video clips with text overlays, voiceovers, and music to create engaging social media content. Perfect for:- Storytelling with visual elements
- Product showcases with descriptions
- Educational content with slides
- Social media posts with multiple images
- Presentation-style videos
Each slide can contain up to 10 text elements with custom positioning, styling, and animations.
Endpoint
POST /v1/project/create/tiktok-slideshow
Required Fields
array
required
Array of slides for the slideshow (1-50 slides)
Show Slide Object
Show Slide Object
string
required
Public URL to the image or video file (must be valid URL)
string
required
Unique media ID (max 30 characters)
string
required
Media type:
image or videoarray
Array of text elements for this slide (0-10 texts)
Show Text Object
Show Text Object
string
required
Text content (1-500 characters)
number
default:0
X coordinate (must be non-negative and within canvas)
number
Y coordinate (must be non-negative and within canvas)
number
default:280
Width in pixels (minimum 10)
number
default:50
Height in pixels (minimum 10)
number
default:16
Font size in pixels (8-200)
string
default:"600"
Font weight (e.g., “400”, “600”, “bold”)
string
default:"#ffffff"
Text color as hex code (e.g., “#ffffff”)
string
default:"transparent"
Background color for text box
number
default:1
Text opacity (0-1)
number
default:0
Text rotation in degrees (-360 to 360)
number
default:1
Text scale multiplier (0.1-10)
number
default:1
Layer order (higher = on top)
string
default:"center"
Text alignment:
left, center, or rightstring
default:"TikTok Display Medium"
Font family name
number
default:8
Border radius in pixels (0+)
number
default:6
Text padding in pixels (0+)
number
default:80
Maximum width as percentage (0-100)
string
default:"break-word"
Word wrapping:
normal or break-wordnumber
default:3
Slide duration in seconds (0.1-60)
boolean
default:false
Whether the slide media was AI-generated
string
required
Video aspect ratio:
ratio_9_16: Vertical (TikTok, Reels, Shorts) - Defaultratio_16_9: Horizontal (YouTube)ratio_1_1: Square (Instagram)
string
required
Language code (exactly 2 characters, e.g., “en”, “es”)
Optional Fields
string
Project name (1-100 characters). If not provided, a name will be auto-generated.
string
Voiceover script for the slideshow (max 10,000 characters). If provided, requires
voiceId.string
Voice ID for narration from
/v1/voice/list (max 30 characters). Required if script is provided.string
Avatar ID to appear in the video from
/v1/avatar/list (max 30 characters)string
Background music ID from
/v1/music/list (max 30 characters)string
Webhook URL for status notifications (max 500 characters, must be HTTPS)
object
Custom metadata object (max 5KB JSON)
Request Examples
Basic Slideshow
const response = await fetch('https://api.slidevid.ai/v1/project/create/tiktok-slideshow', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Product Launch',
slides: [
{
url: 'https://your-cdn.com/product1.jpg',
mediaId: 'media_001',
mediaType: 'image',
duration: 3,
texts: [
{
text: 'New Product Launch',
x: 100,
y: 800,
width: 880,
height: 120,
fontSize: 48,
fontWeight: '700',
color: '#ffffff',
backgroundColor: '#000000',
textAlign: 'center',
borderRadius: 8,
padding: 10
}
],
isAIGenerated: false
},
{
url: 'https://your-cdn.com/product2.jpg',
mediaId: 'media_002',
mediaType: 'image',
duration: 3,
texts: [
{
text: 'Available Now!',
x: 150,
y: 1650,
width: 780,
height: 100,
fontSize: 42,
fontWeight: '800',
color: '#000000',
backgroundColor: '#00ff00',
textAlign: 'center',
borderRadius: 15,
padding: 8
}
],
isAIGenerated: false
}
],
aspectRatio: 'ratio_9_16',
language: 'en'
})
});
const data = await response.json();
console.log('Video ID:', data.data.videoId);
console.log('Project ID:', data.data.projectId);
Advanced with Avatar and Music
const createAdvancedSlideshow = async () => {
const response = await fetch('https://api.slidevid.ai/v1/project/create/tiktok-slideshow', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Summer Collection 2024',
script: 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
avatarId: 'avatar_id',
voiceId: 'tzX5paJ07p5hyWFcU3uG',
musicId: 'upbeat_001',
slides: [
{
url: 'https://your-cdn.com/summer1.jpg',
mediaId: 'media_summer_001',
mediaType: 'image',
duration: 4,
texts: [
{
text: 'Summer Collection 2024',
x: 100,
y: 150,
width: 880,
height: 100,
fontSize: 52,
fontWeight: '700',
color: '#ffffff',
backgroundColor: '#ff6b6b',
textAlign: 'center',
borderRadius: 12,
padding: 20,
opacity: 0.95
},
{
text: 'Fresh & Stylish',
x: 200,
y: 280,
width: 680,
height: 70,
fontSize: 32,
fontWeight: '600',
color: '#ffed4e',
backgroundColor: 'transparent',
textAlign: 'center'
}
],
isAIGenerated: false
},
{
url: 'https://your-cdn.com/summer2.jpg',
mediaId: 'media_summer_002',
mediaType: 'image',
duration: 4,
texts: [
{
text: '100% Premium Cotton',
x: 150,
y: 1400,
width: 780,
height: 90,
fontSize: 36,
fontWeight: '600',
color: '#ffffff',
backgroundColor: '#000000',
textAlign: 'center',
borderRadius: 10,
padding: 12,
opacity: 0.9
}
],
isAIGenerated: false
},
{
url: 'https://your-cdn.com/summer3.jpg',
mediaId: 'media_summer_003',
mediaType: 'image',
duration: 4,
texts: [
{
text: 'Shop Now!',
x: 200,
y: 1650,
width: 680,
height: 120,
fontSize: 56,
fontWeight: '800',
color: '#000000',
backgroundColor: '#ffed4e',
textAlign: 'center',
borderRadius: 20,
padding: 25,
scale: 1.1
}
],
isAIGenerated: false
}
],
aspectRatio: 'ratio_9_16',
language: 'en',
webhook: 'https://yoursite.com/webhook',
metadata: {
campaignId: 'summer-2024',
collection: 'beachwear',
variant: 'A'
}
})
});
return await response.json();
};
Response
{
"success": true,
"data": {
"videoId": "vid_tiktok_abc123xyz",
"projectId": "proj_tiktok_abc123xyz",
"status": "STARTED"
},
"message": "TikTok Slideshow successfully created"
}
{
"success": false,
"message": "slides: At least one slide is required"
}
{
"success": false,
"message": "slides.0.texts.0.x: Number must be greater than or equal to 0"
}
{
"success": false,
"message": "voiceId: Voice \"invalid_voice\" not found."
}
Webhook Notification
When your video is ready, we’ll POST to your webhook URL (if configured):Webhook Payload
{
"status": "COMPLETED",
"data": {
"videoId": "vid_tiktok_abc123xyz",
"status": "COMPLETED",
"url": "https://cdn.slidevid.ai/videos/abc123xyz.mp4",
"shareUrl": "https://cdn.slidevid.ai/shared/abc123xyz.mp4",
"metadata": {
"projectId": "proj_tiktok_abc123xyz"
}
},
"message": "Video completed"
}
Best Practices
Text Positioning
Canvas dimensions depend on aspect ratio. For 9:16 (1080x1920), ensure coordinates are within bounds.
Slide Duration
Keep slides between 2-5 seconds for optimal engagement.
Text Readability
Use high contrast colors and appropriate font sizes (24-48px) for mobile viewing.
Image Quality
Use high-resolution images (1080px width minimum) for best results.
Coordinate System
The coordinate system for text positioning varies by aspect ratio:| Aspect Ratio | Canvas Size | Description |
|---|---|---|
ratio_9_16 | 1080 x 1920 | Vertical (TikTok/Reels) |
ratio_16_9 | 1920 x 1080 | Horizontal (YouTube) |
ratio_1_1 | 1080 x 1080 | Square (Instagram) |
x: 100, y: 150, width: 880, height: 100 creates a full-width text near the top.
Error Handling
| Error | Description | Solution |
|---|---|---|
slides: At least one slide is required | Empty or missing slides array | Provide at least 1 slide |
slides: Cannot have more than 50 slides | Too many slides | Limit to 50 slides maximum |
slides.0.url: String must contain at least 1 character(s) | Missing or empty slide URL | Provide valid HTTPS URL for each slide |
slides.0.mediaId: String must contain at least 1 character(s) | Missing media ID | Provide unique media ID for each slide |
slides.0.mediaType: Invalid enum value | Invalid media type | Use image or video |
slides.0.texts: Cannot have more than 10 text elements | Too many texts per slide | Limit to 10 text elements per slide |
slides.0.texts.0.text: String must contain at least 1 character(s) | Missing or empty text content | Provide text content (1-500 characters) |
slides.0.texts.0.x: Number must be greater than or equal to 0 | Invalid X position | X position must be within canvas bounds (0-canvas width) |
slides.0.texts.0.width: Number must be greater than or equal to 10 | Invalid width | Width must be at least 10 pixels |
slides.0.texts.0.height: Number must be greater than or equal to 10 | Invalid height | Height must be at least 10 pixels |
slides.0.duration: Number must be greater than or equal to 0.1 | Invalid duration | Duration must be between 0.1 and 60 seconds |
voiceId: Voice "X" not found | Invalid voice ID | Use valid voice ID from /v1/voice/list |
avatarId: Avatar "X" not found | Invalid avatar ID | Use valid avatar ID from /v1/avatar/list |
musicId: Music "X" not found | Invalid music ID | Use valid music ID from /v1/music/list |
webhook: Must be a valid HTTPS URL | Invalid webhook URL | Ensure webhook URL uses HTTPS |
Not enough credits | Insufficient credits | Top up your account credits |
Next Steps
List Videos
View all your created videos
Video Details
Check your video processing status
Webhooks Guide
Learn how to handle webhook notifications
UGC Ads
Create UGC-style advertisement videos
Authorizations
Body
application/json
Array of slides (1-50 slides)
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Video aspect ratio
Available options:
ratio_9_16, ratio_16_9, ratio_1_1 Language code (exactly 2 characters, e.g., en, es, fr)
Required string length:
2Project name (1-100 characters). If not provided, a name will be auto-generated.
Required string length:
1 - 100Voiceover script (max 10,000 characters)
Maximum string length:
10000Voice ID from /v1/voice/list (max 30 characters)
Maximum string length:
30Avatar ID from /v1/avatar/list (max 30 characters)
Maximum string length:
30Music ID from /v1/music/list (max 30 characters)
Maximum string length:
30HTTPS URL for status notifications (max 500 characters)
Maximum string length:
500Custom metadata object (max 5KB)
⌘I