Wan 2.5 Preview 图生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan-2.5-i2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<string>",
"duration": 123,
"prompt_extend": true,
"watermark": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.ppio.com/v3/async/wan-2.5-i2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<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>',
img_url: '<string>',
audio_url: '<string>'
},
parameters: {
resolution: '<string>',
duration: 123,
prompt_extend: true,
watermark: true,
audio: true,
seed: 123
}
})
};
fetch('https://api.ppio.com/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.ppio.com/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>',
'negative_prompt' => '<string>',
'img_url' => '<string>',
'audio_url' => '<string>'
],
'parameters' => [
'resolution' => '<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-i2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-i2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-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 \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-i2v-preview
Wan 2.5 Preview 图生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan-2.5-i2v-preview \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<string>",
"duration": 123,
"prompt_extend": true,
"watermark": true,
"audio": true,
"seed": 123
}
}
'import requests
url = "https://api.ppio.com/v3/async/wan-2.5-i2v-preview"
payload = {
"input": {
"prompt": "<string>",
"negative_prompt": "<string>",
"img_url": "<string>",
"audio_url": "<string>"
},
"parameters": {
"resolution": "<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>',
img_url: '<string>',
audio_url: '<string>'
},
parameters: {
resolution: '<string>',
duration: 123,
prompt_extend: true,
watermark: true,
audio: true,
seed: 123
}
})
};
fetch('https://api.ppio.com/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.ppio.com/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>',
'negative_prompt' => '<string>',
'img_url' => '<string>',
'audio_url' => '<string>'
],
'parameters' => [
'resolution' => '<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-i2v-preview"
payload := strings.NewReader("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-i2v-preview")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"input\": {\n \"prompt\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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-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 \"negative_prompt\": \"<string>\",\n \"img_url\": \"<string>\",\n \"audio_url\": \"<string>\"\n },\n \"parameters\": {\n \"resolution\": \"<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。要求URL可公开访问,并支持HTTP或HTTPS协议。图片限制:
- 图片格式:JPEG、JPG、PNG(不支持透明)、BMP、WEBP;
- 尺寸要求:图片宽高需在[360, 2000]像素范围内;
- 文件大小不得超过10MB。
用于视频生成的音频文件URL。详细用法请参考音频设置说明。音频要求:
- 格式:wav、mp3;
- 时长:3-30秒;
- 文件大小不超过15MB。
视频处理参数,例如指定输出视频分辨率、时长等。
隐藏 字段说明
隐藏 字段说明
生成视频的分辨率档位。
可选:
可选:
480P、720P、1080P。默认值:1080P。指定生成视频的时长,支持值:
5 或 10(单位:秒)。默认值:5。是否开启prompt智能改写。开启后,将使用大模型对输入prompt进行智能改写,对较短提示词可显著提升生成效果,但处理时长也会增加。
true:默认,开启智能改写;false:不改写。
是否添加水印标识,水印位于图片右下角,文案为”AI 生成”。
false:默认值,不添加水印。true:添加水印。
是否添加音频。参数优先级:audio_url > audio,仅当 audio_url 为空时有效。
true:默认,自动为视频添加配音;false:不添加音频,输出为静音视频。
随机种子,用于控制模型生成内容的随机性,取值范围:[0, 2147483647]。不填写时将自动生成随机数。若期望生成结果较为稳定,可传入相同seed值。示例值:12345。
返回结果
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
最后修改于 2026年1月14日
⌘I