API DocsAI Model APIsVideosVidu

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:

NameTypeRequiredDescription
modelstringYesModel 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
stylestringNoStyle, default general. Available: general, anime. Not effective when using q2 or q3 series models
promptstringYesText prompt describing the desired video content. Maximum 5,000 characters
durationintegerNoVideo duration in seconds. viduq3-pro / viduq3-turbo: default 5, range 1–16; viduq2: default 5, range 1–10; viduq1: default 5, only 5 supported
seedintegerNoRandom seed. Uses a random value if omitted or set to 0
aspect_ratiostringNoAspect 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
resolutionstringNoResolution. viduq3-pro / viduq3-turbo: default 720p, available 540p, 720p, 1080p; viduq2: default 720p, available 540p, 720p, 1080p; viduq1: default 1080p, available 1080p
movement_amplitudestringNoMotion amplitude, default auto. Available: auto, small, medium, large. Not effective on q2 and q3 series
bgmbooleanNoWhether to add background music, default false. Not effective on q2 when duration is 9 or 10 seconds; not effective on q3 series
audiobooleanNoWhether 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
payloadstringNoPassthrough parameter, up to 1,048,576 characters
off_peakbooleanNoOff-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
watermarkbooleanNoWhether to add a watermark, not added by default. Use watermarked_url from the query endpoint to retrieve the watermarked result
wm_positionintegerNoWatermark position: 1 top-left, 2 top-right, 3 bottom-right (default), 4 bottom-left
wm_urlstringNoCustom watermark image URL; uses the default watermark if omitted
meta_datastringNoMetadata identifier, JSON format string, passthrough field
callback_urlstringNoCallback 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:

NameTypeDescription
task_idstringTask ID for querying creations
statestringProcessing status. Enum: created, queueing, processing, success, failed
modelstringModel name used in this request
promptstringPrompt used in this request
durationintegerVideo duration in seconds
seedintegerRandom seed
aspect_ratiostringAspect ratio
resolutionstringResolution
bgmbooleanWhether background music was added
movement_amplitudestringMotion amplitude
payloadstringPassthrough parameter
off_peakbooleanWhether off-peak mode was used
creditsintegerCredits consumed by this request
watermarkbooleanWhether a watermark was added
created_atstringTask 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

NameTypeRequiredDescription
idstringYesTask 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:

NameTypeDescription
idstringTask ID
statestringProcessing status: created, queueing, processing, success, failed
err_codestringError code, returned on failure
creditsintegerCredits consumed by this task
payloadstringPassthrough parameter
creationsarrayList of generation results
creations[].idstringCreation ID
creations[].urlstringCreation URL, valid for 24 hours
creations[].cover_urlstringCover URL, valid for 24 hours
creations[].watermarked_urlstringWatermarked creation URL, valid for 24 hours

Error Handling

HTTP 400 Parameter Errors (pre-submit validation, no billing)

AutoRouter validates required fields before submitting upstream:

ScenarioResponse
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 expired
  • 403 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:

ReasonSuggested Action
Content moderationAdjust 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.

On this page