Wan 2.6 Text-to-Video
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan2.6-t2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"seed": 123,
"size": "<string>",
"audio": true,
"duration": 123,
"shot_type": "<string>",
"watermark": true,
"prompt_extend": true
}
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan2.6-t2v"
payload = {
"input": {
"prompt": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"seed": 123,
"size": "<string>",
"audio": True,
"duration": 123,
"shot_type": "<string>",
"watermark": True,
"prompt_extend": True
}
}
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>', audio_url: '<string>', negative_prompt: '<string>'},
parameters: {
seed: 123,
size: '<string>',
audio: true,
duration: 123,
shot_type: '<string>',
watermark: true,
prompt_extend: true
}
})
};
fetch('https://api.highwayapi.ai/v3/async/wan2.6-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.6-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([
'input' => [
'prompt' => '<string>',
'audio_url' => '<string>',
'negative_prompt' => '<string>'
],
'parameters' => [
'seed' => 123,
'size' => '<string>',
'audio' => true,
'duration' => 123,
'shot_type' => '<string>',
'watermark' => true,
'prompt_extend' => true
]
]),
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.6-t2v"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true\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/wan2.6-t2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/wan2.6-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 \"input\": {\n \"prompt\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Video
Wan 2.6 Text-to-Video
POST
/
v3
/
async
/
wan2.6-t2v
Wan 2.6 Text-to-Video
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan2.6-t2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"seed": 123,
"size": "<string>",
"audio": true,
"duration": 123,
"shot_type": "<string>",
"watermark": true,
"prompt_extend": true
}
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan2.6-t2v"
payload = {
"input": {
"prompt": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"seed": 123,
"size": "<string>",
"audio": True,
"duration": 123,
"shot_type": "<string>",
"watermark": True,
"prompt_extend": True
}
}
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>', audio_url: '<string>', negative_prompt: '<string>'},
parameters: {
seed: 123,
size: '<string>',
audio: true,
duration: 123,
shot_type: '<string>',
watermark: true,
prompt_extend: true
}
})
};
fetch('https://api.highwayapi.ai/v3/async/wan2.6-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.6-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([
'input' => [
'prompt' => '<string>',
'audio_url' => '<string>',
'negative_prompt' => '<string>'
],
'parameters' => [
'seed' => 123,
'size' => '<string>',
'audio' => true,
'duration' => 123,
'shot_type' => '<string>',
'watermark' => true,
'prompt_extend' => true
]
]),
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.6-t2v"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true\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/wan2.6-t2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/wan2.6-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 \"input\": {\n \"prompt\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"prompt_extend\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}This is an asynchronous API and only returns an async task_id. You need to use the task_id to call the task result query API to obtain the video generation result.
This is an asynchronous API and only returns the task_id of the async task. You should use this task_id to request the Query Task Result API to retrieve the generated result.
Request Headers
string
required
Enum value:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
object
required
Hide properties
Hide properties
string
required
Text prompt used to describe the desired elements and visual characteristics in the generated video. Chinese and English are supported. Each Chinese character/letter counts as one character; any excess will be automatically truncated.Length limit: 0 - 2000
string
Audio file URL. The model will use this audio to generate the video. HTTP or HTTPS protocols are supported. Audio limits: format must be wav or mp3; duration 3–30s; file size no larger than 15MB. Handling for exceeding limits: if the audio length exceeds the duration value (5 seconds or 10 seconds), the first 5 seconds or 10 seconds will be automatically used and the rest discarded. If the audio length is shorter than the video duration, the portion beyond the audio length will be silent video. For example, if the audio is 3 seconds and the video duration is 5 seconds, the first 3 seconds of the output video will have audio and the last 2 seconds will be silent.
string
Negative prompt, used to describe content you do not want to see in the video frames and to constrain the video visuals. Chinese and English are supported, with a maximum length of 500 characters; any excess will be automatically truncated.Length limit: 0 - 500
object
Hide properties
Hide properties
integer
Random seed. The value range is [0, 2147483647]. If not specified, the system automatically generates a random seed. To improve reproducibility of generated results, it is recommended to fix the seed value. Please note that because model generation is probabilistic, using the same seed still does not guarantee completely identical results every time.Value range: [0, 2147483647]
string
default:"1920*1080"
Specifies the resolution of the generated video, in the format widthheight. Supports 720P tiers (1280720/7201280/960960/1088832/8321088) and 1080P tiers (19201080/10801920/14401440/16321248/1248*1632).Allowed values:
1280*720, 720*1280, 960*960, 1088*832, 832*1088, 1920*1080, 1080*1920, 1440*1440, 1632*1248, 1248*1632boolean
default:true
Whether to add audio. Parameter priority: audio_url > audio. This only takes effect when audio_url is empty. true: default value, automatically adds audio to the video; false: does not add audio, outputting a silent video.
integer
default:5
Duration of the generated video, in seconds. Available values are 5, 10, and 15, with a default value of 5. duration directly affects the cost: cost = unit price (based on resolution) × duration (seconds). Please confirm the model pricing before calling.Allowed values:
5, 10, 15string
default:"multi"
Video generation mode. single: single-shot generation; multi: multi-shot generation.Allowed values:
single, multiboolean
default:false
Whether to add a watermark label. The watermark is located in the bottom-right corner of the video, with the fixed text “AI Generated”. false: default value, no watermark is added; true: add a watermark.
boolean
default:true
Whether to enable intelligent prompt rewriting. When enabled, a large model is used to intelligently rewrite the input prompt. This significantly improves results for shorter prompts, but increases processing time. true: default value, enable intelligent rewriting; false: do not enable intelligent rewriting.
Response Information
string
required
Use the task_id to request the Query Task Result API to retrieve the generated output.
⌘I