Veo 3.0 Preview 画像から動画
curl --request POST \
--url https://api.highwayapi.ai/v3/async/veo-3.0-generate-preview-img2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"image_url": "<string>",
"image_base64": "<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/async/veo-3.0-generate-preview-img2video"
payload = {
"prompt": "<string>",
"image_url": "<string>",
"image_base64": "<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_url: '<string>',
image_base64: '<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/async/veo-3.0-generate-preview-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/veo-3.0-generate-preview-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_url' => '<string>',
'image_base64' => '<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/async/veo-3.0-generate-preview-img2video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_base64\": \"<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/async/veo-3.0-generate-preview-img2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_base64\": \"<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/async/veo-3.0-generate-preview-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_url\": \"<string>\",\n \"image_base64\": \"<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.0 Preview 画像から動画
POST
/
v3
/
async
/
veo-3.0-generate-preview-img2video
Veo 3.0 Preview 画像から動画
curl --request POST \
--url https://api.highwayapi.ai/v3/async/veo-3.0-generate-preview-img2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"image_url": "<string>",
"image_base64": "<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/async/veo-3.0-generate-preview-img2video"
payload = {
"prompt": "<string>",
"image_url": "<string>",
"image_base64": "<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_url: '<string>',
image_base64: '<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/async/veo-3.0-generate-preview-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/veo-3.0-generate-preview-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_url' => '<string>',
'image_base64' => '<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/async/veo-3.0-generate-preview-img2video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_base64\": \"<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/async/veo-3.0-generate-preview-img2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"image_url\": \"<string>\",\n \"image_base64\": \"<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/async/veo-3.0-generate-preview-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_url\": \"<string>\",\n \"image_base64\": \"<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.0 Preview 動画生成モデルを使用し、入力画像とテキスト説明から高品質な動画コンテンツを生成します。このインターフェースは非同期処理方式を採用しており、最終的な生成結果は task_id を使用して照会する必要があります。
リクエストヘッダー
列挙値:
application/jsonBearer 認証形式: Bearer {{API キー}}。
リクエストボディ
生成したい動画を説明するテキスト文字列。
入力画像の URL。image_url と image_base64 のいずれか一方を指定する必要があります。
Base64 エンコードされた入力画像。
生成する動画のアスペクト比を指定します。列挙値:
16:9、9:16。デフォルト値は 16:9 です。生成したい動画ファイルの長さ(秒)。列挙値:
4、6、8。デフォルト値は 8 です。Gemini を使用してプロンプトを強化するかどうかを指定します。デフォルト値:
true動画に音声を生成するかどうかを指定します。
モデルに生成させたくない内容を説明するテキスト文字列。
人物または顔の生成を許可するかどうかを制御する安全設定。列挙値:
allow_adult(デフォルト): 成人のみ生成を許可dont_allow: 画像内に人物または顔を含めることを許可しないallow_all: すべての年齢層の人物の生成を許可(プロジェクトが allowlist に含まれている必要があります)
生成する動画の解像度。列挙値:
720p (デフォルト) または 1080p生成する動画サンプルの数。取値範囲: 1-4
ランダム生成プロセスを初期化するための数値。同じシード、プロンプト、およびその他のパラメータを使用すると同じ出力動画が生成され、生成プロセスに決定性を持たせることができます。取値範囲: 0-4,294,967,295
レスポンス情報パラメータ
非同期タスクの task_id。生成結果を取得するには、この task_id を使用して タスク結果照会 API をリクエストしてください
⌘I