Image-to-Video
Generate video from a first-frame image and optional prompt. Async task API: submit a request, receive a task_id, then poll the [Query Creations endpoint](./creations) for the result.
Generate subsequent motion video from a first-frame image with an optional prompt. Supports viduq3-pro, viduq3-turbo, viduq2-pro, viduq1, and related models, up to 1080p.
This is an async task-based API: submit a request to receive a task_id, then poll the Query Creations endpoint for the result.
Base URL
https://api.autorouter.top— Production
Authentication
BearerAuth: http (bearer)
Authenticate using a Bearer Token.
Format: Authorization: Bearer sk-xxxxxx
Endpoints
POST /vidu/ent/v2/img2video
Create Image-to-Video Task
Create a video generation task from a first-frame image.
Request Body
Content-Type: application/json
Example:
{
"model": "viduq3-pro",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],
"prompt": "The astronaut waved and the camera moved up.",
"audio": true,
"voice_id": "professional_host",
"duration": 5,
"seed": 0,
"resolution": "1080p",
"movement_amplitude": "auto",
"off_peak": false
}Properties:
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name. Available values: viduq3-turbo, viduq3-pro, viduq3-pro-fast, viduq2-pro-fast, viduq2-pro, viduq2-turbo, viduq1, viduq1-classic, vidu2.0 |
images | string[] | Yes | First-frame image, only 1 supported. Accepts image URL or Base64 (must include data:image/png;base64,... prefix). Formats: png / jpeg / jpg / webp; aspect ratio less than 1:4 or 4:1; size ≤ 50 MB; request body ≤ 20 MB |
prompt | string | No | Text prompt, up to 5,000 characters. Ignored when is_rec is enabled |
audio | boolean | No | Whether to output audio and video together. Default false; default true for q3-pro / q3-turbo / q3-pro-fast. voice_id applies only when true |
audio_type | string | No | Audio type, required when audio is true, default all. Available: all, speech_only, sound_effect_only. Audio splitting supported only on q2 / q1 / 2.0 series |
voice_id | string | No | Voice ID, not effective on q3 series. Auto-recommended by the system if empty |
is_rec | boolean | No | Whether to use recommended prompts. When true, the system recommends a prompt; each task costs an additional 10 credits |
bgm | boolean | No | Whether to add background music, default false. Not effective on q2 when duration is 9 or 10 seconds; not effective on q3 |
duration | integer | No | Video duration in seconds. q3 series default 5, range 1–16; q2 series default 5, range 1–10; viduq1 / viduq1-classic only 5; vidu2.0 default 4, available 4 or 8 |
seed | integer | No | Random seed. Uses a random value if omitted or set to 0 |
resolution | string | No | Resolution, default depends on model and duration. Common values: 360p, 540p, 720p, 1080p |
movement_amplitude | string | No | Motion amplitude, default auto. Available: auto, small, medium, large. Not effective on q2 and q3 series |
payload | string | No | Passthrough parameter, up to 1,048,576 characters |
off_peak | boolean | No | Off-peak mode, default false. Off-peak is not supported for audio-video output on models other than q3 |
watermark | boolean | No | Whether to add a watermark, not added by default |
wm_position | integer | No | Watermark position: 1 top-left, 2 top-right, 3 bottom-right (default), 4 bottom-left |
wm_url | string | No | Custom watermark image URL |
meta_data | string | No | Metadata identifier, JSON format string |
callback_url | string | No | Callback URL (POST) when task status changes |
Responses
200: Task created successfully
Content-Type: application/json
400: Bad request / invalid parameters
Content-Type: application/json
429: Rate limit exceeded
Content-Type: application/json
Request Example
curl -X POST "https://api.autorouter.top/vidu/ent/v2/img2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "viduq3-pro",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],
"prompt": "The astronaut waved and the camera moved up.",
"audio": true,
"duration": 5,
"seed": 0,
"resolution": "1080p",
"movement_amplitude": "auto",
"off_peak": false
}'Response Example
{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq3-pro",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],
"prompt": "The astronaut waved and the camera moved up.",
"duration": 5,
"seed": 123456,
"resolution": "1080p",
"movement_amplitude": "auto",
"payload": "",
"off_peak": false,
"credits": 4,
"created_at": "2025-01-01T15:41:31.968916Z"
}Response fields:
| Name | Type | Description |
|---|---|---|
task_id | string | Task ID for querying creations |
state | string | Processing status: created, queueing, processing, success, failed |
model | string | Model name used in this request |
images | string[] | Image parameters used in this request |
prompt | string | Prompt used in this request |
duration | integer | Video duration in seconds |
audio | boolean | Whether audio and video were output together |
audio_type | string | Output audio type |
seed | integer | Random seed |
resolution | string | Resolution |
movement_amplitude | string | Motion amplitude |
payload | string | Passthrough parameter |
off_peak | boolean | Whether off-peak mode was used |
credits | integer | Credits consumed |
watermark | boolean | Whether a watermark was added |
created_at | string | Task creation time |
GET /vidu/ent/v2/tasks/{id}/creations
Query Creations
Query task status and generation results using task_id. See the Query Creations endpoint for details.
Request Example
curl -X GET "https://api.autorouter.top/vidu/ent/v2/tasks/{task_id}/creations" \
-H "Authorization: Bearer sk-xxxxxx"Response Example
{
"id": "your_task_id",
"state": "success",
"err_code": "",
"credits": 4,
"payload": "",
"creations": [
{
"id": "your_creations_id",
"url": "your_generated_results_url",
"cover_url": "your_generated_results_cover_url",
"watermarked_url": "your_generated_results_watermarked_url"
}
]
}Error Handling
HTTP 400 Parameter Errors (pre-submit validation, no billing)
| Scenario | Response |
|---|---|
Missing images | {"code":"InvalidParameter","message":"...","request_id":"..."} |
| Unknown model | {"code":"InvalidParameter","message":"unknown model: ...","request_id":"..."} |
HTTP 401 / 403 Auth Errors
401 Unauthorized: API Key invalid or expired403 Forbidden: API Key has no access to this model
HTTP 402 Insufficient Balance
Returns insufficient user quota. Top up at the AutoRouter console.
Task failed Status
See err_code when the task fails. When a task enters failed, AutoRouter automatically refunds the billed quota.
Text-to-Video
Generate video from a text prompt. Async task API: submit a request, receive a task_id, then poll the [Query Creations endpoint](./creations) for the result.
Reference-to-Video
Generate subject-consistent video from subjects or reference images/videos. Async task API: submit a request, receive a task_id, then poll the [Query Creations endpoint](./creations) for the result.