万相 Wan 2.7 图生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan2.7-i2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"prompt": "<string>",
"duration": 123,
"image_url": "<string>",
"watermark": true,
"resolution": "<string>",
"prompt_extend": true,
"first_clip_url": "<string>",
"last_frame_url": "<string>",
"negative_prompt": "<string>",
"driving_audio_url": "<string>"
}
'import requests
url = "https://api.ppio.com/v3/async/wan2.7-i2v"
payload = {
"seed": 123,
"prompt": "<string>",
"duration": 123,
"image_url": "<string>",
"watermark": True,
"resolution": "<string>",
"prompt_extend": True,
"first_clip_url": "<string>",
"last_frame_url": "<string>",
"negative_prompt": "<string>",
"driving_audio_url": "<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,
prompt: '<string>',
duration: 123,
image_url: '<string>',
watermark: true,
resolution: '<string>',
prompt_extend: true,
first_clip_url: '<string>',
last_frame_url: '<string>',
negative_prompt: '<string>',
driving_audio_url: '<string>'
})
};
fetch('https://api.ppio.com/v3/async/wan2.7-i2v', 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-i2v",
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,
'prompt' => '<string>',
'duration' => 123,
'image_url' => '<string>',
'watermark' => true,
'resolution' => '<string>',
'prompt_extend' => true,
'first_clip_url' => '<string>',
'last_frame_url' => '<string>',
'negative_prompt' => '<string>',
'driving_audio_url' => '<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-i2v"
payload := strings.NewReader("{\n \"seed\": 123,\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"image_url\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true,\n \"first_clip_url\": \"<string>\",\n \"last_frame_url\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"driving_audio_url\": \"<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-i2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"image_url\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true,\n \"first_clip_url\": \"<string>\",\n \"last_frame_url\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"driving_audio_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan2.7-i2v")
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 \"prompt\": \"<string>\",\n \"duration\": 123,\n \"image_url\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true,\n \"first_clip_url\": \"<string>\",\n \"last_frame_url\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"driving_audio_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}视频
万相 Wan 2.7 图生视频
POST
/
v3
/
async
/
wan2.7-i2v
万相 Wan 2.7 图生视频
curl --request POST \
--url https://api.ppio.com/v3/async/wan2.7-i2v \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"seed": 123,
"prompt": "<string>",
"duration": 123,
"image_url": "<string>",
"watermark": true,
"resolution": "<string>",
"prompt_extend": true,
"first_clip_url": "<string>",
"last_frame_url": "<string>",
"negative_prompt": "<string>",
"driving_audio_url": "<string>"
}
'import requests
url = "https://api.ppio.com/v3/async/wan2.7-i2v"
payload = {
"seed": 123,
"prompt": "<string>",
"duration": 123,
"image_url": "<string>",
"watermark": True,
"resolution": "<string>",
"prompt_extend": True,
"first_clip_url": "<string>",
"last_frame_url": "<string>",
"negative_prompt": "<string>",
"driving_audio_url": "<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,
prompt: '<string>',
duration: 123,
image_url: '<string>',
watermark: true,
resolution: '<string>',
prompt_extend: true,
first_clip_url: '<string>',
last_frame_url: '<string>',
negative_prompt: '<string>',
driving_audio_url: '<string>'
})
};
fetch('https://api.ppio.com/v3/async/wan2.7-i2v', 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-i2v",
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,
'prompt' => '<string>',
'duration' => 123,
'image_url' => '<string>',
'watermark' => true,
'resolution' => '<string>',
'prompt_extend' => true,
'first_clip_url' => '<string>',
'last_frame_url' => '<string>',
'negative_prompt' => '<string>',
'driving_audio_url' => '<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-i2v"
payload := strings.NewReader("{\n \"seed\": 123,\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"image_url\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true,\n \"first_clip_url\": \"<string>\",\n \"last_frame_url\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"driving_audio_url\": \"<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-i2v")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"seed\": 123,\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"image_url\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true,\n \"first_clip_url\": \"<string>\",\n \"last_frame_url\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"driving_audio_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/wan2.7-i2v")
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 \"prompt\": \"<string>\",\n \"duration\": 123,\n \"image_url\": \"<string>\",\n \"watermark\": true,\n \"resolution\": \"<string>\",\n \"prompt_extend\": true,\n \"first_clip_url\": \"<string>\",\n \"last_frame_url\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"driving_audio_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}万相 Wan 2.7 图生视频模型,支持多模态输入(文本/图像/音频/视频),可完成首帧生视频、首尾帧生视频、视频续写三大任务。支持720P和1080P分辨率,时长2~15秒,按秒计费。输出默认包含音频。
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索视频生成结果。
请求头
string
必填
枚举值:
application/jsonstring
必填
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
integer
随机数种子,用于提升生成结果的可复现性。取值范围[0, 2147483647]。取值范围:[0, 2147483647]
string
文本提示词,用于描述生成视频中期望包含的元素和视觉特点。支持中英文,最多5000个字符。长度限制:0 - 5000
integer
默认值:5
生成视频时长,单位为秒,按秒计费。取值范围[2, 15]的整数。取值范围:[2, 15]
string
必填
首帧图像URL。格式支持JPEG、JPG、PNG(不支持透明通道)、BMP、WEBP。分辨率宽高范围[240, 8000]像素,宽高比1:8~8:1,文件大小不超过20MB。与first_clip_url二选一,至少提供一个。
boolean
默认值:false
是否添加水印标识,水印位于视频右下角。
string
默认值:"1080P"
输出视频分辨率档位,影响费用。视频宽高比与输入素材保持一致。可选值:
720P, 1080Pboolean
默认值:true
是否开启prompt智能改写。开启后使用大模型对输入prompt进行智能改写,对较短的prompt生成效果提升明显,但会增加耗时。
string
首段视频片段URL,用于视频续写。模型将基于该视频内容进行续写生成。格式支持mp4、mov,时长210秒,分辨率宽高范围[240, 4096]像素,宽高比1:88:1,文件大小不超过100MB。与image_url二选一。
string
尾帧图像URL。与首帧配合可生成首尾帧视频。格式限制与首帧相同。
string
反向提示词,用于描述不希望在视频画面中看到的内容。支持中英文,最多500个字符。长度限制:0 - 500
string
驱动音频URL。传入后模型将以该音频为驱动源生成视频(如口型同步、动作卡点等)。未传入时模型将自动生成匹配的背景音乐或音效。格式支持wav、mp3,时长2~30秒,文件大小不超过15MB。
响应
string
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
最后修改于 2026年4月24日