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.
Generate video from a text prompt. Supports viduq3-turbo, viduq3-pro, viduq2, and viduq1 models, up to 1080p, with duration up to 16 seconds depending on the model.
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/text2video
Create Text-to-Video Task
Create a video generation task from a text prompt.
Request Body
Content-Type: application/json
Example:
{
"model": "viduq3-pro",
"style": "general",
"prompt": "In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog. The background consists of enchanting white and golden lights, creating a minimalist still life and an impressive panoramic scene.",
"duration": 5,
"seed": 0,
"aspect_ratio": "4:3",
"resolution": "540p",
"movement_amplitude": "auto",
"off_peak": false
}Properties:
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name. Available values: viduq3-turbo, viduq3-pro, viduq2, viduq1. viduq3-turbo generates faster; viduq3-pro has better audio-video quality; viduq2 is the latest model; viduq1 delivers clear visuals and stable camera motion |
style | string | No | Style, default general. Available: general, anime. Not effective when using q2 or q3 series models |
prompt | string | Yes | Text prompt describing the desired video content. Maximum 5,000 characters |
duration | integer | No | Video duration in seconds. viduq3-pro / viduq3-turbo: default 5, range 1–16; viduq2: default 5, range 1–10; viduq1: default 5, only 5 supported |
seed | integer | No | Random seed. Uses a random value if omitted or set to 0 |
aspect_ratio | string | No | Aspect ratio, default 16:9. Available: 16:9, 9:16, 3:4, 4:3, 1:1. 3:4 and 4:3 supported only on q2 and q3 series |
resolution | string | No | Resolution. viduq3-pro / viduq3-turbo: default 720p, available 540p, 720p, 1080p; viduq2: default 720p, available 540p, 720p, 1080p; viduq1: default 1080p, available 1080p |
movement_amplitude | string | No | Motion amplitude, default auto. Available: auto, small, medium, large. Not effective on q2 and q3 series |
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 series |
audio | boolean | No | Whether to output audio and video together, default true. false outputs a silent video; true outputs video with dialogue and sound effects. Supported only on q3 series |
payload | string | No | Passthrough parameter, up to 1,048,576 characters |
off_peak | boolean | No | Off-peak mode, default false. When true, credits cost less; the task is generated within 48 hours, and is automatically canceled with credits refunded if it times out |
watermark | boolean | No | Whether to add a watermark, not added by default. Use watermarked_url from the query endpoint to retrieve the watermarked result |
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; uses the default watermark if omitted |
meta_data | string | No | Metadata identifier, JSON format string, passthrough field |
callback_url | string | No | Callback URL (POST) when task status changes. Callback body matches the Query Creations endpoint; statuses include processing, success, failed |
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/text2video" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxx" \
-d '{
"model": "viduq3-pro",
"style": "general",
"prompt": "In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog.",
"duration": 5,
"seed": 0,
"aspect_ratio": "4:3",
"resolution": "540p",
"movement_amplitude": "auto",
"off_peak": false
}'Response Example
{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq3-pro",
"style": "general",
"prompt": "In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog.",
"duration": 5,
"seed": 123456,
"aspect_ratio": "4:3",
"resolution": "540p",
"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. Enum: created, queueing, processing, success, failed |
model | string | Model name used in this request |
prompt | string | Prompt used in this request |
duration | integer | Video duration in seconds |
seed | integer | Random seed |
aspect_ratio | string | Aspect ratio |
resolution | string | Resolution |
bgm | boolean | Whether background music was added |
movement_amplitude | string | Motion amplitude |
payload | string | Passthrough parameter |
off_peak | boolean | Whether off-peak mode was used |
credits | integer | Credits consumed by this request |
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 the task_id returned when creating the task. Creation URLs are valid for 24 hours. See the Query Creations endpoint for details.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID |
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"
}
]
}Response fields:
| Name | Type | Description |
|---|---|---|
id | string | Task ID |
state | string | Processing status: created, queueing, processing, success, failed |
err_code | string | Error code, returned on failure |
credits | integer | Credits consumed by this task |
payload | string | Passthrough parameter |
creations | array | List of generation results |
creations[].id | string | Creation ID |
creations[].url | string | Creation URL, valid for 24 hours |
creations[].cover_url | string | Cover URL, valid for 24 hours |
creations[].watermarked_url | string | Watermarked creation URL, valid for 24 hours |
Error Handling
HTTP 400 Parameter Errors (pre-submit validation, no billing)
AutoRouter validates required fields before submitting upstream:
| Scenario | Response |
|---|---|
Missing prompt | {"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 (check token's model allowlist)
HTTP 402 Insufficient Balance
Returns insufficient user quota. Top up at the AutoRouter console.
Task failed Status
The task was accepted but upstream generation failed (state == "failed"). See err_code for details:
| Reason | Suggested Action |
|---|---|
| Content moderation | Adjust prompt to avoid sensitive content |
| Illegal parameter combo (e.g. unsupported resolution) | Follow the Request Body specification |
When a task enters failed, AutoRouter automatically refunds the billed quota. Check refund records in the logs page.
视频生成
通过 Veo 3.1 视频生成接口,使用文本提示词或参考图片生成带原生音频的 AI 视频。支持文生视频、图生视频、首尾帧插值、参考图片(最多 3 张)、视频续写及 4K 输出。异步 Long-Running Operation 接口,提交后返回 Operation,需轮询直到 done=true。
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.