Skip to main content
POST
/
v3
/
async
/
vidu-q2-template2video
VIDU Q2 Template to Video
curl --request POST \
  --url https://api.myrouter.ai/v3/async/vidu-q2-template2video \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "bgm": true,
  "area": "<string>",
  "seed": 123,
  "beast": "<string>",
  "images": [
    {}
  ],
  "prompt": "<string>",
  "wm_url": "<string>",
  "payload": "<string>",
  "template": "<string>",
  "meta_data": "<string>",
  "watermark": true,
  "wm_position": 123,
  "aspect_ratio": "<string>"
}
'
{
  "task_id": "<string>",
  "provider_request_id": "<string>"
}
Generate special-effect videos based on scene templates and input images. Supports multiple scene templates, each with different effect parameters.
This is an async API that only returns the task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.

Request Headers

Content-Type
string
required
Enum: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

bgm
boolean
default:false
Whether to add background music to the generated video. Default: false. When set to true, the system will automatically select and add suitable music from the preset BGM library; when not set or false, no BGM is added. BGM duration is not limited; the system automatically adapts to the video length.
area
string
default:"auto"
Parameter exclusive to the Exotic Princess effect. Only available when template is set to exotic_princess. Default: autoPossible values: auto, denmark, uk, africa, china, mexico, switzerland, russia, italy, korea, thailand, india, japan
seed
integer
default:0
Random seed. When not provided or set to 0, a random number is used; when manually set, the specified seed is used.
beast
string
default:"auto"
Parameter exclusive to the Beast Companion effect. Only available when template is set to beast_companion. Default: autoPossible values: auto, bear, tiger, elk, snake, lion, wolf
images
array
required
Input image list. The model uses the images provided in this parameter to generate video. Supports Base64-encoded images or image URLs (must be accessible). Supported formats: png, jpeg, jpg, webp. Image aspect ratio must be less than 1:4 or 4:1, and file size must not exceed 50MB. The decoded Base64 byte length must be less than 10MB, and the encoding must include the appropriate content type string, e.g.: data:image/png;base64,{base64_encode}Array length: 1 - unlimited
prompt
string
Text prompt describing the video to generate. Note: when template=subject_3 or pubg_winner_hit, the prompt is optional.
wm_url
string
Watermark content, specified as an image URL. When not provided, the default watermark is used: “AI Generated”.
payload
string
Pass-through parameter, not processed in any way, used only for data transmission. Up to 1048576 characters.Length limit: 0 - 1048576
template
string
required
Scene template parameter. Different scene templates correspond to different request parameters. Common templates: subject_3 (character outfit change), pubg_winner_hit (winner effect), exotic_princess (exotic princess), beast_companion (beast companion), etc. For the full template list, see: https://platform.vidu.cn/docs/templates
meta_data
string
Metadata identifier, a JSON-format string, pass-through field. You can customize the format or use the example format. When this parameter is empty, the default metadata identifier generated by Vidu is used. Example format: {"Label": "your_label", "ContentProducer": "your_content_producer", "ContentPropagator": "your_content_propagator", "ProduceID": "your_product_id", "PropagateID": "your_propagate_id", "ReservedCode1": "your_reserved_code1", "ReservedCode2": "your_reserved_code2"}
watermark
boolean
default:false
Whether to add a watermark. true: add watermark; false: no watermark. Currently the watermark text is fixed as “AI Generated”, and is not added by default. You can use the watermarked_url parameter to retrieve the watermarked video.
wm_position
integer
default:3
Watermark position, indicating where the watermark appears on the video. 1: top-left; 2: top-right; 3: bottom-right; 4: bottom-left. Default: 3Possible values: 1, 2, 3, 4
aspect_ratio
string
default:"16:9"
Video aspect ratio. Default: 16:9. Available values vary by template; see the template documentation for details.Possible values: 16:9, 9:16

Response

task_id
string
required
Use the task_id to call the Get Async Task Result API to retrieve the generated output.
provider_request_id
string
Provider request ID (optional)