Wan 2.2 文生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan-2.2-t2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"size": "<string>",
"prompt_extend": true,
"seed": 123,
"watermark": true
}
}
'import requests
url = "https://api.ppio.com/v3/async/wan-2.2-t2v"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"size": "<string>",
"prompt_extend": True,
"seed": 123,
"watermark": 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>', negative_prompt: '<string>'},
parameters: {size: '<string>', prompt_extend: true, seed: 123, watermark: true}
})
};
fetch('https://api.ppio.com/v3/async/wan-2.2-t2v', 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.ppio.com/v3/async/wan-2.2-t2v",
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>'
],
'parameters' => [
'size' => '<string>',
'prompt_extend' => true,
'seed' => 123,
'watermark' => 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.ppio.com/v3/async/wan-2.2-t2v"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"prompt_extend\": true,\n \"seed\": 123,\n \"watermark\": 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.ppio.com/v3/async/wan-2.2-t2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"prompt_extend\": true,\n \"seed\": 123,\n \"watermark\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan-2.2-t2v")
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 },\n \"parameters\": {\n \"size\": \"<string>\",\n \"prompt_extend\": true,\n \"seed\": 123,\n \"watermark\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}视频
Wan 2.2 文生视频
POST
/
v3
/
async
/
wan-2.2-t2v
Wan 2.2 文生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan-2.2-t2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"size": "<string>",
"prompt_extend": true,
"seed": 123,
"watermark": true
}
}
'import requests
url = "https://api.ppio.com/v3/async/wan-2.2-t2v"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>"
},
"parameters": {
"size": "<string>",
"prompt_extend": True,
"seed": 123,
"watermark": 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>', negative_prompt: '<string>'},
parameters: {size: '<string>', prompt_extend: true, seed: 123, watermark: true}
})
};
fetch('https://api.ppio.com/v3/async/wan-2.2-t2v', 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.ppio.com/v3/async/wan-2.2-t2v",
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>'
],
'parameters' => [
'size' => '<string>',
'prompt_extend' => true,
'seed' => 123,
'watermark' => 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.ppio.com/v3/async/wan-2.2-t2v"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"prompt_extend\": true,\n \"seed\": 123,\n \"watermark\": 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.ppio.com/v3/async/wan-2.2-t2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"prompt_extend\": true,\n \"seed\": 123,\n \"watermark\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan-2.2-t2v")
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 },\n \"parameters\": {\n \"size\": \"<string>\",\n \"prompt_extend\": true,\n \"seed\": 123,\n \"watermark\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Wan 2.2(万相 2.2)专业版文生视频模型,能够根据文本描述生成高质量的视频内容。相比前代模型,在画面细节表现、运动稳定性等方面均有显著提升,可生成固定时长为 5 秒的视频。
本模型服务仅针对已完成 PPIO派欧云 平台企业认证的用户开放。具体请参见实名认证。
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索视频生成结果。
请求头
枚举值:
application/jsonBearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
视频处理参数。
隐藏 properties
隐藏 properties
支持480P和1080P对应的所有分辨率。
用于指定视频分辨率,格式为宽*高。不同模型支持的分辨率如下:480P档位:可选的视频分辨率及其对应的视频宽高比为:
832*480:16:9。480*832:9:16。624*624:1:1。
1920*1080: 16:9。1080*1920: 9:16。1440*1440: 1:1。1632*1248: 4:3。1248*1632: 3:4。
size 参数常见误区:size 须设置为目标分辨率的具体数值(如
1280*720),而不是宽高比(如 1:1)或分辨率档位名称(如 480P 或 720P)。是否开启prompt智能改写。开启后使用大模型对输入prompt进行智能改写。对于较短的prompt生成效果提升明显,但会增加耗时。
true:默认值,开启智能改写。false:不开启智能改写。
随机数种子,用于控制模型生成内容的随机性。取值范围为
[0, 2147483647]。如果不提供,则算法自动生成一个随机数作为种子。如果希望生成内容保持相对稳定,可以使用相同的seed参数值。是否添加水印标识,水印位于图片右下角,文案为”AI生成”。
false:默认值,不添加水印。true:添加水印。
响应
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
最后修改于 2026年1月12日
⌘I