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

script
string
required
The script for the video narration (1-10,000 characters). This will be converted to speech and synchronized with visuals.
voiceId
string
required
Voice ID from /v1/voice/list. The voice used for narrating the script.
mediaType
string
required
Type of media to generate:
  • ai-images: AI-generated images based on script
  • ai-videos: AI-generated video clips
  • media: Use stock media (requires media array)
  • gameplay: Use gameplay footage (requires gameplaySettings)

Optional Fields

name
string
Video name (max 100 characters)
presetSettings
object
Settings for auto-generated media (used when mediaType is ai-images or ai-videos)
media
array
Array of media IDs (max 50). The media must already be uploaded to your account. Required when mediaType is media. If not provided, media will be auto-generated based on mediaType.
gameplaySettings
object
Settings for gameplay footage (required when mediaType is gameplay)
musicId
string
Music ID from /v1/music/list for background music.
caption
object
Caption settings for the video
aspectRatio
string
default:"ratio_9_16"
Video aspect ratio:
  • ratio_9_16: Vertical (TikTok, Reels, Shorts)
  • ratio_16_9: Horizontal (YouTube)
  • ratio_1_1: Square (Instagram)
audio
object
Voice audio settings
addStickers
boolean
default:"false"
Enable automatic sticker generation for the video. Adds engaging visual elements automatically.
webhook
string
HTTPS URL to receive completion notification (max 500 characters). Highly recommended for production use.
metadata
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.

Visual Style Presets

Available visual style presets for the presetSettings.preset field:

Media Types

Available media types for 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
mediaType
enum<string>
default:ai-images
required

Type of media to generate

Available options:
ai-images,
ai-videos,
media,
gameplay
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
string[]

Array of media IDs (max 50). The media must already be uploaded to your account. Required when mediaType is 'media'. If not provided, media will be auto-generated.

Maximum array length: 50

Media ID

presetSettings
object

Settings for auto-generated media (used when mediaType is 'ai-images' or 'ai-videos')

gameplaySettings
object

Settings for gameplay footage (used when mediaType is 'gameplay')

caption
object
audio
object

Voice audio settings

addStickers
boolean
default:false

Enable automatic sticker generation for the video

aspectRatio
enum<string>
default:ratio_9_16

Video aspect ratio

Available options:
ratio_9_16,
ratio_16_9,
ratio_1_1
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