Vidu Q1 首末帧
curl --request POST \
--url https://api.ppio.com/v3/async/vidu-q1-startend2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"images": [
"<string>"
],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"resolution": "<string>",
"movement_amplitude": "<string>",
"bgm": true,
"watermark": true
}
'import requests
url = "https://api.ppio.com/v3/async/vidu-q1-startend2video"
payload = {
"images": ["<string>"],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"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,
resolution: '<string>',
movement_amplitude: '<string>',
bgm: true,
watermark: true
})
};
fetch('https://api.ppio.com/v3/async/vidu-q1-startend2video', 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-startend2video",
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,
'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-startend2video"
payload := strings.NewReader("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\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-startend2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\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-startend2video")
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 \"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-startend2video
Vidu Q1 首末帧
curl --request POST \
--url https://api.ppio.com/v3/async/vidu-q1-startend2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"images": [
"<string>"
],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"resolution": "<string>",
"movement_amplitude": "<string>",
"bgm": true,
"watermark": true
}
'import requests
url = "https://api.ppio.com/v3/async/vidu-q1-startend2video"
payload = {
"images": ["<string>"],
"prompt": "<string>",
"duration": 123,
"seed": 123,
"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,
resolution: '<string>',
movement_amplitude: '<string>',
bgm: true,
watermark: true
})
};
fetch('https://api.ppio.com/v3/async/vidu-q1-startend2video', 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-startend2video",
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,
'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-startend2video"
payload := strings.NewReader("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\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-startend2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"images\": [\n \"<string>\"\n ],\n \"prompt\": \"<string>\",\n \"duration\": 123,\n \"seed\": 123,\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-startend2video")
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 \"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 密钥}}。
请求体
两张图像:第一张为起始帧,第二张为结束帧。注意事项:
- 支持公共 URL 或 Base64 格式
- 宽高比必须接近:起始帧与结束帧的比例必须在 0.8~1.25 之间
- 支持格式:png、jpeg、jpg、webp
- 最大尺寸:50MB
- base64 解码后的长度必须小于 10MB,且必须包含适当的内容类型字符串。例如:
data:image/png;base64,{base64_encode}
提示词描述,最大 1500 个字符。
视频持续时间(秒)。默认为 5 秒,目前仅支持
5 秒选项。视频生成的随机种子。
- 默认为随机种子数值
- 手动设置的值将覆盖默认的随机种子
输出视频分辨率。默认为 1080p,目前仅支持
1080p 选项。画面中物体的运动幅度。默认值:
可选值:
auto可选值:
auto、small、medium、large是否为生成的视频添加背景音乐。默认值:
可选值:
false可选值:
true、false当设置为 true 时,系统将自动添加合适的 BGM。BGM 无时长限制,系统会自动适配。为生成的视频添加水印。
false:不添加水印。true:在视频添加文字的水印,标识由人工智能生成合成。
响应
异步任务的 task_id。您应该使用该 task_id 请求 查询任务结果 API 以获取生成结果
最后修改于 2026年1月12日
⌘I