万相 Wan 2.7 文生视频
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan2.7-t2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"size": "<string>",
"prompt": "<string>",
"duration": 123,
"audio_url": "<string>",
"watermark": true,
"prompt_extend": true,
"negative_prompt": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan2.7-t2v"
payload = {
"seed": 123,
"size": "<string>",
"prompt": "<string>",
"duration": 123,
"audio_url": "<string>",
"watermark": True,
"prompt_extend": True,
"negative_prompt": "<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({
seed: 123,
size: '<string>',
prompt: '<string>',
duration: 123,
audio_url: '<string>',
watermark: true,
prompt_extend: true,
negative_prompt: '<string>'
})
};
fetch('https://api.highwayapi.ai/v3/async/wan2.7-t2v', 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/wan2.7-t2v",
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([
'seed' => 123,
'size' => '<string>',
'prompt' => '<string>',
'duration' => 123,
'audio_url' => '<string>',
'watermark' => true,
'prompt_extend' => true,
'negative_prompt' => '<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/wan2.7-t2v"
payload := strings.NewReader("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"audio_url\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true,\n \"negative_prompt\": \"<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/wan2.7-t2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"audio_url\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true,\n \"negative_prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/wan2.7-t2v")
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 \"seed\": 123,\n \"size\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"audio_url\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true,\n \"negative_prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}万相 Wan 2.7 文生视频
POST
/
v3
/
async
/
wan2.7-t2v
万相 Wan 2.7 文生视频
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan2.7-t2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"size": "<string>",
"prompt": "<string>",
"duration": 123,
"audio_url": "<string>",
"watermark": true,
"prompt_extend": true,
"negative_prompt": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan2.7-t2v"
payload = {
"seed": 123,
"size": "<string>",
"prompt": "<string>",
"duration": 123,
"audio_url": "<string>",
"watermark": True,
"prompt_extend": True,
"negative_prompt": "<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({
seed: 123,
size: '<string>',
prompt: '<string>',
duration: 123,
audio_url: '<string>',
watermark: true,
prompt_extend: true,
negative_prompt: '<string>'
})
};
fetch('https://api.highwayapi.ai/v3/async/wan2.7-t2v', 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/wan2.7-t2v",
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([
'seed' => 123,
'size' => '<string>',
'prompt' => '<string>',
'duration' => 123,
'audio_url' => '<string>',
'watermark' => true,
'prompt_extend' => true,
'negative_prompt' => '<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/wan2.7-t2v"
payload := strings.NewReader("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"audio_url\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true,\n \"negative_prompt\": \"<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/wan2.7-t2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"audio_url\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true,\n \"negative_prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/wan2.7-t2v")
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 \"seed\": 123,\n \"size\": \"<string>\",\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"audio_url\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true,\n \"negative_prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}万相 Wan 2.7 文生视频模型,基于文本提示词生成流畅视频。支持音频驱动或自动配音,支持720P和1080P分辨率,时长2~15秒,按秒计费。输出默认包含音频。
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索生成结果。
请求头
请求体
输出视频分辨率(宽高),影响费用。720P档位:1280720(16:9)、7201280(9:16)、960960(1:1)、1088832(4:3)、8321088(3:4)。1080P档位:19201080(16:9)、10801920(9:16)、14401440(1:1)、16321248(4:3)、1248*1632(3:4)。可选值:
1280*720, 720*1280, 960*960, 1088*832, 832*1088, 1920*1080, 1080*1920, 1440*1440, 1632*1248, 1248*1632音频文件URL,模型将使用该音频驱动视频生成(如口型同步、动作卡点等)。未传入时模型自动生成匹配的背景音乐或音效。格式支持wav、mp3,时长3~30秒,文件不超过15MB。若音频超过视频时长则截取,不足则超出部分无声。
响应信息
使用 task_id 请求 查询任务结果 API 来检索生成的输出。
最后修改于 2026年5月20日