Skip to main content
POST
/
v3
/
async
/
vidu-q2-template2video
VIDU Q2 Scene Templates
curl --request POST \
  --url https://api.highwayapi.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-effects videos from scene templates and input images. Multiple scene templates are supported, and different templates support different special-effect parameters.
This is an asynchronous API and only returns the asynchronous task’s task_id. You should use this task_id to request the Get Task Result API to retrieve the generated result.

Request Headers

Content-Type
string
required
Enum value: 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 automatically selects suitable music from the preset BGM library and adds it; if omitted or set to false, no BGM is added. BGM has no duration limit; the system automatically adapts it to the video duration.
area
string
default:"auto"
Dedicated parameter for the Exotic Princess effect. Only available when template is set to exotic_princess. Default: autoOptional values: auto, denmark, uk, africa, china, mexico, switzerland, russia, italy, korea, thailand, india, japan
seed
integer
default:0
Random seed. When omitted by default or set to 0, a random number will be used instead; if manually set, the specified seed will be used.
beast
string
default:"auto"
Dedicated parameter for the Beast Companion effect. Only available when template is set to beast_companion. Default: autoOptional values: auto, bear, tiger, elk, snake, lion, wolf
images
array
required
Input image list. The model will generate the video using the images passed in this parameter. Supports image Base64 encoding or image URLs (make sure they are accessible). Images support png, jpeg, jpg, and webp formats. The image aspect ratio must be less extreme than 1:4 or 4:1, and the size must not exceed 50MB. The byte length after Base64 decoding must be less than 10M, and the encoding must include an appropriate content type string, for example: data:image/png;base64,{base64_encode}Array length: 1 - unlimited
prompt
string
Text prompt, a textual description for generating the video. Note: when template=subject_3 or pubg_winner_hit, the prompt is not required.
wm_url
string
Watermark content, here provided as an image URL. If omitted, the default watermark is used: Content generated by AI.
payload
string
Pass-through parameter. It is not processed in any way and is only used for data transmission. Maximum 1048576 characters.Length limit: 0 - 1048576
template
string
required
Scene template parameter. Different scene templates correspond to different call parameters. Common templates: subject_3 (character outfit change), pubg_winner_hit (PUBG effect), exotic_princess (Exotic Princess), beast_companion (Beast Companion), etc. For specific templates, see: https://platform.vidu.cn/docs/templates
meta_data
string
Metadata identifier, a JSON-formatted string and pass-through 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"}
watermark
boolean
default:false
Whether to add a watermark. true: add a watermark; false: do not add a watermark. Currently, the watermark content is fixed: Content generated by AI, and it is not added by default. You can query the watermarked video content via the watermarked_url parameter.
wm_position
integer
default:3
Watermark position, indicating where the watermark appears on the image. 1: top-left corner; 2: top-right corner; 3: bottom-right corner; 4: bottom-left corner. Default is 3.Optional values: 1, 2, 3, 4
aspect_ratio
string
default:"16:9"
Video aspect ratio. Default is 16:9. Optional values: 16:9, 9:16. The optional values supported vary by template. See the template description for details.Optional values: 16:9, 9:16

Response Information

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