curl --request POST \
--url https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"image": "<string>",
"negative_prompt": "<string>",
"audio": true,
"audio_url": "<string>",
"resolution": "720P",
"prompt_extend": true,
"seed": 1073741823,
"safety_filter": true
}
'import requests
url = "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation"
payload = {
"prompt": "<string>",
"image": "<string>",
"negative_prompt": "<string>",
"audio": True,
"audio_url": "<string>",
"resolution": "720P",
"prompt_extend": True,
"seed": 1073741823,
"safety_filter": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
image: '<string>',
negative_prompt: '<string>',
audio: true,
audio_url: '<string>',
resolution: '720P',
prompt_extend: true,
seed: 1073741823,
safety_filter: true
})
};
fetch('https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation', 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.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation",
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([
'prompt' => '<string>',
'image' => '<string>',
'negative_prompt' => '<string>',
'audio' => true,
'audio_url' => '<string>',
'resolution' => '720P',
'prompt_extend' => true,
'seed' => 1073741823,
'safety_filter' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio\": true,\n \"audio_url\": \"<string>\",\n \"resolution\": \"720P\",\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio\": true,\n \"audio_url\": \"<string>\",\n \"resolution\": \"720P\",\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio\": true,\n \"audio_url\": \"<string>\",\n \"resolution\": \"720P\",\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Wan 2.5 Image-To-Video Preview Generation
Generate videos from images using the wan2.5-i2v-preview model.
curl --request POST \
--url https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"image": "<string>",
"negative_prompt": "<string>",
"audio": true,
"audio_url": "<string>",
"resolution": "720P",
"prompt_extend": true,
"seed": 1073741823,
"safety_filter": true
}
'import requests
url = "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation"
payload = {
"prompt": "<string>",
"image": "<string>",
"negative_prompt": "<string>",
"audio": True,
"audio_url": "<string>",
"resolution": "720P",
"prompt_extend": True,
"seed": 1073741823,
"safety_filter": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
image: '<string>',
negative_prompt: '<string>',
audio: true,
audio_url: '<string>',
resolution: '720P',
prompt_extend: true,
seed: 1073741823,
safety_filter: true
})
};
fetch('https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation', 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.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation",
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([
'prompt' => '<string>',
'image' => '<string>',
'negative_prompt' => '<string>',
'audio' => true,
'audio_url' => '<string>',
'resolution' => '720P',
'prompt_extend' => true,
'seed' => 1073741823,
'safety_filter' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio\": true,\n \"audio_url\": \"<string>\",\n \"resolution\": \"720P\",\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio\": true,\n \"audio_url\": \"<string>\",\n \"resolution\": \"720P\",\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mulerouter.ai/vendors/alibaba/v1/wan2.5-i2v-preview/generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"image\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio\": true,\n \"audio_url\": \"<string>\",\n \"resolution\": \"720P\",\n \"prompt_extend\": true,\n \"seed\": 1073741823,\n \"safety_filter\": true\n}"
response = http.request(request)
puts response.read_body{
"task_info": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Overview
Generate videos from images using the wan2.5-i2v-preview model with optional audio generation.Key Features
- Image-to-video generation with auto sound or custom audio
- Multiple resolution options (480P/720P/1080P)
- 5s or 10s duration
- 24fps output
Image Requirements
| Property | Requirement |
|---|---|
| Formats | JPEG, JPG, PNG (no transparency), BMP, WEBP |
| Dimensions | [360, 2000] pixels for both width and height |
| File Size | Max 10MB |
| Input | Public URL or Base64 encoded data |
Audio Features
Auto-generated Audio
- Enabled by default
- Automatically generates synchronized audio based on video content
Custom Audio
- Supported formats: WAV, MP3
- Duration: 3-30 seconds
- Max file size: 15MB
Example Requests
Basic Image-to-Video
{
"prompt": "The cat starts running forward",
"image": "https://example.com/cat.jpg",
"resolution": "720P",
"duration": 5
}
With Custom Audio
{
"prompt": "Scene becomes dynamic, clouds drifting",
"image": "https://example.com/landscape.jpg",
"audio_url": "https://example.com/ambient.mp3",
"resolution": "1080P",
"duration": 10
}
With Negative Prompt
{
"prompt": "Character turns head and smiles",
"image": "https://example.com/portrait.jpg",
"negative_prompt": "shaking, distortion",
"resolution": "720P",
"duration": 5
}
Prompt Tips
For best results:- Describe the motion/story you want to see
- Specify camera movements if needed
- Include transition descriptions
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Motion/story description for the video (max 2000 characters).
2000First-frame image (URL or Base64). Supported formats: JPEG/JPG/PNG/BMP/WEBP, 360-2000px, ≤10MB.
Negative prompt describing unwanted content (max 500 characters).
500Enable automatic audio generation. Set to false to force a silent output.
Custom audio file URL (wav/mp3, 3-30s, ≤15MB). Overrides the audio flag.
Output resolution tier:
- 480P
- 720P
- 1080P
480P, 720P, 1080P Video duration in seconds (24 fps). Supported values 5 or 10.
5, 10 Enable intelligent prompt rewriting (slightly longer latency, better detail).
Random seed [0, 2147483647].
0 <= x <= 2147483647Enable content safety filter. Defaults to true. Set to false to disable content safety inspection.
Response
Accepted - Task created successfully
Show child attributes
Show child attributes

