万相 Wan 2.7参考生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan2.7-r2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"size": "<string>",
"audio": true,
"media": [
{
"url": "<string>",
"type": "<string>",
"reference_voice": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"shot_type": "<string>",
"watermark": true,
"negative_prompt": "<string>"
}
'import requests
url = "https://api.ppio.com/v3/async/wan2.7-r2v"
payload = {
"seed": 123,
"size": "<string>",
"audio": True,
"media": [
{
"url": "<string>",
"type": "<string>",
"reference_voice": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"shot_type": "<string>",
"watermark": True,
"negative_prompt": "<string>"
}
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({
seed: 123,
size: '<string>',
audio: true,
media: [{url: '<string>', type: '<string>', reference_voice: '<string>'}],
prompt: '<string>',
duration: 123,
shot_type: '<string>',
watermark: true,
negative_prompt: '<string>'
})
};
fetch('https://api.ppio.com/v3/async/wan2.7-r2v', 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/wan2.7-r2v",
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([
'seed' => 123,
'size' => '<string>',
'audio' => true,
'media' => [
[
'url' => '<string>',
'type' => '<string>',
'reference_voice' => '<string>'
]
],
'prompt' => '<string>',
'duration' => 123,
'shot_type' => '<string>',
'watermark' => true,
'negative_prompt' => '<string>'
]),
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/wan2.7-r2v"
payload := strings.NewReader("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"media\": [\n {\n \"url\": \"<string>\",\n \"type\": \"<string>\",\n \"reference_voice\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"negative_prompt\": \"<string>\"\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/wan2.7-r2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"media\": [\n {\n \"url\": \"<string>\",\n \"type\": \"<string>\",\n \"reference_voice\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"negative_prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan2.7-r2v")
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 \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"media\": [\n {\n \"url\": \"<string>\",\n \"type\": \"<string>\",\n \"reference_voice\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"negative_prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}视频
万相 Wan 2.7参考生视频
POST
/
v3
/
async
/
wan2.7-r2v
万相 Wan 2.7参考生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan2.7-r2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"size": "<string>",
"audio": true,
"media": [
{
"url": "<string>",
"type": "<string>",
"reference_voice": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"shot_type": "<string>",
"watermark": true,
"negative_prompt": "<string>"
}
'import requests
url = "https://api.ppio.com/v3/async/wan2.7-r2v"
payload = {
"seed": 123,
"size": "<string>",
"audio": True,
"media": [
{
"url": "<string>",
"type": "<string>",
"reference_voice": "<string>"
}
],
"prompt": "<string>",
"duration": 123,
"shot_type": "<string>",
"watermark": True,
"negative_prompt": "<string>"
}
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({
seed: 123,
size: '<string>',
audio: true,
media: [{url: '<string>', type: '<string>', reference_voice: '<string>'}],
prompt: '<string>',
duration: 123,
shot_type: '<string>',
watermark: true,
negative_prompt: '<string>'
})
};
fetch('https://api.ppio.com/v3/async/wan2.7-r2v', 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/wan2.7-r2v",
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([
'seed' => 123,
'size' => '<string>',
'audio' => true,
'media' => [
[
'url' => '<string>',
'type' => '<string>',
'reference_voice' => '<string>'
]
],
'prompt' => '<string>',
'duration' => 123,
'shot_type' => '<string>',
'watermark' => true,
'negative_prompt' => '<string>'
]),
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/wan2.7-r2v"
payload := strings.NewReader("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"media\": [\n {\n \"url\": \"<string>\",\n \"type\": \"<string>\",\n \"reference_voice\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"negative_prompt\": \"<string>\"\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/wan2.7-r2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"media\": [\n {\n \"url\": \"<string>\",\n \"type\": \"<string>\",\n \"reference_voice\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"negative_prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan2.7-r2v")
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 \"seed\": 123,\n \"size\": \"<string>\",\n \"audio\": true,\n \"media\": [\n {\n \"url\": \"<string>\",\n \"type\": \"<string>\",\n \"reference_voice\": \"<string>\"\n }\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"shot_type\": \"<string>\",\n \"watermark\": true,\n \"negative_prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}万相 Wan 2.7参考生视频模型,支持多模态输入(文本/图像/视频),可将人或物体作为主角,生成单角色表演或多角色互动视频。支持智能分镜,生成多镜头视频。支持720P和1080P分辨率,时长2~10秒,按秒计费。输出默认包含音频。
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索视频生成结果。
请求头
string
必填
枚举值:
application/jsonstring
必填
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
integer
随机数种子,用于提升生成结果的可复现性。取值范围[0, 2147483647]。取值范围:[0, 2147483647]
string
默认值:"1920*1080"
输出视频分辨率(宽高),影响费用。720P档位:1280720(16:9)、7201280(9:16)、960960(1:1)、1088832(4:3)、8321088(3:4)。1080P档位:19201080(16:9)、10801920(9:16)、14401440(1:1)、16321248(4:3)、1248*1632(3:4)。可选值:
1280*720, 720*1280, 960*960, 1088*832, 832*1088, 1920*1080, 1080*1920, 1440*1440, 1632*1248, 1248*1632boolean
默认值:true
是否生成有声视频,影响费用。默认true(有声视频)。
object[]
必填
参考媒体数组,用于提取角色形象、动作及音色。按数组顺序对应prompt中的character1、character2等。图像数量 0-5,视频数量 0-3,总数不超过 5。图像格式:JPEG、JPG、PNG、BMP、WEBP,分辨率[240,8000]像素,不超过10MB。视频格式:MP4、MOV,时长1-30秒,不超过100MB。音频格式:MP3、WAV、FLAC,时长3-30秒。数组长度:1 - 5
string
必填
文本提示词,用于描述生成视频中期望包含的元素和视觉特点。通过character1、character2等标识引用参考角色,每个参考(视频或图像)仅包含单一角色。支持中英文,最多1500个字符。长度限制:0 - 1500
integer
默认值:5
生成视频时长,单位为秒,按秒计费。取值范围[2, 10]的整数。取值范围:[2, 10]
string
默认值:"single"
镜头类型。single为单镜头(默认),multi为多镜头。参数优先级高于prompt。可选值:
single, multiboolean
默认值:false
是否添加水印标识,水印位于视频右下角。
string
反向提示词,用于描述不希望在视频画面中出现的内容。支持中英文,最多500个字符。长度限制:0 - 500
响应
string
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
最后修改于 2026年7月3日