Wan 2.5 Image to Video Preview
curl --request POST \
--url https://api.myrouter.ai/v3/async/wan-2.5-i2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"model": "<string>",
"paramenters": {
"seed": 123,
"duration": 123,
"watermark": true,
"resolution": "<string>",
"prompt_extend": true
}
}
'import requests
url = "https://api.myrouter.ai/v3/async/wan-2.5-i2v-preview"
payload = {
"input": {
"prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"model": "<string>",
"paramenters": {
"seed": 123,
"duration": 123,
"watermark": True,
"resolution": "<string>",
"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>',
img_url: '<string>',
audio_url: '<string>',
negative_prompt: '<string>'
},
model: '<string>',
paramenters: {
seed: 123,
duration: 123,
watermark: true,
resolution: '<string>',
prompt_extend: true
}
})
};
fetch('https://api.myrouter.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.myrouter.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>',
'img_url' => '<string>',
'audio_url' => '<string>',
'negative_prompt' => '<string>'
],
'model' => '<string>',
'paramenters' => [
'seed' => 123,
'duration' => 123,
'watermark' => true,
'resolution' => '<string>',
'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.myrouter.ai/v3/async/wan-2.5-i2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"model\": \"<string>\",\n \"paramenters\": {\n \"seed\": 123,\n \"duration\": 123,\n \"watermark\": true,\n \"resolution\": \"<string>\",\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.myrouter.ai/v3/async/wan-2.5-i2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"model\": \"<string>\",\n \"paramenters\": {\n \"seed\": 123,\n \"duration\": 123,\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myrouter.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 \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"model\": \"<string>\",\n \"paramenters\": {\n \"seed\": 123,\n \"duration\": 123,\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"provider_request_id": "<string>"
}Video
Wan 2.5 Image to Video Preview
POST
/
v3
/
async
/
wan-2.5-i2v-preview
Wan 2.5 Image to Video Preview
curl --request POST \
--url https://api.myrouter.ai/v3/async/wan-2.5-i2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"model": "<string>",
"paramenters": {
"seed": 123,
"duration": 123,
"watermark": true,
"resolution": "<string>",
"prompt_extend": true
}
}
'import requests
url = "https://api.myrouter.ai/v3/async/wan-2.5-i2v-preview"
payload = {
"input": {
"prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>",
"negative_prompt": "<string>"
},
"model": "<string>",
"paramenters": {
"seed": 123,
"duration": 123,
"watermark": True,
"resolution": "<string>",
"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>',
img_url: '<string>',
audio_url: '<string>',
negative_prompt: '<string>'
},
model: '<string>',
paramenters: {
seed: 123,
duration: 123,
watermark: true,
resolution: '<string>',
prompt_extend: true
}
})
};
fetch('https://api.myrouter.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.myrouter.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>',
'img_url' => '<string>',
'audio_url' => '<string>',
'negative_prompt' => '<string>'
],
'model' => '<string>',
'paramenters' => [
'seed' => 123,
'duration' => 123,
'watermark' => true,
'resolution' => '<string>',
'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.myrouter.ai/v3/async/wan-2.5-i2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"model\": \"<string>\",\n \"paramenters\": {\n \"seed\": 123,\n \"duration\": 123,\n \"watermark\": true,\n \"resolution\": \"<string>\",\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.myrouter.ai/v3/async/wan-2.5-i2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"model\": \"<string>\",\n \"paramenters\": {\n \"seed\": 123,\n \"duration\": 123,\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myrouter.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 \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"model\": \"<string>\",\n \"paramenters\": {\n \"seed\": 123,\n \"duration\": 123,\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"provider_request_id": "<string>"
}Wan 2.5 Preview Image-to-Video API converts static images into dynamic short videos. It preserves the identity features and style of the original image while adding realistic animation effects and perspective changes, making it ideal for portraits, product showcases, and creative storytelling. The model supports generating videos up to 10 seconds in 1080P resolution with synchronized audio generation.
This is an async API that only returns the task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.
Request Headers
string
required
Enum:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
object
required
Input parameters, including the source image and text prompt.
Hide properties
Hide properties
string
Text describing the desired video motion and content. Supports Chinese and English. wan2.5 supports up to 800 characters, newer models up to 1500 characters. Example: ‘The camera slowly zooms in on the subject, with a gentle breeze blowing through the hair.’
string
required
URL of the input image to convert to video. Supports HTTP/HTTPS URLs, Base64-encoded data, or OSS file paths. Supported formats: JPEG, JPG, PNG (no alpha channel), BMP, WEBP. Resolution must be between 360-2000 pixels (width and height). Maximum file size: 10MB.Length limit: 1 - unlimited
string
default:""
string
Describes content to avoid in the generated video. Up to 500 characters. Example: ‘low resolution, errors, poor quality, low quality, defects, blurry, distorted faces.’
string
Model name for video generation. Available models include: wan2.5-i2v-preview (supports audio), wan2.6-i2v-flash, wan2.6-i2v.
object
Optional parameters for controlling video generation quality and characteristics.
Hide properties
Hide properties
integer
Random seed for reproducible generation. Using the same seed with the same parameters will produce the same video. If not specified, a random seed is used.Range: [0, 2147483647]
integer
Duration of the generated video (seconds). For wan2.5-i2v-preview, only 5 or 10 seconds are supported. Longer videos require more generation time.Possible values:
5, 10boolean
Whether to add a watermark on the generated video. Default: false.
string
Output video resolution. Higher resolution produces better quality but takes longer to generate and costs more. 480P is suitable for previews, 720P for standard quality, 1080P for high-quality production.Possible values:
480P, 720P, 1080Pboolean
Whether to enable LLM automatic prompt enhancement. When enabled, the model will expand and optimize your prompt for better video quality. Default: true.
Response
string
Use the task_id to call the Get Async Task Result API to retrieve the generated output.
string
Unique request identifier from the service provider, used for debugging and tracing.
⌘I