Create Generation Task
curl --request POST \
--url https://api.mulerouter.ai/vendors/alibaba/v1/wan2.2-t2v-plus/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"negative_prompt": "<string>",
"size": "1920*1080",
"duration": 5,
"prompt_extend": true,
"seed": 1073741823,
"safety_filter": true
}
'import requests
url = "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.2-t2v-plus/generation"
payload = {
"prompt": "<string>",
"negative_prompt": "<string>",
"size": "1920*1080",
"duration": 5,
"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>',
negative_prompt: '<string>',
size: '1920*1080',
duration: 5,
prompt_extend: true,
seed: 1073741823,
safety_filter: true
})
};
fetch('https://api.mulerouter.ai/vendors/alibaba/v1/wan2.2-t2v-plus/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.2-t2v-plus/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>',
'negative_prompt' => '<string>',
'size' => '1920*1080',
'duration' => 5,
'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.2-t2v-plus/generation"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"size\": \"1920*1080\",\n \"duration\": 5,\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.2-t2v-plus/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"size\": \"1920*1080\",\n \"duration\": 5,\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.2-t2v-plus/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 \"negative_prompt\": \"<string>\",\n \"size\": \"1920*1080\",\n \"duration\": 5,\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.2 Text-To-Video Plus
Wan 2.2 Text-To-Video Plus Generation
Generate videos from text prompts using the wan2.2-t2v-plus model.
POST
/
vendors
/
alibaba
/
v1
/
wan2.2-t2v-plus
/
generation
Create Generation Task
curl --request POST \
--url https://api.mulerouter.ai/vendors/alibaba/v1/wan2.2-t2v-plus/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"negative_prompt": "<string>",
"size": "1920*1080",
"duration": 5,
"prompt_extend": true,
"seed": 1073741823,
"safety_filter": true
}
'import requests
url = "https://api.mulerouter.ai/vendors/alibaba/v1/wan2.2-t2v-plus/generation"
payload = {
"prompt": "<string>",
"negative_prompt": "<string>",
"size": "1920*1080",
"duration": 5,
"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>',
negative_prompt: '<string>',
size: '1920*1080',
duration: 5,
prompt_extend: true,
seed: 1073741823,
safety_filter: true
})
};
fetch('https://api.mulerouter.ai/vendors/alibaba/v1/wan2.2-t2v-plus/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.2-t2v-plus/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>',
'negative_prompt' => '<string>',
'size' => '1920*1080',
'duration' => 5,
'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.2-t2v-plus/generation"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"size\": \"1920*1080\",\n \"duration\": 5,\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.2-t2v-plus/generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"size\": \"1920*1080\",\n \"duration\": 5,\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.2-t2v-plus/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 \"negative_prompt\": \"<string>\",\n \"size\": \"1920*1080\",\n \"duration\": 5,\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"
}
}This API supports Alibaba Tongyi Wanxiang (Wan2) video generation models. Please refer to Alibaba Cloud’s official documentation for more details.
Overview
Generate videos from text prompts using the wan2.2-t2v-plus model. This is the Plus version with enhanced stability.Key Features
- Text-to-video generation
- 480P or 1080P resolution options
- Fixed 5s duration
- 30fps output
Resolution Options
480P
- 832×480 (16:9)
- 480×832 (9:16)
- 624×624 (1:1)
1080P
- 1920×1080 (16:9)
- 1080×1920 (9:16)
- 1440×1440 (1:1)
- 1632×1248 (4:3)
- 1248×1632 (3:4)
Example Requests
Basic Text-to-Video
{
"prompt": "A small cat running in the moonlight, slow motion close-up",
"size": "1920*1080",
"duration": 5
}
With Negative Prompt
{
"prompt": "Sunset over the ocean, waves crashing on the shore",
"negative_prompt": "blurry, low quality",
"size": "1280*720",
"duration": 5
}
Parameters
duration
- Fixed: 5 seconds
- FPS: 30fps
prompt
- Max length: 800 characters (shorter than Wan2.5/2.6 models)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Text prompt for the video (max 800 characters).
Maximum string length:
800Negative prompt describing unwanted content (max 500 characters).
Maximum string length:
500Output resolution ("width*height"). Supported tiers:
- 480P: 832*480 (16:9), 480*832 (9:16), 624*624 (1:1)
- 1080P: 1920*1080 (16:9), 1080*1920 (9:16), 1440*1440 (1:1), 1632*1248 (4:3), 1248*1632 (3:4)
Available options:
832*480, 480*832, 624*624, 1920*1080, 1080*1920, 1440*1440, 1632*1248, 1248*1632 Video duration in seconds (30 fps). Fixed at 5 seconds.
Available options:
5 Enable intelligent prompt rewriting.
Random seed [0, 2147483647].
Required range:
0 <= x <= 2147483647Enable content safety filter. Defaults to true. Set to false to disable content safety inspection.
Response
202 - application/json
Accepted - Task created successfully
Show child attributes
Show child attributes

