Veo 3.1 Fast 画像から動画生成
curl --request POST \
--url https://api.highwayapi.ai/v3/veo-3.1-fast-generate-img2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"image": "<string>",
"last_image": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": true,
"generate_audio": true,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
'import requests
url = "https://api.highwayapi.ai/v3/veo-3.1-fast-generate-img2video"
payload = {
"prompt": "<string>",
"image": "<string>",
"last_image": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": True,
"generate_audio": True,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
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({
prompt: '<string>',
image: '<string>',
last_image: '<string>',
aspect_ratio: '<string>',
duration_seconds: 123,
enhance_prompt: true,
generate_audio: true,
negative_prompt: '<string>',
person_generation: '<string>',
resolution: '<string>',
sample_count: 123,
seed: {}
})
};
fetch('https://api.highwayapi.ai/v3/veo-3.1-fast-generate-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/veo-3.1-fast-generate-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([
'prompt' => '<string>',
'image' => '<string>',
'last_image' => '<string>',
'aspect_ratio' => '<string>',
'duration_seconds' => 123,
'enhance_prompt' => true,
'generate_audio' => true,
'negative_prompt' => '<string>',
'person_generation' => '<string>',
'resolution' => '<string>',
'sample_count' => 123,
'seed' => [
]
]),
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/veo-3.1-fast-generate-img2video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"last_image\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\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/veo-3.1-fast-generate-img2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"last_image\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/veo-3.1-fast-generate-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 \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"last_image\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}動画
Veo 3.1 Fast 画像から動画生成
POST
/
v3
/
veo-3.1-fast-generate-img2video
Veo 3.1 Fast 画像から動画生成
curl --request POST \
--url https://api.highwayapi.ai/v3/veo-3.1-fast-generate-img2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"image": "<string>",
"last_image": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": true,
"generate_audio": true,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
'import requests
url = "https://api.highwayapi.ai/v3/veo-3.1-fast-generate-img2video"
payload = {
"prompt": "<string>",
"image": "<string>",
"last_image": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": True,
"generate_audio": True,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
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({
prompt: '<string>',
image: '<string>',
last_image: '<string>',
aspect_ratio: '<string>',
duration_seconds: 123,
enhance_prompt: true,
generate_audio: true,
negative_prompt: '<string>',
person_generation: '<string>',
resolution: '<string>',
sample_count: 123,
seed: {}
})
};
fetch('https://api.highwayapi.ai/v3/veo-3.1-fast-generate-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/veo-3.1-fast-generate-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([
'prompt' => '<string>',
'image' => '<string>',
'last_image' => '<string>',
'aspect_ratio' => '<string>',
'duration_seconds' => 123,
'enhance_prompt' => true,
'generate_audio' => true,
'negative_prompt' => '<string>',
'person_generation' => '<string>',
'resolution' => '<string>',
'sample_count' => 123,
'seed' => [
]
]),
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/veo-3.1-fast-generate-img2video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"last_image\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\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/veo-3.1-fast-generate-img2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"last_image\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/veo-3.1-fast-generate-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 \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"last_image\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Veo 3.1 Preview バージョンの API は、このインターフェースに自動的に互換対応されています
リクエストヘッダー
string
必須
列挙値:
application/jsonstring
必須
Bearer 認証形式: Bearer {{API Key}}。
リクエストボディ
string
必須
生成したい動画を説明するテキスト文字列。
string
入力画像。URL または base64 エンコード形式をサポートします。
string
終了画像。動画の最後のフレーム画像を埋めるために使用します。URL または base64 エンコード形式をサポートします。
string
生成する動画のアスペクト比を指定します。列挙値:
16:9、9:16。デフォルト値は 16:9 です。integer
生成したい動画ファイルの長さ(秒)。列挙値:
4、6、8。デフォルト値は 8 です。boolean
Gemini を使用してプロンプトを強化するかどうかを指定します。
true のみサポートします。デフォルト値: trueboolean
必須
動画用の音声を生成するかどうかを指定します。
string
モデルに生成させたくない内容を説明するテキスト文字列。
string
人物または顔の生成を許可するかどうかを制御する安全設定。列挙値:
allow_adult(デフォルト): 成人のみ生成を許可dont_allow: 画像内に人物または顔を含めることを許可しないallow_all: すべての年齢層の人物の生成を許可(プロジェクトが allowlist に含まれている必要があります)
string
生成する動画の解像度。列挙値:
720p (デフォルト) または 1080pinteger
生成する動画サンプルの数。値の範囲: 1-4
uint32
ランダム生成プロセスを初期化するための数値。同じシード、プロンプト、およびその他のパラメータを使用すると同じ出力動画が生成され、生成プロセスに決定性を持たせることができます。値の範囲: 0-4,294,967,295
レスポンス情報パラメータ
string
必須
非同期タスクの task_id。この task_id を使用して タスク結果照会 API にリクエストし、生成結果を取得してください
⌘I