Wan 2.5 Preview 文生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan-2.5-t2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": true,
"watermark": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.ppio.com/v3/async/wan-2.5-t2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": True,
"watermark": 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>', audio_url: '<string>'},
parameters: {
size: '<string>',
duration: 123,
prompt_extend: true,
watermark: true,
audio: true,
seed: 123
}
})
};
fetch('https://api.ppio.com/v3/async/wan-2.5-t2v-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.ppio.com/v3/async/wan-2.5-t2v-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>',
'audio_url' => '<string>'
],
'parameters' => [
'size' => '<string>',
'duration' => 123,
'prompt_extend' => true,
'watermark' => 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.ppio.com/v3/async/wan-2.5-t2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"watermark\": 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.ppio.com/v3/async/wan-2.5-t2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"watermark\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan-2.5-t2v-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 \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"watermark\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}视频
Wan 2.5 Preview 文生视频
POST
/
v3
/
async
/
wan-2.5-t2v-preview
Wan 2.5 Preview 文生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan-2.5-t2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": true,
"watermark": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.ppio.com/v3/async/wan-2.5-t2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"audio_url": "<string>"
},
"parameters": {
"size": "<string>",
"duration": 123,
"prompt_extend": True,
"watermark": 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>', audio_url: '<string>'},
parameters: {
size: '<string>',
duration: 123,
prompt_extend: true,
watermark: true,
audio: true,
seed: 123
}
})
};
fetch('https://api.ppio.com/v3/async/wan-2.5-t2v-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.ppio.com/v3/async/wan-2.5-t2v-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>',
'audio_url' => '<string>'
],
'parameters' => [
'size' => '<string>',
'duration' => 123,
'prompt_extend' => true,
'watermark' => 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.ppio.com/v3/async/wan-2.5-t2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"watermark\": 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.ppio.com/v3/async/wan-2.5-t2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"watermark\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan-2.5-t2v-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 \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"size\": \"<string>\",\n \"duration\": 123,\n \"prompt_extend\": true,\n \"watermark\": true,\n \"audio\": true,\n \"seed\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Wan 2.5 Preview 文生视频模型支持根据文本描述生成高质量视频内容,可生成5秒或10秒的视频。新增音频能力:支持自动配音,也可自定义音频文件。
本接口支持个人认证及企业认证用户调用。请参见 实名认证,完成个人用户认证或企业用户认证,以确保可以正常使用本功能。
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索视频生成结果。
请求头
枚举值:
application/jsonBearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
基础输入信息,如提示词等。
隐藏 字段说明
隐藏 字段说明
文本正向提示词。支持中英文,最长 2000 个字符,超出部分自动截断。示例值:一只小猫在月光下奔跑。
反向提示词,用于描述生成视频时需要避开的内容,可实现对画面的规避或限制。支持中英文,最长500字符,超出部分自动截断。示例值:低分辨率、错误、最差质量、低质量、残缺、多余的手指、比例不良等。
用于视频生成的自定义音频文件URL。使用方法详见音频设置说明。音频要求:
- 格式:wav、mp3。
- 时长:3~30秒。
- 文件大小:不超过15MB。
视频处理参数。
隐藏 字段说明
隐藏 字段说明
支持480P、720P、1080P分辨率。默认值:
1920*1080(即1080P)。
size参数用于指定视频输出的分辨率,格式为宽*高。不同分辨率档位支持的具体值如下:480P档位:可选分辨率832*480:16:9480*832:9:16624*624:1:1
1280*720:16:9720*1280:9:16960*960:1:11088*832:4:3832*1088:3:4
1920*1080:16:91080*1920:9:161440*1440:1:11632*1248:4:31248*1632:3:4
关于 size 参数的常见误区:需填写具体分辨率(如
1280*720),不能填写比例(如 1:1)或档位名称(如 480P、720P)。输出视频的时长,可选值:
5秒、10秒。默认值为5。是否开启prompt智能改写。开启后,将使用大模型自动改写输入prompt,对于较短提示词提升生成效果,但处理时长会增加。
true:默认,开启智能改写false:不改写
是否添加水印标识,水印位于图片右下角,文案为”AI 生成”。
false:默认值,不添加水印。true:添加水印。
是否添加音频。参数优先级:audio_url > audio,仅在 audio_url 为空时有效。
true:默认,自动为视频添加配音false:不添加音频,输出为静音视频
随机数种子,用于控制模型生成内容的随机性。取值范围:[0, 2147483647]。如果不填写,系统自动生成随机种子。若希望生成效果较为稳定一致,可指定相同的seed值。
返回结果
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
最后修改于 2026年1月14日
⌘I