Skip to main content
POST
Create Prompt to Video
Try it out! Use the API playground on the right to test the Prompt to Video endpoint directly.

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
Prompt to Video automatically generates a script from your prompt, then creates visuals based on that script. You can also provide custom media for full creative control.

Endpoint


Required Fields

string
required
Describe the video you want to create (1-4000 characters). The AI will generate a professional script from this prompt.Example: “Create an engaging video about the top 5 productivity tips for remote workers”
string
required
Voice ID from /v1/voice/list. The voice used for narrating the generated script.
object
required
Settings for auto-generated media (used when media is not provided)
object
required
Caption settings for the video
string
default:"ratio_9_16"
required
Video aspect ratio:
  • ratio_9_16: Vertical (TikTok, Reels, Shorts) - Recommended
  • ratio_16_9: Horizontal (YouTube)
  • ratio_1_1: Square (Instagram)
string
default:"en"
required
Language code for the video (2 characters). Example: en, es
boolean
default:"false"
required
Enable automatic sticker generation for the video. Adds engaging visual elements automatically.

Optional Fields

string
Video name (max 100 characters). If not provided, a name will be auto-generated from your prompt.
number
default:60
Target duration for the generated video in seconds
  • Minimum: 10 seconds
  • Maximum: 120 seconds
  • Default: 60 seconds
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
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

Short Video (30 seconds)

Long Video (120 seconds)


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:

Target Duration Guide

Choose the right duration for your use case:

Best Practices

Write Clear Prompts

Be specific about the topic, tone, and target audience for better script generation.

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.

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


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
prompt
string
required

Describe the video you want to create (1-4000 characters). The AI will generate a professional script from this prompt.

Required string length: 1 - 4000
targetDuration
number
default:60
required

Target duration for the generated video in seconds

Required range: 10 <= x <= 120
voiceId
string
required

Voice ID from /v1/voice/list

Maximum string length: 30
presetSettings
object
required

Settings for auto-generated media

caption
object
required
addStickers
boolean
default:false
required

Enable automatic sticker generation for the video

aspectRatio
enum<string>
default:ratio_9_16
required

Video aspect ratio

Available options:
ratio_9_16,
ratio_16_9,
ratio_1_1
language
string
default:en
required

Language code (2 characters)

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

webhook
string

HTTPS URL to receive completion notification

Maximum string length: 500
metadata
object

Custom metadata object (max 5KB)

Response

Prompt to Video created successfully

success
boolean
data
object
message
string