VIDU Q2 Pro 画像から動画生成
curl --request POST \
--url https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"bgm": true,
"seed": 123,
"audio": true,
"images": [
"<string>"
],
"prompt": "<string>",
"duration": 123,
"off_peak": true,
"voice_id": "<string>",
"watermark": true,
"resolution": "<string>",
"movement_amplitude": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video"
payload = {
"bgm": True,
"seed": 123,
"audio": True,
"images": ["<string>"],
"prompt": "<string>",
"duration": 123,
"off_peak": True,
"voice_id": "<string>",
"watermark": True,
"resolution": "<string>",
"movement_amplitude": "<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({
bgm: true,
seed: 123,
audio: true,
images: ['<string>'],
prompt: '<string>',
duration: 123,
off_peak: true,
voice_id: '<string>',
watermark: true,
resolution: '<string>',
movement_amplitude: '<string>'
})
};
fetch('https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video', 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-img2video",
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([
'bgm' => true,
'seed' => 123,
'audio' => true,
'images' => [
'<string>'
],
'prompt' => '<string>',
'duration' => 123,
'off_peak' => true,
'voice_id' => '<string>',
'watermark' => true,
'resolution' => '<string>',
'movement_amplitude' => '<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-img2video"
payload := strings.NewReader("{\n \"bgm\": true,\n \"seed\": 123,\n \"audio\": true,\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"off_peak\": true,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\"\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-img2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"bgm\": true,\n \"seed\": 123,\n \"audio\": true,\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"off_peak\": true,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video")
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 \"bgm\": true,\n \"seed\": 123,\n \"audio\": true,\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"off_peak\": true,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"provider_request_id": "<string>"
}動画
VIDU Q2 Pro 画像から動画生成
POST
/
v3
/
async
/
vidu-q2-pro-img2video
VIDU Q2 Pro 画像から動画生成
curl --request POST \
--url https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"bgm": true,
"seed": 123,
"audio": true,
"images": [
"<string>"
],
"prompt": "<string>",
"duration": 123,
"off_peak": true,
"voice_id": "<string>",
"watermark": true,
"resolution": "<string>",
"movement_amplitude": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video"
payload = {
"bgm": True,
"seed": 123,
"audio": True,
"images": ["<string>"],
"prompt": "<string>",
"duration": 123,
"off_peak": True,
"voice_id": "<string>",
"watermark": True,
"resolution": "<string>",
"movement_amplitude": "<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({
bgm: true,
seed: 123,
audio: true,
images: ['<string>'],
prompt: '<string>',
duration: 123,
off_peak: true,
voice_id: '<string>',
watermark: true,
resolution: '<string>',
movement_amplitude: '<string>'
})
};
fetch('https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video', 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-img2video",
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([
'bgm' => true,
'seed' => 123,
'audio' => true,
'images' => [
'<string>'
],
'prompt' => '<string>',
'duration' => 123,
'off_peak' => true,
'voice_id' => '<string>',
'watermark' => true,
'resolution' => '<string>',
'movement_amplitude' => '<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-img2video"
payload := strings.NewReader("{\n \"bgm\": true,\n \"seed\": 123,\n \"audio\": true,\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"off_peak\": true,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\"\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-img2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"bgm\": true,\n \"seed\": 123,\n \"audio\": true,\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"off_peak\": true,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/vidu-q2-pro-img2video")
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 \"bgm\": true,\n \"seed\": 123,\n \"audio\": true,\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"off_peak\": true,\n \"voice_id\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"provider_request_id": "<string>"
}参照画像に基づいて新しい動画を生成します。540p、720p、1080p の 3 種類の解像度に対応しています。
これは非同期API であり、非同期タスクの task_id のみを返します。この task_id を使用して タスク結果照会 API をリクエストし、生成結果を取得してください。
リクエストヘッダー
string
必須
列挙値:
application/jsonstring
必須
Bearer 認証形式: Bearer {{API Key}}。
リクエストボディ
boolean
デフォルト:false
背景音楽を追加するかどうか
integer
生成結果のランダム性を制御するためのランダムシード。同じシードでは類似した結果が生成されます。
boolean
デフォルト:false
音声を生成するかどうか
string[]
必須
入力画像 URL のリスト配列の長さ:1 - 無制限
string
必須
テキストプロンプト。生成したい動画内容を詳細に説明します
integer
デフォルト:5
必須
動画の長さ(秒)。1〜10 秒に対応しています使用可能な値:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10boolean
デフォルト:false
オフピークタスクモードを有効にするかどうか
string
音声 ID(任意)
boolean
デフォルト:false
ウォーターマークを追加するかどうか
string
デフォルト:"720p"
出力動画の解像度。デフォルト値は 720p です。使用可能な値:
540p, 720p, 1080pstring
デフォルト:"auto"
モーション振幅。動画内のオブジェクトの動きの強度を制御します使用可能な値:
auto, small, medium, highレスポンス情報
string
必須
task_id を使用して タスク結果照会 API をリクエストし、生成された出力を取得します。
string
プロバイダーリクエスト ID(任意)
⌘I