Vidu Q1 参考生视频
curl --request POST \
--url https://api.ppio.com/v3/async/vidu-q1-reference2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"images": [
"<string>"
],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"movement_amplitude": "<string>",
"bgm": true,
"watermark": true
}
'import requests
url = "https://api.ppio.com/v3/async/vidu-q1-reference2video"
payload = {
"images": ["<string>"],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"movement_amplitude": "<string>",
"bgm": True,
"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({
images: ['<string>'],
prompt: '<string>',
duration: 123,
seed: 123,
aspect_ratio: '<string>',
resolution: '<string>',
movement_amplitude: '<string>',
bgm: true,
watermark: true
})
};
fetch('https://api.ppio.com/v3/async/vidu-q1-reference2video', 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/vidu-q1-reference2video",
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([
'images' => [
'<string>'
],
'prompt' => '<string>',
'duration' => 123,
'seed' => 123,
'aspect_ratio' => '<string>',
'resolution' => '<string>',
'movement_amplitude' => '<string>',
'bgm' => true,
'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/vidu-q1-reference2video"
payload := strings.NewReader("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\",\n \"bgm\": true,\n \"watermark\": true\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/vidu-q1-reference2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\",\n \"bgm\": true,\n \"watermark\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/vidu-q1-reference2video")
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 \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\",\n \"bgm\": true,\n \"watermark\": true\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}视频
Vidu Q1 参考生视频
POST
/
v3
/
async
/
vidu-q1-reference2video
Vidu Q1 参考生视频
curl --request POST \
--url https://api.ppio.com/v3/async/vidu-q1-reference2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"images": [
"<string>"
],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"movement_amplitude": "<string>",
"bgm": true,
"watermark": true
}
'import requests
url = "https://api.ppio.com/v3/async/vidu-q1-reference2video"
payload = {
"images": ["<string>"],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"movement_amplitude": "<string>",
"bgm": True,
"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({
images: ['<string>'],
prompt: '<string>',
duration: 123,
seed: 123,
aspect_ratio: '<string>',
resolution: '<string>',
movement_amplitude: '<string>',
bgm: true,
watermark: true
})
};
fetch('https://api.ppio.com/v3/async/vidu-q1-reference2video', 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/vidu-q1-reference2video",
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([
'images' => [
'<string>'
],
'prompt' => '<string>',
'duration' => 123,
'seed' => 123,
'aspect_ratio' => '<string>',
'resolution' => '<string>',
'movement_amplitude' => '<string>',
'bgm' => true,
'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/vidu-q1-reference2video"
payload := strings.NewReader("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\",\n \"bgm\": true,\n \"watermark\": true\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/vidu-q1-reference2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\",\n \"bgm\": true,\n \"watermark\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ppio.com/v3/async/vidu-q1-reference2video")
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 \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"movement_amplitude\": \"<string>\",\n \"bgm\": true,\n \"watermark\": true\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Vidu Q1 参考生视频使用参考图像和文本描述生成视频。支持各种主体,如角色和物体。通过上传主体的多个视角,您可以创建保持视觉一致性的视频。
这是一个异步API,只会返回异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 来检索视频生成结果。
请求头
枚举值:
application/jsonBearer 身份验证格式,例如:Bearer {{API 密钥}}。
请求体
模型将使用提供的图像作为参考,生成具有一致主体的视频。图像字段要求:
- 接受 1 至 7 张图像
- 图像资源可通过 URL 或 Base64 编码提供
- 必须使用以下格式之一:PNG、JPEG、JPG、WebP
- 图像尺寸必须至少为 128x128 像素
- 图像宽高比必须小于 1:4 或 4:1
- 所有图像限制为 50MB
- base64 解码后的长度必须小于 10MB,且必须包含适当的内容类型字符串。例如:
data:image/png;base64,{base64_encode}
视频生成的文本提示词,最大长度为 1500 个字符。
视频持续时间(秒)。默认为 5 秒,目前仅支持
5 秒选项。视频生成的随机种子。
- 默认为随机种子数值
- 手动设置的值将覆盖默认的随机种子
输出视频的宽高比。默认值:
可选值:
16:9可选值:
16:9、9:16、1:1输出视频分辨率。默认为 1080p,目前仅支持
1080p 选项。画面中物体的运动幅度。默认值:
可选值:
auto可选值:
auto、small、medium、large是否为生成的视频添加背景音乐。默认值:
可选值:
false可选值:
true、false当设置为 true 时,系统将自动添加合适的 BGM。BGM 无时长限制,系统会自动适配。为生成的视频添加水印。
false:不添加水印。true:在视频添加文字的水印,标识由人工智能生成合成。
响应
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
最后修改于 2026年1月12日
⌘I