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

# VIDU Q2 Template to Video

VIDU Q2 template to video API, supports various effect scene templates, generates effect video content based on templates and input images.

<Tip>
  This is an **asynchronous** API; only the **task\_id** will be returned. You should use the **task\_id** to request the [**Task Result API**](/api-reference/model-apis-task-result) to retrieve the video generation results.
</Tip>

## Request Headers

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

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format, for example: 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 true, the system will automatically select appropriate music from the preset BGM library and add it; when not passed or false, no BGM is added. BGM duration is unlimited, the system automatically adapts to video duration
</ParamField>

<ParamField body="area" type="string" default="auto">
  Exotic princess effect exclusive parameter. Only available when template is exotic\_princess. Default: auto

  Optional 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 passed or passed as 0, a random number will be used instead; manually set to use the specified seed
</ParamField>

<ParamField body="beast" type="string" default="auto">
  Beast companion effect exclusive parameter. Only available when template is beast\_companion. Default: auto

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

<ParamField body="images" type="array" required={true}>
  Input image list. The model will generate video based on the images passed in this parameter. Supports image Base64 encoding or image URL (ensure accessibility). Supports png, jpeg, jpg, webp formats. Image aspect ratio must be less than 1:4 or 4:1, size not exceeding 50MB. Base64 decoded byte length must be less than 10M, and encoding must include appropriate content type string, e.g.: data:image/png;base64,{base64_encode}

  Array length: 1 - unlimited
</ParamField>

<ParamField body="prompt" type="string">
  Text prompt, text description for generating video. Note: When template=subject\_3 or pubg\_winner\_hit, prompt is not required
</ParamField>

<ParamField body="wm_url" type="string">
  Watermark content, image URL. When not passed, default watermark is used: content generated by AI
</ParamField>

<ParamField body="payload" type="string">
  Passthrough parameter, no processing, data transmission only. Maximum 1048576 characters

  Length limit: 0 - 1048576
</ParamField>

<ParamField body="template" type="string" required={true}>
  Scene template parameter. Different scene templates correspond to different call parameters. Common templates: subject\_3 (character costume change), pubg\_winner\_hit (PUBG effect), exotic\_princess (exotic princess), beast\_companion (beast companion), etc. Please refer to [https://platform.vidu.cn/docs/templates](https://platform.vidu.cn/docs/templates) for details
</ParamField>

<ParamField body="meta_data" type="string">
  Metadata identifier, JSON format string, passthrough field. You can customize the format or use the example format. When this parameter is empty, the metadata identifier generated by vidu is used by default. 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 watermark. true: add watermark; false: do not add watermark. Currently watermark content is fixed, content generated by AI, not added by default. You can query watermarked video content via watermarked\_url parameter
</ParamField>

<ParamField body="wm_position" type="integer" default={3}>
  Watermark position, indicates where the watermark appears in the image. 1: top-left; 2: top-right; 3: bottom-right; 4: bottom-left. Default is 3

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

<ParamField body="aspect_ratio" type="string" default="16:9">
  Video aspect ratio. Default 16:9, options: 16:9, 9:16. Different templates support different options, see template description for details

  Optional values: `16:9`, `9:16`
</ParamField>

## Response

<ResponseField name="task_id" type="string" required={true}>
  Use the task\_id to request the [Task Result API](/api-reference/model-apis-task-result) to retrieve the generated outputs.
</ResponseField>

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