Create Script to Video
Videos
Script to Video
Create videos from scripts with AI-generated or custom media
POST
Create Script to Video
Try it out! Use the API playground on the right to test the Script to Video endpoint directly.
Overview
Script to Video transforms your written scripts into engaging videos with voice narration and auto-generated or custom media. This format is ideal for:- Educational content and tutorials
- Social media content creation
- Marketing videos
- Storytelling and narrative content
- News-style videos
Script to Video automatically generates visuals based on your script or allows you to provide custom media for full creative control.
Endpoint
Required Fields
The script for the video narration (1-10,000 characters). This will be converted to speech and synchronized with visuals.
Voice ID from
/v1/voice/list. The voice used for narrating the script.Settings for auto-generated media (used when
media is not provided)Caption settings for the video
Video aspect ratio:
ratio_9_16: Vertical (TikTok, Reels, Shorts) - Recommendedratio_16_9: Horizontal (YouTube)ratio_1_1: Square (Instagram)
Language code for the video (2 characters). Example:
en, esOptional Fields
Video name (max 100 characters)
Music ID from
/v1/music/list for background music.Custom media items (max 50). If not provided, media will be auto-generated based on
presetSettings.Settings for gameplay footage (when
presetSettings.mediaType is gameplay)Voice audio settings
Enable automatic sticker generation for the video. Adds engaging visual elements automatically.
HTTPS URL to receive completion notification (max 500 characters). Highly recommended for production use.
Custom metadata object (max 5KB). Store any additional data you need to associate with this video.
Request Examples
With AI-Generated Images
With AI-Generated Videos
With Custom Media
With Gameplay
Response
Webhook Notification
When your video is ready, we’ll POST to your webhook URL:Webhook Payload
Your webhook endpoint must return a
200 status code. We’ll retry up to 3 times if the request fails.Media Types
Available media types forpresetSettings.mediaType:
| Type | Description |
|---|---|
ai-images | AI-generated images based on your 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 |
slidevid | Brand style with purple background |
classic | Clean, simple captions with black background |
active | Green background with bold text |
bubble | White background bubble style |
glass | Glassmorphic transparency effect |
comic | Comic Sans font with colorful style |
glow | Pink and orange glow effects |
pastel | Soft pastel pink background |
neon | Green neon glow effect |
retroTV | Retro TV style with cyan glow |
red | Red glow effect with white text |
marker | Yellow marker/highlighter style |
modern | Contemporary white background style |
blue | Blue background style |
vivid | Vibrant pink background with uppercase text |
Best Practices
Write Clear Scripts
Structure your script with clear sentences and natural pauses for better pacing.
Choose the Right Media Type
Use ai-images for educational content, gameplay for gaming, custom media for brands.
Match Voice to Content
Choose a voice that fits your content tone - energetic for gaming, professional for business.
Use Webhooks
Always use webhooks in production instead of polling for video status.
Error Handling
| Error | Description | Solution |
|---|---|---|
script: Script is required | Missing or empty script | Add the script field with your content |
voiceId: Voice not found | Invalid voice ID | Use a valid voice ID from /v1/voice/list |
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
Find the perfect voice for your video
List Music
Add background music to your videos
List Videos
View all your created videos
Webhooks Guide
Learn how to handle webhook notifications
Authorizations
Body
application/json
The script for the video narration (1-10,000 characters)
Required string length:
1 - 10000Voice ID from /v1/voice/list
Maximum string length:
30Settings for auto-generated media
Video aspect ratio
Available options:
ratio_9_16, ratio_16_9, ratio_1_1 Language code (2 characters)
Available options:
en, es Required string length:
2Video name (max 100 characters)
Maximum string length:
100Music ID from /v1/music/list for background music
Maximum string length:
30Custom media items (max 50). If not provided, media will be auto-generated.
Maximum array length:
50Settings for gameplay footage
Voice audio settings
Enable automatic sticker generation for the video
HTTPS URL to receive completion notification
Maximum string length:
500Custom metadata object (max 5KB)