curl --request POST \
--url https://api.hooked.so/v1/project/create/tiktok-slideshow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Summer Collection 2024",
"slides": [
{
"media": "media_summer_001",
"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"
}
]
},
{
"media": "media_summer_002",
"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
}
]
},
{
"media": "media_summer_003",
"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
}
]
}
],
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"lipsyncModel": "pro",
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": true
},
"musicId": "upbeat_001",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"campaignId": "summer-2024",
"collection": "beachwear",
"variant": "A"
}
}
'import requests
url = "https://api.hooked.so/v1/project/create/tiktok-slideshow"
payload = {
"name": "Summer Collection 2024",
"slides": [
{
"media": "media_summer_001",
"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"
}
]
},
{
"media": "media_summer_002",
"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
}
]
},
{
"media": "media_summer_003",
"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
}
]
}
],
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"lipsyncModel": "pro",
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": True
},
"musicId": "upbeat_001",
"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',
slides: [
{
media: 'media_summer_001',
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'
}
]
},
{
media: 'media_summer_002',
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
}
]
},
{
media: 'media_summer_003',
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
}
]
}
],
script: 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
avatarId: 'avatar_id',
voiceId: 'tzX5paJ07p5hyWFcU3uG',
lipsyncModel: 'pro',
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
musicId: 'upbeat_001',
webhook: 'https://yoursite.com/webhook',
metadata: {campaignId: 'summer-2024', collection: 'beachwear', variant: 'A'}
})
};
fetch('https://api.hooked.so/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.hooked.so/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',
'slides' => [
[
'media' => 'media_summer_001',
'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'
]
]
],
[
'media' => 'media_summer_002',
'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
]
]
],
[
'media' => 'media_summer_003',
'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
]
]
]
],
'script' => 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
'avatarId' => 'avatar_id',
'voiceId' => 'tzX5paJ07p5hyWFcU3uG',
'lipsyncModel' => 'pro',
'audio' => [
'speed' => 1,
'stability' => 0.5,
'similarityBoost' => 0.75,
'style' => 0,
'useSpeakerBoost' => true
],
'musicId' => 'upbeat_001',
'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.hooked.so/v1/project/create/tiktok-slideshow"
payload := strings.NewReader("{\n \"name\": \"Summer Collection 2024\",\n \"slides\": [\n {\n \"media\": \"media_summer_001\",\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 },\n {\n \"media\": \"media_summer_002\",\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 },\n {\n \"media\": \"media_summer_003\",\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 }\n ],\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 \"lipsyncModel\": \"pro\",\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"musicId\": \"upbeat_001\",\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.hooked.so/v1/project/create/tiktok-slideshow")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Summer Collection 2024\",\n \"slides\": [\n {\n \"media\": \"media_summer_001\",\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 },\n {\n \"media\": \"media_summer_002\",\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 },\n {\n \"media\": \"media_summer_003\",\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 }\n ],\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 \"lipsyncModel\": \"pro\",\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"musicId\": \"upbeat_001\",\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.hooked.so/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 \"slides\": [\n {\n \"media\": \"media_summer_001\",\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 },\n {\n \"media\": \"media_summer_002\",\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 },\n {\n \"media\": \"media_summer_003\",\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 }\n ],\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 \"lipsyncModel\": \"pro\",\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"musicId\": \"upbeat_001\",\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."
}
TikTok Slideshow
Create TikTok-style slideshow videos with text overlays and custom positioning
curl --request POST \
--url https://api.hooked.so/v1/project/create/tiktok-slideshow \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Summer Collection 2024",
"slides": [
{
"media": "media_summer_001",
"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"
}
]
},
{
"media": "media_summer_002",
"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
}
]
},
{
"media": "media_summer_003",
"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
}
]
}
],
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"lipsyncModel": "pro",
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": true
},
"musicId": "upbeat_001",
"webhook": "https://yoursite.com/webhook",
"metadata": {
"campaignId": "summer-2024",
"collection": "beachwear",
"variant": "A"
}
}
'import requests
url = "https://api.hooked.so/v1/project/create/tiktok-slideshow"
payload = {
"name": "Summer Collection 2024",
"slides": [
{
"media": "media_summer_001",
"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"
}
]
},
{
"media": "media_summer_002",
"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
}
]
},
{
"media": "media_summer_003",
"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
}
]
}
],
"script": "Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!",
"avatarId": "avatar_id",
"voiceId": "tzX5paJ07p5hyWFcU3uG",
"lipsyncModel": "pro",
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": True
},
"musicId": "upbeat_001",
"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',
slides: [
{
media: 'media_summer_001',
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'
}
]
},
{
media: 'media_summer_002',
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
}
]
},
{
media: 'media_summer_003',
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
}
]
}
],
script: 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
avatarId: 'avatar_id',
voiceId: 'tzX5paJ07p5hyWFcU3uG',
lipsyncModel: 'pro',
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
musicId: 'upbeat_001',
webhook: 'https://yoursite.com/webhook',
metadata: {campaignId: 'summer-2024', collection: 'beachwear', variant: 'A'}
})
};
fetch('https://api.hooked.so/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.hooked.so/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',
'slides' => [
[
'media' => 'media_summer_001',
'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'
]
]
],
[
'media' => 'media_summer_002',
'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
]
]
],
[
'media' => 'media_summer_003',
'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
]
]
]
],
'script' => 'Check out our amazing summer collection. Three new styles, perfect for the season. Get yours today!',
'avatarId' => 'avatar_id',
'voiceId' => 'tzX5paJ07p5hyWFcU3uG',
'lipsyncModel' => 'pro',
'audio' => [
'speed' => 1,
'stability' => 0.5,
'similarityBoost' => 0.75,
'style' => 0,
'useSpeakerBoost' => true
],
'musicId' => 'upbeat_001',
'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.hooked.so/v1/project/create/tiktok-slideshow"
payload := strings.NewReader("{\n \"name\": \"Summer Collection 2024\",\n \"slides\": [\n {\n \"media\": \"media_summer_001\",\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 },\n {\n \"media\": \"media_summer_002\",\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 },\n {\n \"media\": \"media_summer_003\",\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 }\n ],\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 \"lipsyncModel\": \"pro\",\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"musicId\": \"upbeat_001\",\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.hooked.so/v1/project/create/tiktok-slideshow")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Summer Collection 2024\",\n \"slides\": [\n {\n \"media\": \"media_summer_001\",\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 },\n {\n \"media\": \"media_summer_002\",\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 },\n {\n \"media\": \"media_summer_003\",\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 }\n ],\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 \"lipsyncModel\": \"pro\",\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"musicId\": \"upbeat_001\",\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.hooked.so/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 \"slides\": [\n {\n \"media\": \"media_summer_001\",\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 },\n {\n \"media\": \"media_summer_002\",\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 },\n {\n \"media\": \"media_summer_003\",\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 }\n ],\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 \"lipsyncModel\": \"pro\",\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"musicId\": \"upbeat_001\",\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."
}
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
Endpoint
POST /v1/project/create/tiktok-slideshow
Required Fields
Show Slide Object
Show Slide Object
Show Text Object
Show Text Object
left, center, or rightnormal or break-wordOptional Fields
base: Standard quality, faster processingpro: Higher quality, more accurate synchronization
/v1/music/list (max 30 characters)Request Examples
Basic Slideshow
const response = await fetch('https://api.hooked.so/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: [
{
media: 'media_001',
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
}
]
},
{
media: 'media_002',
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
}
]
}
]
})
});
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.hooked.so/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',
lipsyncModel: 'pro',
musicId: 'upbeat_001',
audio: {
speed: 1.0,
stability: 0.5,
similarityBoost: 0.75,
style: 0.0,
useSpeakerBoost: true
},
slides: [
{
media: 'media_summer_001',
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'
}
]
},
{
media: 'media_summer_002',
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
}
]
},
{
media: 'media_summer_003',
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
}
]
}
],
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):{
"status": "COMPLETED",
"data": {
"videoId": "vid_tiktok_abc123xyz",
"status": "COMPLETED",
"url": "https://cdn.hooked.so/videos/abc123xyz.mp4",
"shareUrl": "https://cdn.hooked.so/shared/abc123xyz.mp4",
"metadata": {
"projectId": "proj_tiktok_abc123xyz"
}
},
"message": "Video completed"
}
Best Practices
Text Positioning
Slide Duration
Text Readability
Image Quality
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.media: String must contain at least 1 character(s) | Missing media ID | Provide media ID for each slide |
slides.0.duration: Number must be between 1 and 10 | Invalid duration | Duration must be between 1 and 10 seconds |
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 |
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
Video Details
Webhooks Guide
UGC Ads
Authorizations
Body
Array of slides (1-50 slides). Each slide contains a media ID and optional text elements.
1 - 50 elementsShow child attributes
Show child attributes
Project name (1-100 characters). If not provided, a name will be auto-generated.
1 - 100Voiceover script (max 10,000 characters). Required if using avatar/voice. Must be provided together with avatarId, voiceId, and lipsyncModel.
10000Avatar ID from /v1/avatar/list (max 30 characters). Required if using voice. Must be provided together with script, voiceId, and lipsyncModel.
30Voice ID from /v1/voice/list (max 30 characters). Required if using avatar. Must be provided together with script, avatarId, and lipsyncModel.
30Lipsync model quality. Required if using avatar/voice. Must be provided together with script, avatarId, and voiceId.
base, pro Music ID from /v1/music/list (max 30 characters)
30Voice audio settings. Used when generating voiceover. Default values are used if not provided.
Show child attributes
Show child attributes
HTTPS URL for status notifications (max 500 characters)
500Custom metadata object (max 5KB)