Wan 2.5 Preview テキストから動画生成
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": True,
"audio": True,
"seed": 123
}
}
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({
input: {prompt: '<string>', negative_prompt: '<string>', audio_url: '<string>'},
parameters: {size: '<string>', duration: 123, prompt_extend: true, audio: true, seed: 123}
})
};
fetch('https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview', 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/wan-2.5-t2v-preview",
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([
'input' => [
'prompt' => '<string>',
'negative_prompt' => '<string>',
'audio_url' => '<string>'
],
'parameters' => [
'size' => '<string>',
'duration' => 123,
'prompt_extend' => true,
'audio' => true,
'seed' => 123
]
]),
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/wan-2.5-t2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"audio\": true,\n \"seed\": 123\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/wan-2.5-t2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview")
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 \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}動画
Wan 2.5 Preview テキストから動画生成
POST
/
v3
/
async
/
wan-2.5-t2v-preview
Wan 2.5 Preview テキストから動画生成
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": True,
"audio": True,
"seed": 123
}
}
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({
input: {prompt: '<string>', negative_prompt: '<string>', audio_url: '<string>'},
parameters: {size: '<string>', duration: 123, prompt_extend: true, audio: true, seed: 123}
})
};
fetch('https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview', 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/wan-2.5-t2v-preview",
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([
'input' => [
'prompt' => '<string>',
'negative_prompt' => '<string>',
'audio_url' => '<string>'
],
'parameters' => [
'size' => '<string>',
'duration' => 123,
'prompt_extend' => true,
'audio' => true,
'seed' => 123
]
]),
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/wan-2.5-t2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"audio\": true,\n \"seed\": 123\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/wan-2.5-t2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/wan-2.5-t2v-preview")
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 \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Wan 2.5 Preview テキストから動画生成モデルは、テキスト説明に基づいて高品質な動画コンテンツを生成でき、5秒または10秒の動画を生成できます。音声機能が追加されました:自動音声付与に対応し、カスタム音声ファイルも使用できます。
これは非同期APIであり、非同期タスクの task_id のみを返します。この task_id を使用して タスク結果照会 API にリクエストし、動画生成結果を取得してください。
リクエストヘッダー
string
必須
列挙値:
application/jsonstring
必須
Bearer 認証形式: Bearer {{API Key}}。
リクエストボディ
object
必須
プロンプトなどの基本入力情報。
非表示 フィールド説明
非表示 フィールド説明
string
必須
テキストのポジティブプロンプト。中国語と英語に対応し、最大 2000 文字です。超過部分は自動的に切り捨てられます。例:月明かりの下を走る子猫。
string
ネガティブプロンプト。生成動画で避けたい内容を記述するために使用し、画面内容の回避や制限を実現できます。中国語と英語に対応し、最大500文字です。超過部分は自動的に切り捨てられます。例:低解像度、エラー、最低品質、低品質、欠損、余分な指、比率の不自然さなど。
string
動画生成に使用するカスタム音声ファイルのURL。使用方法の詳細は音声設定の説明を参照してください。音声要件:
- 形式:wav、mp3。
- 長さ:3〜30秒。
- ファイルサイズ:15MB以下。
object
動画処理パラメータ。
非表示 フィールド説明
非表示 フィールド説明
string
480P、720P、1080P解像度をサポートします。デフォルト値:
1920*1080(つまり1080P)。
sizeパラメータは動画出力の解像度を指定するために使用し、形式は幅*高さです。各解像度グレードでサポートされる具体的な値は次のとおりです:480Pグレード:選択可能な解像度832*480:16:9480*832:9:16624*624:1:1
1280*720:16:9720*1280:9:16960*960:1:11088*832:4:3832*1088:3:4
1920*1080:16:91080*1920:9:161440*1440:1:11632*1248:4:31248*1632:3:4
size パラメータに関するよくある誤解:具体的な解像度(例:
1280*720)を入力する必要があり、比率(例:1:1)やグレード名(例:480P、720P)は入力できません。integer
出力動画の長さ。選択可能な値:
5秒、10秒。デフォルト値は5です。bool
prompt のスマートリライトを有効にするかどうか。有効にすると、大規模モデルを使用して入力 prompt を自動的に書き換えます。短いプロンプトでは生成効果が向上しますが、処理時間は長くなります。
true:デフォルト、スマートリライトを有効化false:リライトしない
boolean
音声を追加するかどうか。パラメータの優先順位:audio_url > audio。audio_url が空の場合のみ有効です。
true:デフォルト、動画に自動で音声を追加false:音声を追加せず、出力は無音動画
integer
乱数シード。モデル生成内容のランダム性を制御するために使用します。値の範囲:[0, 2147483647]。入力しない場合、システムがランダムシードを自動生成します。生成結果を比較的安定して一貫させたい場合は、同じseed値を指定できます。
レスポンス情報
string
必須
非同期タスクの task_id。この task_id を使用して タスク結果照会 API にリクエストし、生成結果を取得してください
⌘I