Overview
This endpoint initiates video generation using various input methods. You can generate videos from text prompts, custom scripts, or by providing your own media files (voice, avatar, images).Authentication
This endpoint requires API key authentication. Include your API key in the
Authorization
header.Request Body
Text prompt describing the video content. Required if no script is provided.
Video duration in seconds (10-600). Required when using prompt.
Custom video script. Alternative to prompt-based generation.
ID of the voice to use. Get available voices from
/resources/voices
endpoint.URL to a custom voice file (audio format: mp3, wav, m4a).
ID of the avatar look to use. Get available avatars from
/resources/avatars
endpoint.URL to a custom avatar image/video file.
Video format:
vertical
(9:16), square
(1:1), or ads
(16:9).Array of URLs to media files (images, videos) to include in the video.
Array of web URLs to extract content from (max 10).
Whether to animate static images using AI.
Animation quality:
standard
or pro
.Maximum number of images to animate.
URL to receive webhook notifications when generation completes.
Whether to use media from your space library.
Whether to save generated media to your space library.
Response
Unique identifier for the generation job.
Current job status:
pending
.Estimated credit cost for this generation.
Example
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.
Credit Costs
Generation costs depend on several factors:- Base cost: 5 credits every 30 seconds (with 15 seconds of buffer)
- Image animation: +4 credits per image (standard) or +7 credits per image (pro mode)
Next Steps
- Monitor Progress: Check status with
/generation/status/{job_id}
- Export Video: Use
/export/start
endpoint 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_ANIMATE_MODE
: Invalid animation mode