VIDU Q2 Pro Smart Multi-Frame
curl --request POST \
--url https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"wm_url": "<string>",
"payload": "<string>",
"meta_data": "<string>",
"watermark": true,
"resolution": "<string>",
"start_image": "<string>",
"wm_position": "<string>",
"image_settings": [
{
"prompt": "<string>",
"duration": 123,
"key_image": "<string>"
}
]
}
'import requests
url = "https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe"
payload = {
"wm_url": "<string>",
"payload": "<string>",
"meta_data": "<string>",
"watermark": True,
"resolution": "<string>",
"start_image": "<string>",
"wm_position": "<string>",
"image_settings": [
{
"prompt": "<string>",
"duration": 123,
"key_image": "<string>"
}
]
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
wm_url: '<string>',
payload: '<string>',
meta_data: '<string>',
watermark: true,
resolution: '<string>',
start_image: '<string>',
wm_position: '<string>',
image_settings: [{prompt: '<string>', duration: 123, key_image: '<string>'}]
})
};
fetch('https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wm_url' => '<string>',
'payload' => '<string>',
'meta_data' => '<string>',
'watermark' => true,
'resolution' => '<string>',
'start_image' => '<string>',
'wm_position' => '<string>',
'image_settings' => [
[
'prompt' => '<string>',
'duration' => 123,
'key_image' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe"
payload := strings.NewReader("{\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"start_image\": \"<string>\",\n \"wm_position\": \"<string>\",\n \"image_settings\": [\n {\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"key_image\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"start_image\": \"<string>\",\n \"wm_position\": \"<string>\",\n \"image_settings\": [\n {\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"key_image\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"start_image\": \"<string>\",\n \"wm_position\": \"<string>\",\n \"image_settings\": [\n {\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"key_image\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"provider_request_id": "<string>"
}Video
VIDU Q2 Pro Smart Multi-Frame
POST
/
v3
/
async
/
vidu-q2-pro-multiframe
VIDU Q2 Pro Smart Multi-Frame
curl --request POST \
--url https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"wm_url": "<string>",
"payload": "<string>",
"meta_data": "<string>",
"watermark": true,
"resolution": "<string>",
"start_image": "<string>",
"wm_position": "<string>",
"image_settings": [
{
"prompt": "<string>",
"duration": 123,
"key_image": "<string>"
}
]
}
'import requests
url = "https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe"
payload = {
"wm_url": "<string>",
"payload": "<string>",
"meta_data": "<string>",
"watermark": True,
"resolution": "<string>",
"start_image": "<string>",
"wm_position": "<string>",
"image_settings": [
{
"prompt": "<string>",
"duration": 123,
"key_image": "<string>"
}
]
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
wm_url: '<string>',
payload: '<string>',
meta_data: '<string>',
watermark: true,
resolution: '<string>',
start_image: '<string>',
wm_position: '<string>',
image_settings: [{prompt: '<string>', duration: 123, key_image: '<string>'}]
})
};
fetch('https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wm_url' => '<string>',
'payload' => '<string>',
'meta_data' => '<string>',
'watermark' => true,
'resolution' => '<string>',
'start_image' => '<string>',
'wm_position' => '<string>',
'image_settings' => [
[
'prompt' => '<string>',
'duration' => 123,
'key_image' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe"
payload := strings.NewReader("{\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"start_image\": \"<string>\",\n \"wm_position\": \"<string>\",\n \"image_settings\": [\n {\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"key_image\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"start_image\": \"<string>\",\n \"wm_position\": \"<string>\",\n \"image_settings\": [\n {\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"key_image\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/vidu-q2-pro-multiframe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"wm_url\": \"<string>\",\n \"payload\": \"<string>\",\n \"meta_data\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"start_image\": \"<string>\",\n \"wm_position\": \"<string>\",\n \"image_settings\": [\n {\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"key_image\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"provider_request_id": "<string>"
}Generate coherent videos from multiple keyframe images. Supports three resolutions: 540p, 720p, and 1080p.
This is an asynchronous API and only returns the task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to retrieve the generated result.
Request Headers
string
required
Enum value:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
string
Watermark image URL. If watermarking is enabled but no custom watermark URL is provided, the default watermark is used. This parameter has no effect if no watermark is added.
string
Pass-through parameter. It is not processed in any way and is only transmitted as data. Up to 1048576 characters.
string
Metadata identifier, as a JSON-formatted string. Pass-through field.
boolean
default:false
Whether to add a watermark. true: add a watermark; false: do not add a watermark. Not added by default.
string
default:"720p"
Video resolution. Default is 720p.Allowed values:
540p, 720p, 1080pstring
required
First-frame image. Supports passing an image Base64 encoding or an image URL. Only 1 image is supported as input. Supports png, jpeg, jpg, and webp formats. The image aspect ratio must be within 1:4 to 4:1. Image size must not exceed 50 MB.
string
default:"bottom_left"
Watermark position. Defaults to bottom left. This parameter has no effect if no watermark is added.Allowed values:
top_left, top_right, bottom_right, bottom_leftobject[]
required
Keyframe configuration array. Each task requires at least 2 keyframes and supports up to 9 keyframes.Array length: 2 - 9
Hide properties
Hide properties
string
Prompt for extending from the previous image, used to control the content of the extended video.
integer
default:5
Multi-frame duration. The video duration between different keyframes. Default is 5s; options are 2–7s.Value range: [2, 7]
string
required
Reference image for an intermediate frame. The model uses the image in this parameter as the end frame to generate the video. Supports passing an image Base64 encoding or an image URL. Only 1 image is supported as input. The input order is the timeline order (from the first frame to the last frame). Supports png, jpeg, jpg, and webp formats. The image aspect ratio must be within 1:4 to 4:1. Image size must not exceed 50 MB.
Response
string
required
Use task_id to request the Get Task Result API to retrieve the generated output.
string
Provider request ID (optional)
⌘I