Skip to main content
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

string
required
The script for the video narration (1-10,000 characters). This will be converted to speech and synchronized with visuals.
string
required
Voice ID from /v1/voice/list. The voice used for narrating the script.
object
required
Settings for auto-generated media (used when media is not provided)
object
required
Caption settings for the video
string
required
Video aspect ratio:
  • ratio_9_16: Vertical (TikTok, Reels, Shorts) - Recommended
  • ratio_16_9: Horizontal (YouTube)
  • ratio_1_1: Square (Instagram)
string
required
Language code for the video (2 characters). Example: en, es

Optional Fields

string
Video name (max 100 characters)
string
Music ID from /v1/music/list for background music.
array
Custom media items (max 50). If not provided, media will be auto-generated based on presetSettings.
object
Settings for gameplay footage (when presetSettings.mediaType is gameplay)
object
Voice audio settings
boolean
default:"false"
Enable automatic sticker generation for the video. Adds engaging visual elements automatically.
string
HTTPS URL to receive completion notification (max 500 characters). Highly recommended for production use.
object
Custom metadata object (max 5KB). Store any additional data you need to associate with this video.

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 for presetSettings.mediaType:

Caption Presets

Available caption presets for the caption.preset field:

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


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

x-api-key
string
header
required

Body

application/json
script
string
required

The script for the video narration (1-10,000 characters)

Required string length: 1 - 10000
voiceId
string
required

Voice ID from /v1/voice/list

Maximum string length: 30
presetSettings
object
required

Settings for auto-generated media

caption
object
required
aspectRatio
enum<string>
required

Video aspect ratio

Available options:
ratio_9_16,
ratio_16_9,
ratio_1_1
language
enum<string>
required

Language code (2 characters)

Available options:
en,
es
Required string length: 2
name
string

Video name (max 100 characters)

Maximum string length: 100
musicId
string

Music ID from /v1/music/list for background music

Maximum string length: 30
media
object[]

Custom media items (max 50). If not provided, media will be auto-generated.

Maximum array length: 50
gameplaySettings
object

Settings for gameplay footage

audio
object

Voice audio settings

addStickers
boolean
default:false

Enable automatic sticker generation for the video

webhook
string

HTTPS URL to receive completion notification

Maximum string length: 500
metadata
object

Custom metadata object (max 5KB)

Response

Script to Video created successfully

success
boolean
data
object
message
string