curl --request POST \
--url https://api.hooked.so/v1/project/create/prompt-to-video \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"prompt": "Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.",
"targetDuration": 60,
"voiceId": "confident_voice_id",
"mediaType": "ai-images",
"presetSettings": {
"preset": "realistic",
"quality": "pro"
},
"musicId": "2",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "beast",
"alignment": "bottom",
"disabled": false
},
"addStickers": true,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": true
},
"webhook": "https://yoursite.com/webhook",
"metadata": {
"contentType": "educational",
"topic": "productivity"
}
}
'import requests
url = "https://api.hooked.so/v1/project/create/prompt-to-video"
payload = {
"prompt": "Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.",
"targetDuration": 60,
"voiceId": "confident_voice_id",
"mediaType": "ai-images",
"presetSettings": {
"preset": "realistic",
"quality": "pro"
},
"musicId": "2",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "beast",
"alignment": "bottom",
"disabled": False
},
"addStickers": True,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": True
},
"webhook": "https://yoursite.com/webhook",
"metadata": {
"contentType": "educational",
"topic": "productivity"
}
}
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({
prompt: 'Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.',
targetDuration: 60,
voiceId: 'confident_voice_id',
mediaType: 'ai-images',
presetSettings: {preset: 'realistic', quality: 'pro'},
musicId: '2',
aspectRatio: 'ratio_9_16',
caption: {preset: 'beast', alignment: 'bottom', disabled: false},
addStickers: true,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
webhook: 'https://yoursite.com/webhook',
metadata: {contentType: 'educational', topic: 'productivity'}
})
};
fetch('https://api.hooked.so/v1/project/create/prompt-to-video', 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/prompt-to-video",
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([
'prompt' => 'Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.',
'targetDuration' => 60,
'voiceId' => 'confident_voice_id',
'mediaType' => 'ai-images',
'presetSettings' => [
'preset' => 'realistic',
'quality' => 'pro'
],
'musicId' => '2',
'aspectRatio' => 'ratio_9_16',
'caption' => [
'preset' => 'beast',
'alignment' => 'bottom',
'disabled' => false
],
'addStickers' => true,
'audio' => [
'speed' => 1,
'stability' => 0.5,
'similarityBoost' => 0.75,
'style' => 0,
'useSpeakerBoost' => true
],
'webhook' => 'https://yoursite.com/webhook',
'metadata' => [
'contentType' => 'educational',
'topic' => 'productivity'
]
]),
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/prompt-to-video"
payload := strings.NewReader("{\n \"prompt\": \"Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.\",\n \"targetDuration\": 60,\n \"voiceId\": \"confident_voice_id\",\n \"mediaType\": \"ai-images\",\n \"presetSettings\": {\n \"preset\": \"realistic\",\n \"quality\": \"pro\"\n },\n \"musicId\": \"2\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"beast\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": true,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"contentType\": \"educational\",\n \"topic\": \"productivity\"\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/prompt-to-video")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.\",\n \"targetDuration\": 60,\n \"voiceId\": \"confident_voice_id\",\n \"mediaType\": \"ai-images\",\n \"presetSettings\": {\n \"preset\": \"realistic\",\n \"quality\": \"pro\"\n },\n \"musicId\": \"2\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"beast\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": true,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"contentType\": \"educational\",\n \"topic\": \"productivity\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hooked.so/v1/project/create/prompt-to-video")
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 \"prompt\": \"Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.\",\n \"targetDuration\": 60,\n \"voiceId\": \"confident_voice_id\",\n \"mediaType\": \"ai-images\",\n \"presetSettings\": {\n \"preset\": \"realistic\",\n \"quality\": \"pro\"\n },\n \"musicId\": \"2\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"beast\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": true,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"contentType\": \"educational\",\n \"topic\": \"productivity\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"videoId": "vid_p2v_abc123xyz",
"projectId": "proj_p2v_abc123xyz",
"status": "STARTED"
},
"message": "Prompt to Video successfully created"
}
{
"success": false,
"message": "prompt: Prompt is required"
}
{
"success": false,
"message": "voiceId: Voice not found"
}
{
"success": false,
"message": "targetDuration: Target duration must be at least 30 seconds"
}
Prompt to Video
Create videos from prompts with AI-generated scripts and media
curl --request POST \
--url https://api.hooked.so/v1/project/create/prompt-to-video \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"prompt": "Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.",
"targetDuration": 60,
"voiceId": "confident_voice_id",
"mediaType": "ai-images",
"presetSettings": {
"preset": "realistic",
"quality": "pro"
},
"musicId": "2",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "beast",
"alignment": "bottom",
"disabled": false
},
"addStickers": true,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": true
},
"webhook": "https://yoursite.com/webhook",
"metadata": {
"contentType": "educational",
"topic": "productivity"
}
}
'import requests
url = "https://api.hooked.so/v1/project/create/prompt-to-video"
payload = {
"prompt": "Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.",
"targetDuration": 60,
"voiceId": "confident_voice_id",
"mediaType": "ai-images",
"presetSettings": {
"preset": "realistic",
"quality": "pro"
},
"musicId": "2",
"aspectRatio": "ratio_9_16",
"caption": {
"preset": "beast",
"alignment": "bottom",
"disabled": False
},
"addStickers": True,
"audio": {
"speed": 1,
"stability": 0.5,
"similarityBoost": 0.75,
"style": 0,
"useSpeakerBoost": True
},
"webhook": "https://yoursite.com/webhook",
"metadata": {
"contentType": "educational",
"topic": "productivity"
}
}
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({
prompt: 'Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.',
targetDuration: 60,
voiceId: 'confident_voice_id',
mediaType: 'ai-images',
presetSettings: {preset: 'realistic', quality: 'pro'},
musicId: '2',
aspectRatio: 'ratio_9_16',
caption: {preset: 'beast', alignment: 'bottom', disabled: false},
addStickers: true,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
webhook: 'https://yoursite.com/webhook',
metadata: {contentType: 'educational', topic: 'productivity'}
})
};
fetch('https://api.hooked.so/v1/project/create/prompt-to-video', 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/prompt-to-video",
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([
'prompt' => 'Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.',
'targetDuration' => 60,
'voiceId' => 'confident_voice_id',
'mediaType' => 'ai-images',
'presetSettings' => [
'preset' => 'realistic',
'quality' => 'pro'
],
'musicId' => '2',
'aspectRatio' => 'ratio_9_16',
'caption' => [
'preset' => 'beast',
'alignment' => 'bottom',
'disabled' => false
],
'addStickers' => true,
'audio' => [
'speed' => 1,
'stability' => 0.5,
'similarityBoost' => 0.75,
'style' => 0,
'useSpeakerBoost' => true
],
'webhook' => 'https://yoursite.com/webhook',
'metadata' => [
'contentType' => 'educational',
'topic' => 'productivity'
]
]),
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/prompt-to-video"
payload := strings.NewReader("{\n \"prompt\": \"Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.\",\n \"targetDuration\": 60,\n \"voiceId\": \"confident_voice_id\",\n \"mediaType\": \"ai-images\",\n \"presetSettings\": {\n \"preset\": \"realistic\",\n \"quality\": \"pro\"\n },\n \"musicId\": \"2\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"beast\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": true,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"contentType\": \"educational\",\n \"topic\": \"productivity\"\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/prompt-to-video")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.\",\n \"targetDuration\": 60,\n \"voiceId\": \"confident_voice_id\",\n \"mediaType\": \"ai-images\",\n \"presetSettings\": {\n \"preset\": \"realistic\",\n \"quality\": \"pro\"\n },\n \"musicId\": \"2\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"beast\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": true,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"contentType\": \"educational\",\n \"topic\": \"productivity\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hooked.so/v1/project/create/prompt-to-video")
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 \"prompt\": \"Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.\",\n \"targetDuration\": 60,\n \"voiceId\": \"confident_voice_id\",\n \"mediaType\": \"ai-images\",\n \"presetSettings\": {\n \"preset\": \"realistic\",\n \"quality\": \"pro\"\n },\n \"musicId\": \"2\",\n \"aspectRatio\": \"ratio_9_16\",\n \"caption\": {\n \"preset\": \"beast\",\n \"alignment\": \"bottom\",\n \"disabled\": false\n },\n \"addStickers\": true,\n \"audio\": {\n \"speed\": 1,\n \"stability\": 0.5,\n \"similarityBoost\": 0.75,\n \"style\": 0,\n \"useSpeakerBoost\": true\n },\n \"webhook\": \"https://yoursite.com/webhook\",\n \"metadata\": {\n \"contentType\": \"educational\",\n \"topic\": \"productivity\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"videoId": "vid_p2v_abc123xyz",
"projectId": "proj_p2v_abc123xyz",
"status": "STARTED"
},
"message": "Prompt to Video successfully created"
}
{
"success": false,
"message": "prompt: Prompt is required"
}
{
"success": false,
"message": "voiceId: Voice not found"
}
{
"success": false,
"message": "targetDuration: Target duration must be at least 30 seconds"
}
Overview
Prompt to Video transforms your text prompts into engaging videos with AI-generated scripts, voice narration and auto-generated or custom media. This format is ideal for:- Quick content creation without writing scripts
- Educational content and tutorials
- Social media content creation
- Marketing videos
- Storytelling and narrative content
Endpoint
POST /v1/project/create/prompt-to-video
Required Fields
/v1/voice/list. The voice used for narrating the generated script.ai-images: AI-generated images based on scriptai-videos: AI-generated video clipsmedia: Use stock mediagameplay: Use gameplay footage
Optional Fields
- Minimum: 10 seconds
- Maximum: 120 seconds
- Default: 60 seconds
media is not provided)Show Preset Settings Object
Show Preset Settings Object
realistic, anime, cinematic, fantasy, cyberpunk-anime, pixar, comic-book, real-anime, ghibli-studio, sketch-black-and-white, art-style, retro-anime, 80s-fantasy-movie, cartoon, creative, gta-v, sketch-color, japanese-ink, space-marines-40k, haunted-linework, ink-style, neon-futuristic, minecraft, pixel-art, collage, lego, technical-blueprintsbase, pro, or ultrapresetSettings.presetSettings.mediaType is gameplay)Show Gameplay Settings Object
Show Gameplay Settings Object
minecraft, subway-s, temple-run, gta- Minecraft:
minecraft-1throughminecraft-8 - Subway S:
subway-s-1throughsubway-s-11 - Temple Run:
temple-run-1throughtemple-run-8 - GTA:
gta-1throughgta-12
Show Caption Object
Show Caption Object
default, beast, umi, tiktok, wrap1, wrap2, ariel, hooked, classic, active, bubble, glass, comic, glow, pastel, neon, retroTV, red, marker, modern, blue, vivid.top, middle, or bottomtrue to hide captions on the videoratio_9_16: Vertical (TikTok, Reels, Shorts)ratio_16_9: Horizontal (YouTube)ratio_1_1: Square (Instagram)
/v1/music/list for background music.Show Audio Settings Object
Show Audio Settings Object
{
"campaignId": "summer2024",
"contentType": "educational"
}
Request Examples
With AI-Generated Images
const response = await fetch('https://api.hooked.so/v1/project/create/prompt-to-video', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'Create an engaging video about the top 5 productivity tips for remote workers. Include practical advice and make it motivational.',
voiceId: 'confident_voice_id',
targetDuration: 60,
mediaType: "ai-images",
presetSettings: {
preset: "realistic",
quality: "pro"
},
musicId: "2",
aspectRatio: 'ratio_9_16',
caption: {
preset: 'beast',
alignment: 'bottom',
disabled: false
},
addStickers: true,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
webhook: 'https://yoursite.com/webhook',
metadata: {
contentType: 'educational',
topic: 'productivity'
}
})
});
const data = await response.json();
console.log('Video ID:', data.data.videoId);
console.log('Project ID:', data.data.projectId);
With AI-Generated Videos
const createAIVideoFromPrompt = async () => {
const response = await fetch('https://api.hooked.so/v1/project/create/prompt-to-video', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'AI Technology Explainer',
prompt: 'Explain how artificial intelligence is transforming the way we work and live. Cover smart assistants, self-driving cars, and future applications.',
voiceId: 'confident_voice_id',
targetDuration: 60,
mediaType: 'ai-videos',
presetSettings: {
preset: 'anime',
quality: 'base'
},
musicId: 'music_ambient_01',
aspectRatio: 'ratio_9_16',
caption: {
preset: 'modern',
alignment: 'bottom',
disabled: false
},
addStickers: true,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
webhook: 'https://yoursite.com/webhook',
metadata: {
contentType: 'educational',
topic: 'artificial-intelligence'
}
})
});
return await response.json();
};
With Custom Media
const createCustomMediaVideo = async () => {
const response = await fetch('https://api.hooked.so/v1/project/create/prompt-to-video', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Product Showcase',
prompt: 'Create a compelling product introduction video. Highlight the revolutionary features that make life easier and more productive.',
voiceId: 'enthusiastic_voice_id',
targetDuration: 45,
mediaType: 'media'
media: ['intro_shot', 'demo_shot', 'feature_image'],
musicId: 'music_upbeat_01',
aspectRatio: 'ratio_9_16',
caption: {
preset: 'wrap1',
alignment: 'bottom',
disabled: false
},
addStickers: true,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
webhook: 'https://yoursite.com/webhook',
metadata: {
contentType: 'marketing',
topic: 'product-launch'
}
})
});
return await response.json();
};
With Gameplay
const createGamingVideo = async () => {
const response = await fetch('https://api.hooked.so/v1/project/create/prompt-to-video', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Gaming Tips Video',
prompt: 'Create a video with three pro tips to level up gaming skills and dominate opponents. Make it energetic and engaging for gamers.',
voiceId: 'energetic_voice_id',
targetDuration: 45,
mediaType: 'gameplay'
gameplaySettings: {
selectedGame: 'minecraft',
selectedVideo: 'minecraft-1'
},
musicId: 'music_upbeat_01',
aspectRatio: 'ratio_9_16',
caption: {
preset: 'beast',
alignment: 'top',
disabled: false
},
addStickers: true,
audio: {
speed: 1,
stability: 0.5,
similarityBoost: 0.75,
style: 0,
useSpeakerBoost: true
},
webhook: 'https://yoursite.com/webhook',
metadata: {
contentType: 'gaming',
topic: 'tips'
}
})
});
return await response.json();
};
Short Video (30 seconds)
const createShortVideo = async () => {
const response = await fetch('https://api.hooked.so/v1/project/create/prompt-to-video', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'Share one mind-blowing fact about the ocean that most people dont know. Make it hook viewers in the first 3 seconds.',
voiceId: 'confident_voice_id',
targetDuration: 30,
mediaType: 'ai-images',
presetSettings: {
preset: 'realistic',
quality: 'pro'
},
aspectRatio: 'ratio_9_16',
caption: {
preset: 'tiktok',
alignment: 'bottom',
disabled: false
},
webhook: 'https://yoursite.com/webhook'
})
});
return await response.json();
};
Long Video (120 seconds)
const createLongVideo = async () => {
const response = await fetch('https://api.hooked.so/v1/project/create/prompt-to-video', {
method: 'POST',
headers: {
'x-api-key': process.env.HOOKED_API_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'Create a comprehensive guide on how to start a morning routine that boosts productivity. Include wake-up habits, exercise tips, and mindset techniques.',
voiceId: 'confident_voice_id',
targetDuration: 120,
mediaType: 'ai-images',
presetSettings: {
preset: 'cinematic',
quality: 'ultra'
},
musicId: 'music_motivational_01',
aspectRatio: 'ratio_16_9',
caption: {
preset: 'modern',
alignment: 'bottom',
disabled: false
},
addStickers: true,
webhook: 'https://yoursite.com/webhook',
metadata: {
platform: 'youtube',
category: 'self-improvement'
}
})
});
return await response.json();
};
Response
{
"success": true,
"data": {
"videoId": "vid_p2v_abc123xyz",
"projectId": "proj_p2v_abc123xyz",
"status": "STARTED"
},
"message": "Prompt to Video successfully created"
}
{
"success": false,
"message": "prompt: Prompt is required"
}
{
"success": false,
"message": "voiceId: Voice not found"
}
{
"success": false,
"message": "targetDuration: Target duration must be at least 30 seconds"
}
Webhook Notification
When your video is ready, we’ll POST to your webhook URL:{
"status": "COMPLETED",
"data": {
"videoId": "vid_p2v_abc123xyz",
"status": "COMPLETED",
"url": "https://cdn.hooked.so/videos/abc123xyz.mp4",
"shareUrl": "https://cdn.hooked.so/shared/abc123xyz.mp4",
"metadata": {
"projectId": "proj_p2v_abc123xyz",
"contentType": "educational"
}
},
"message": "Video completed"
}
200 status code. We’ll retry up to 3 times if the request fails.Visual Style Presets
Available visual style presets for thepresetSettings.preset field:
| Preset | Description |
|---|---|
realistic | Pure photorealistic style with natural lighting and lifelike details |
anime | Classic anime style with large expressive eyes, vibrant colors, clean line art |
cinematic | Hollywood movie cinematography with dramatic lighting and wide shots |
fantasy | Epic fantasy art with magical elements, mythical creatures, enchanted environments |
cyberpunk-anime | Futuristic anime style with neon colors, cybernetic elements, dystopian atmosphere |
pixar | 3D animated style inspired by Pixar with smooth rendering and expressive characters |
comic-book | American comic book style with bold colors, dynamic action, superhero aesthetics |
real-anime | Realistic anime style blending photorealistic elements with anime aesthetics |
ghibli-studio | Studio Ghibli animation style with soft colors, whimsical characters, magical atmosphere |
sketch-black-and-white | Monochrome pencil sketch with detailed shading and artistic line work |
art-style | Fine art style with painterly techniques, artistic composition, classical aesthetics |
retro-anime | 1980s-90s anime aesthetic with vintage color palette and classic animation style |
80s-fantasy-movie | Retro 80s fantasy film aesthetic with practical effects, vibrant colors |
cartoon | Classic cartoon style with bold outlines, flat colors, exaggerated features |
creative | Abstract creative style with experimental techniques and innovative artistic approaches |
gta-v | Grand Theft Auto V video game style with urban aesthetic and satirical tone |
sketch-color | Colored sketch with vibrant markers and artistic illustration techniques |
japanese-ink | Traditional Japanese sumi-e ink painting with black ink, red accents, flowing brushstrokes |
space-marines-40k | Warhammer 40K Space Marines style with power armor, gothic architecture, grimdark atmosphere |
haunted-linework | Gothic horror style with intricate linework, dark atmosphere, supernatural elements |
ink-style | Modern ink art with dynamic strokes, abstract elements, energetic composition |
neon-futuristic | Cyberpunk aesthetic with bright neon colors, futuristic technology, sci-fi atmosphere |
minecraft | Blocky pixel art style inspired by Minecraft with cubic shapes and vibrant colors |
pixel-art | 8-bit and 16-bit pixel art style with retro gaming aesthetics and limited color palette |
collage | Mixed media collage with newspaper elements, geometric shapes, layered textures |
lego | LEGO brick style with plastic toy aesthetic and modular construction elements |
technical-blueprints | Engineering blueprint style with technical drawings, measurements, schematic details |
Media Types
Available media types forpresetSettings.mediaType:
| Type | Description |
|---|---|
ai-images | AI-generated images based on your generated script content |
ai-videos | AI-generated video clips synchronized with narration |
media | Stock media automatically selected based on script |
gameplay | Gameplay footage from popular games |
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 |
Target Duration Guide
Choose the right duration for your use case:| Duration | Use Case | Processing Time |
|---|---|---|
| 30s | Quick tips, single facts, viral hooks | 2-4 minutes |
| 45s | Short tutorials, product highlights | 3-5 minutes |
| 60s | Standard explainers, listicles | 4-6 minutes |
| 90s | Comprehensive guides, deep dives | 6-10 minutes |
| 120s | Extended content, detailed tutorials | 8-15 minutes |
Best Practices
Write Clear Prompts
Choose the Right Media Type
Match Voice to Content
Use Webhooks
Prompt Writing Tips
Good Prompts
“Create an engaging video about the top 5 productivity tips for remote workers. Target busy professionals and use a motivational tone.” “Explain how blockchain technology works using simple analogies. Make it beginner-friendly and include real-world examples.” “Share 3 mind-blowing facts about space that most people don’t know. Hook viewers in the first 3 seconds.”Avoid
“Make a video” (too vague) “Video about stuff” (no direction) “Something interesting” (unclear intent)Error Handling
| Error | Description | Solution |
|---|---|---|
prompt: Prompt is required | Missing or empty prompt | Add the prompt field with your description |
prompt: Prompt cannot exceed 4000 characters | Prompt too long | Shorten your prompt to under 4000 characters |
voiceId: Voice not found | Invalid voice ID | Use a valid voice ID from /v1/voice/list |
targetDuration: Target duration must be at least 30 seconds | Duration too short | Use minimum 30 seconds |
targetDuration: Target duration cannot exceed 120 seconds | Duration too long | Use maximum 120 seconds |
presetSettings.preset: Preset is required | Missing preset when using auto-generated media | Add the preset field in presetSettings |
webhook: Must be a valid HTTPS URL | Invalid webhook URL | Ensure webhook URL starts with https:// |
media: Cannot have more than 50 media items | Too many media items | Reduce media array to 50 items or fewer |
Not enough credits | Insufficient credits | Top up your account credits |
Next Steps
List Voices
List Music
List Videos
Webhooks Guide
Authorizations
Body
Describe the video you want to create (1-4000 characters). The AI will generate a professional script from this prompt.
1 - 4000Voice ID from /v1/voice/list
30Type of media to generate
ai-images, ai-videos, media, gameplay Target duration for the generated video in seconds
10 <= x <= 120Video name (max 100 characters)
100Music ID from /v1/music/list for background music
30Array of media IDs (max 50). The media must already be uploaded to your account. If not provided, media will be auto-generated.
50Media ID
Settings for auto-generated media
Show child attributes
Show child attributes
Settings for gameplay footage
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Voice audio settings
Show child attributes
Show child attributes
Enable automatic sticker generation for the video
Video aspect ratio
ratio_9_16, ratio_16_9, ratio_1_1 HTTPS URL to receive completion notification
500Custom metadata object (max 5KB)