Wan 2.5 Preview Text-to-Video
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>"
}Video
Wan 2.5 Preview Text-to-Video
POST
/
v3
/
async
/
wan-2.5-t2v-preview
Wan 2.5 Preview Text-to-Video
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>"
}The Wan 2.5 Preview text-to-video model supports generating high-quality video content from text descriptions, and can generate videos of 5 or 10 seconds. New audio capabilities: supports automatic voiceover, and also allows custom audio files.
This is an asynchronous API and will only return the asynchronous task’s task_id. You should use this task_id to request the Get Task Result API to retrieve the video generation result.
Request Headers
string
required
Enum value:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
object
required
Basic input information, such as prompts.
Hide Field Descriptions
Hide Field Descriptions
string
required
Text positive prompt. Chinese and English are supported, up to 2000 characters. Any excess will be automatically truncated.Example value: A kitten running under the moonlight.
string
Negative prompt, used to describe content to avoid when generating the video, enabling avoidance or restriction of the image.Chinese and English are supported, up to 500 characters. Any excess will be automatically truncated.Example value: low resolution, errors, worst quality, low quality, incomplete, extra fingers, poor proportions, etc.
string
The URL of a custom audio file used for video generation. For usage details, see the audio settings instructions.Audio requirements:
- Format: wav, mp3.
- Duration: 3–30 seconds.
- File size: no more than 15 MB.
object
Video processing parameters.
Hide Field Descriptions
Hide Field Descriptions
string
Supports 480P, 720P, and 1080P resolutions. Default value:
1920*1080 (i.e., 1080P).
The size parameter is used to specify the resolution of the video output, in the format width*height. The specific supported values for each resolution tier are as follows:480P tier: Available resolutions832*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
Common misconception about the size parameter: You must provide a specific resolution (such as
1280*720), not an aspect ratio (such as 1:1) or a tier name (such as 480P or 720P).integer
Duration of the output video. Available values:
5 seconds, 10 seconds.Default value: 5.bool
Whether to enable intelligent prompt rewriting. When enabled, a large model will be used to automatically rewrite the input prompt. This improves generation results for shorter prompts, but increases processing time.
true: Default, enables intelligent rewritingfalse: No rewriting
boolean
Whether to add audio.Parameter priority: audio_url > audio. Effective only when audio_url is empty.
true: Default, automatically adds voiceover to the videofalse: Does not add audio; the output is a silent video
integer
Random seed, used to control the randomness of model-generated content. Value range: [0, 2147483647].If not provided, the system automatically generates a random seed. If you want the generated results to be relatively stable and consistent, you can specify the same seed value.
Response
string
required
The task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to obtain the generation result.
⌘I