Generation
Start Video Generation
Start generating a video from a prompt, script, media files, or a ready-made editing plan
POST
Overview
This endpoint initiates video generation using various input methods. You can generate videos from text prompts, custom scripts, by providing your own media files (voice, avatar, images), or from a ready-made editing plan (sequence_plan) that controls the montage sequence by sequence.
Authentication
This endpoint requires API key authentication. Include your API key in the
Authorization header.Request Body
string
Text prompt describing the video content. Required if no script is provided.
number
Video duration in seconds (10-600). Required when using prompt.
string
Custom video script. Alternative to prompt-based generation.
string
ID of the voice to use. Get available voices from
/voice/list endpoint.string
URL to a custom voice file (audio format: mp3, wav, m4a).
string
ID of the avatar look to use. Get available avatars from
/avatar/list endpoint.string
URL to a custom avatar image/video file.
string
default:"vertical"
Video format:
vertical (9:16), square (1:1), ads (4:5), horizontal (16:9), or custom.number
Custom video width in pixels (max 5000). Only used when format is
custom. Defaults to 1080.number
Custom video height in pixels (max 5000). Only used when format is
custom. Defaults to 1920.array
Array of URLs to media files (images, videos) to include in the video.
array
Array of web URLs to extract content from (max 10).
object
boolean
default:"false"
Whether to animate static images using AI.
number
Maximum number of images to animate.
boolean
default:"false"
Enable emotion enhancement for more expressive voices.
boolean
default:"false"
Use a native avatar model (audio and video generated together) for a higher quality avatar. (The video won’t have audio before the export.)
string
default:"omni-flash"
Native avatar model used to pre-split the video timeline like the export will (e.g.
omni-flash, veo-3-fast, seedance-2). Only used when use_native_avatar is enabled.string
URL to receive webhook notifications when generation completes.
boolean
default:"true"
Whether to use media from your space library.
boolean
default:"true"
Whether to save generated media to your space library.
object
Enable or disable specific video features.
array
A ready-made editing plan: a flat array of speech blocks describing the montage sequence by sequence. When provided, it takes precedence over
prompt and script. See the Plan Content guide for the concepts.Response
string
Unique identifier for the generation job.
string
Current job status:
pending.number
Estimated credit cost for this generation.
Example
Plan-based Example
This request generates a two-speaker video from a ready-made plan. The top-levelvoice_id and avatar_id are the defaults; the second block overrides them with a different voice and look, and one sequence swaps to a close-up look.
cURL
The silent pause (
{ "text": null, "duration_ms": 1200 }) sits in its own block with no voice_id — that is required for every silent sequence.Input Methods
1. Prompt-based Generation
Provide aprompt and duration. The AI will generate a script and find relevant media.
2. Script-based Generation
Provide a customscript along with voice_id or voice_url.
3. Media-based Generation
Providevoice_url and/or avatar_url with custom media files.
4. Plan-based Generation
Provide asequence_plan — a flat array of speech blocks — describing the montage sequence by sequence. This takes precedence over prompt and script: the video is assembled exactly as planned. The request-level voice_id / avatar_id act as defaults for blocks and sequences that don’t override them. See the Plan Content guide for the concepts.
Credit Costs
Generation costs depend on several factors:- Base cost: 5 credits every 30 seconds (with 15 seconds of buffer)
- Image animation: +5 credits per image
Next Steps
- Monitor Progress: Check status with
/generation/status/{job_id} - Export Video: Use
/export/startendpoint to export the video in the desired format - Monitor Export Progress: Check status with
/export/status/{job_id}
Error Codes
MISSING_CONTENT: No prompt, script, voice_url, or avatar_url providedMISSING_FIELD: Required duration missing when using promptMISSING_VOICE: No voice specified when using custom scriptINSUFFICIENT_CREDITS: Not enough credits availableINVALID_VOICE_ID: Voice ID not foundINVALID_AVATAR_ID: Avatar ID not foundINVALID_FORMAT: Invalid video formatINVALID_PLAN: Thesequence_planfailed schema validation (the offending field is returned indetails)PLAN_RESOLUTION_FAILED: Avoice_id,avatar_id, orlook_idreferenced in the plan could not be found in your space

