Wan 2.5 Preview Image-to-Video
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan-2.5-i2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<string>",
"duration": 123,
"prompt_extend": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan-2.5-i2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<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>',
img_url: '<string>',
audio_url: '<string>'
},
parameters: {
resolution: '<string>',
duration: 123,
prompt_extend: true,
audio: true,
seed: 123
}
})
};
fetch('https://api.highwayapi.ai/v3/async/wan-2.5-i2v-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-i2v-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>',
'img_url' => '<string>',
'audio_url' => '<string>'
],
'parameters' => [
'resolution' => '<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-i2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-i2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-i2v-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 \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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 Image-to-Video
POST
/
v3
/
async
/
wan-2.5-i2v-preview
Wan 2.5 Preview Image-to-Video
curl --request POST \
--url https://api.highwayapi.ai/v3/async/wan-2.5-i2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<string>",
"duration": 123,
"prompt_extend": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.highwayapi.ai/v3/async/wan-2.5-i2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<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>',
img_url: '<string>',
audio_url: '<string>'
},
parameters: {
resolution: '<string>',
duration: 123,
prompt_extend: true,
audio: true,
seed: 123
}
})
};
fetch('https://api.highwayapi.ai/v3/async/wan-2.5-i2v-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-i2v-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>',
'img_url' => '<string>',
'audio_url' => '<string>'
],
'parameters' => [
'resolution' => '<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-i2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-i2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-i2v-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 \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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 image-to-video model supports generating 5-second or 10-second videos from a first-frame image and text. New audio capabilities: it supports automatic dubbing, and you can also customize the audio file.
This is an asynchronous API and only returns the task_id of the asynchronous task. 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
Positive text prompt. Chinese and English are supported, with a maximum length of 2000 characters. Content beyond the limit will be automatically truncated.Example value: A kitten running on the grass.
string
Negative prompt, used to describe content to avoid when generating the video. It can be used to avoid or limit certain visual elements.Chinese and English are supported, with a maximum length of 500 characters. Content beyond the limit will be automatically truncated.Example value: low resolution, errors, worst quality, low quality, incomplete, extra fingers, poor proportions, etc.
string
required
The URL of the starting-frame image used for video generation.The URL must be publicly accessible and support the HTTP or HTTPS protocol.Image restrictions:
- Image formats: JPEG, JPG, PNG (transparency not supported), BMP, WEBP;
- Size requirements: image width and height must be within the [360, 2000] pixel range;
- File size must not exceed 10 MB.
string
The URL of the audio file used for video generation. For detailed usage, refer to the audio settings description.Audio requirements:
- Formats: wav, mp3;
- Duration: 3-30 seconds;
- File size must not exceed 15 MB.
object
Video processing parameters, such as specifying the output video resolution, duration, etc.
Hide Field descriptions
Hide Field descriptions
string
Resolution tier of the generated video.
Options:
Options:
480P, 720P, 1080P. Default value: 1080P.integer
Specifies the duration of the generated video. Supported values:
5 or 10 (unit: seconds).Default value: 5.bool
Whether to enable intelligent prompt rewriting. When enabled, a large model will be used to intelligently rewrite the input prompt. This can significantly improve generation quality for shorter prompts, but it will also increase processing time.
true: Default, enable intelligent rewriting;false: Do not rewrite.
boolean
Whether to add audio.Parameter priority: audio_url > audio. This parameter is only effective when audio_url is empty.
true: Default, automatically add dubbing to the video;false: Do not add audio; the output will be a silent video.
integer
Random seed, used to control the randomness of the content generated by the model. Value range: [0, 2147483647].If not provided, a random number will be generated automatically. If you want more stable generation results, you can pass in the same seed value.Example value: 12345.
Response Information
string
required
The task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to retrieve the generation result
⌘I