> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# VIDU Q2 Template to Video

Generate special-effect videos based on scene templates and input images. Supports multiple scene templates, each with different effect parameters.

<Tip>
  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](/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="bgm" type="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.
</ParamField>

<ParamField body="area" type="string" default="auto">
  Parameter exclusive to the Exotic Princess effect. Only available when template is set to exotic\_princess. Default: auto

  Possible values: `auto`, `denmark`, `uk`, `africa`, `china`, `mexico`, `switzerland`, `russia`, `italy`, `korea`, `thailand`, `india`, `japan`
</ParamField>

<ParamField body="seed" type="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.
</ParamField>

<ParamField body="beast" type="string" default="auto">
  Parameter exclusive to the Beast Companion effect. Only available when template is set to beast\_companion. Default: auto

  Possible values: `auto`, `bear`, `tiger`, `elk`, `snake`, `lion`, `wolf`
</ParamField>

<ParamField body="images" type="array" required={true}>
  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
</ParamField>

<ParamField body="prompt" type="string">
  Text prompt describing the video to generate. Note: when template=subject\_3 or pubg\_winner\_hit, the prompt is optional.
</ParamField>

<ParamField body="wm_url" type="string">
  Watermark content, specified as an image URL. When not provided, the default watermark is used: "AI Generated".
</ParamField>

<ParamField body="payload" type="string">
  Pass-through parameter, not processed in any way, used only for data transmission. Up to 1048576 characters.

  Length limit: 0 - 1048576
</ParamField>

<ParamField body="template" type="string" required={true}>
  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](https://platform.vidu.cn/docs/templates)
</ParamField>

<ParamField body="meta_data" type="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"}`
</ParamField>

<ParamField body="watermark" type="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.
</ParamField>

<ParamField body="wm_position" type="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: 3

  Possible values: `1`, `2`, `3`, `4`
</ParamField>

<ParamField body="aspect_ratio" type="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`
</ParamField>

## Response

<ResponseField name="task_id" type="string" required={true}>
  Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>

<ResponseField name="provider_request_id" type="string" required={false}>
  Provider request ID (optional)
</ResponseField>
