Introduction
The submit video task endpoint is used to create video generation tasks. Mixroute Api supports multiple video generation models with a unified API endpoint.
Video generation is an asynchronous task. After submission, you need to poll the task status.
Authentication
Bearer Token, e.g., Bearer sk-xxxxxxxxxx
Workflow
Submit Task : POST /v1/video/generations
Poll Status : GET /v1/video/generations/{task_id}
Get Result : Download video or get URL after completion
Supported Models
Model ID Provider Description sora-2OpenAI Sora 2 video generation model veo-3.0-fast-generate-001Google Veo 3.0 fast version veo-3.1-fast-generate-previewGoogle Veo 3.1 fast version veo-3.0-generate-previewGoogle Veo 3.0 standard version veo-3.1-generate-previewGoogle Veo 3.1 standard version wanx-video-v1Alibaba Alibaba Wanxiang video generation seedance-1.0ByteDance Doubao Doubao Seedance 1.0 video generation seedance-1.0-proByteDance Doubao Doubao Seedance 1.0 Pro video generation seedance-1.5-proByteDance Doubao Doubao Seedance 1.5 Pro video generation
Model-Specific Parameters
Sora 2 Parameters
Video duration (seconds): 5, 10, 15, 20, default 5
Resolution: 480p, 720p, 1080p, default 720p
Aspect ratio: 16:9, 9:16, 1:1, default 16:9
Reference image URL (image-to-video mode)
Original video URL (Remix mode)
Veo Parameters
Model name: veo-3.1-fast-generate-preview, etc.
First frame reference image (Base64 or URL)
Last frame reference image (only supported by veo-3.1 series)
Whether to generate synchronized audio, default false
Alibaba Wanxiang Parameters
Model name: wanx-video-v1
Video duration (seconds): 3, 5, 10
Video size: 1280x720, 720x1280, 960x960
Style: realistic, anime, 3d, etc.
Random seed for reproducible results
Reference image URL (image-to-video mode)
Doubao Seedance Parameters
Model name: seedance-1.0, seedance-1.0-pro, seedance-1.5-pro
Video duration (seconds): 4, 6, 8
Aspect ratio: 16:9, 9:16, 1:1
First frame image (Base64 or URL)
Last frame image (Base64 or URL)
Reference image (for style or character reference)
Negative prompt, describing unwanted elements
Usage Examples
Sora 2
Veo
Alibaba Wanxiang
Doubao Seedance
Text-to-Video
Image-to-Video
Remix Mode
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "sora-2",
"prompt": "A golden retriever running on the beach, sunny day, slow motion shot",
"duration": 10,
"resolution": "1080p",
"aspect_ratio": "16:9"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "sora-2",
"prompt": "Make the person in the image smile and wave",
"duration": 5,
"image_url": "https://console.mixroute.io/image.jpg"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "sora-2",
"prompt": "Convert the video style to anime, keep the same motion and composition",
"duration": 10,
"remix_url": "https://console.mixroute.io/original-video.mp4"
}'
Text-to-Video
First Frame Mode
First & Last Frame Mode
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning sunlight shining on a cyberpunk city skyline, camera slowly pushing forward",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "veo-3.1-generate-preview",
"prompt": "Camera slowly pulls back to reveal the entire city panorama",
"durationSeconds": 8,
"aspectRatio": "16:9",
"image": "https://console.mixroute.io/first-frame.jpg"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "veo-3.1-generate-preview",
"prompt": "A flower blooming from bud to full bloom",
"durationSeconds": 6,
"image": "https://console.mixroute.io/flower-bud.jpg",
"lastFrameImage": "https://console.mixroute.io/flower-bloom.jpg"
}'
Text-to-Video
Image-to-Video
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "wanx-video-v1",
"prompt": "A Chinese dragon flying through the clouds, majestic and powerful",
"duration": 5,
"size": "1280x720",
"style": "realistic"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "wanx-video-v1",
"prompt": "Make the waterfall in the image flow",
"duration": 5,
"image_url": "https://console.mixroute.io/waterfall.jpg"
}'
Text-to-Video (T2V)
I2V First Frame
First & Last Frame
Reference Image
Pro Model
1.5 Pro
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "seedance-1.0",
"prompt": "A girl dancing under cherry blossom trees, petals falling, beautiful aesthetic",
"duration": 6,
"aspect_ratio": "9:16",
"resolution": "1080p",
"negative_prompt": "blurry, distorted, low quality"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "seedance-1.0",
"prompt": "The person slowly turns their head and smiles",
"duration": 4,
"first_frame": "https://console.mixroute.io/portrait.jpg"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "seedance-1.0",
"prompt": "A car accelerates from standstill and drives into the distance",
"duration": 6,
"first_frame": "https://console.mixroute.io/car-start.jpg",
"last_frame": "https://console.mixroute.io/car-end.jpg"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "seedance-1.0",
"prompt": "A girl walking on the street, maintaining the character appearance from the reference image",
"duration": 6,
"reference_image": "https://console.mixroute.io/character-ref.jpg",
"aspect_ratio": "16:9"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "seedance-1.0-pro",
"prompt": "Cinematic quality, a samurai slowly drawing his sword in the rain",
"duration": 8,
"aspect_ratio": "16:9",
"resolution": "1080p"
}'
curl -X POST "https://console.mixroute.io/v1/video/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-d '{
"model": "seedance-1.5-pro",
"prompt": "Ultra HD quality, an astronaut performing maintenance outside a space station, Earth slowly rotating in the background",
"duration": 8,
"aspect_ratio": "16:9",
"resolution": "1080p",
"negative_prompt": "blurry, noise, low quality"
}'
Response Example
{
"task_id" : "video_xxx" ,
"status" : "pending"
}
Python Example
import requests
import time
def generate_video ( prompt , model = "veo-3.1-fast-generate-preview" ):
"""Submit a video generation task and wait for completion"""
api_key = "sk-xxxxxxxxxx"
base_url = "https://console.mixroute.io/v1"
# Submit task
response = requests.post(
f " { base_url } /video/generations" ,
headers = {
"Authorization" : f "Bearer { api_key } " ,
"Content-Type" : "application/json"
},
json = {
"model" : model,
"prompt" : prompt,
"durationSeconds" : 6 ,
"aspectRatio" : "16:9"
}
)
task_id = response.json()[ "task_id" ]
print ( f "Task submitted: { task_id } " )
# Poll status
while True :
status_response = requests.get(
f " { base_url } /video/generations/ { task_id } " ,
headers = { "Authorization" : f "Bearer { api_key } " }
)
result = status_response.json()
status = result.get( "status" )
print ( f "Current status: { status } " )
if status == "succeeded" :
return result.get( "url" )
elif status == "failed" :
raise Exception ( f "Generation failed: { result.get( 'error' ) } " )
time.sleep( 5 )
# Usage example
video_url = generate_video( "A sailboat sailing on calm water at sunset" )
print ( f "Video URL: { video_url } " )
Model Comparison
Feature Sora 2 Veo Alibaba Wanxiang Doubao Seedance Max Duration 20s 8s 10s 8s Max Resolution 1080p 1080p 720p 1080p First Frame Constraint ✅ ✅ ✅ ✅ Last Frame Constraint ❌ ✅ (3.1) ❌ ✅ Audio Generation ❌ ✅ ❌ ❌ Chinese Understanding Good Good Excellent Excellent
Video generation consumes significant resources. Please control your request frequency. Different models have different pricing, see the pricing page for details.
Notes
Video generation is an asynchronous task, polling for status is required
Parameter names may vary slightly between models, please refer to each model’s examples
Prompts should describe scene content, camera movements, style, etc. in detail
Generated videos have an expiration period, download and save them promptly
Please follow content policies and avoid generating prohibited content
cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url https://console.mixroute.io/v1/video/generations \
--header 'Authorization: Bearer sk-xxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "A cute kitten playing in the garden",
"durationSeconds": 6,
"aspectRatio": "16:9"
}'
{
"task_id" : "video_xxx" ,
"status" : "submitted" ,
"format" : "mp4"
}