- Third-party
- Zero data retention
Vidu Q3 Pro 是一款高质量视频生成模型,支持文生视频、图生视频以及首尾帧生成视频工作流,支持音频,片段最长 16 秒。
| 模型信息 | |
|---|---|
| 条款和许可证 | 链接 ↗ |
| 更多信息 | 链接 ↗ |
| 零数据保留 | 是 |
| 定价 | 在 Cloudflare 仪表板中查看定价 ↗ |
用法
const response = await env.AI.run(
'vidu/q3-pro',
{
prompt: 'A golden retriever running through a sunlit meadow in slow motion',
duration: 5,
resolution: '720p',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "vidu/q3-pro",
"input": {
"prompt": "A golden retriever running through a sunlit meadow in slow motion",
"duration": 5,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://video.cf.vidu.com/infer_64/tasks/26/0417/05/942597991691198464/creation-01/video.mp4"
},
"state": "Completed"
}示例
竖版宽高比 — 适用于社交媒体的竖屏视频
const response = await env.AI.run(
'vidu/q3-pro',
{
prompt:
'A busy street in Tokyo at night with neon signs reflecting on wet pavement, rain falling',
aspect_ratio: '9:16',
duration: 5,
resolution: '720p',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "vidu/q3-pro",
"input": {
"prompt": "A busy street in Tokyo at night with neon signs reflecting on wet pavement, rain falling",
"aspect_ratio": "9:16",
"duration": 5,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://video.cf.vidu.com/infer_88/tasks/26/0417/05/942598607041753088/creation-01/video.mp4"
},
"state": "Completed"
}无声视频 — 生成无音频的视频
const response = await env.AI.run(
'vidu/q3-pro',
{
audio: false,
prompt: 'Abstract paint swirls slowly mixing in water, vivid blues and golds',
duration: 8,
resolution: '720p',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "vidu/q3-pro",
"input": {
"audio": false,
"prompt": "Abstract paint swirls slowly mixing in water, vivid blues and golds",
"duration": 8,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://video.cf.vidu.com/infer_76/tasks/26/0417/05/942599305355595776/creation-01/final_video.mp4"
},
"state": "Completed"
}方形格式 — 适用于产品演示或社交帖子的方形视频
const response = await env.AI.run(
'vidu/q3-pro',
{
prompt:
'A sleek wireless headphone rotating on a pedestal with soft studio lighting and a white background',
aspect_ratio: '1:1',
duration: 5,
resolution: '720p',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "vidu/q3-pro",
"input": {
"prompt": "A sleek wireless headphone rotating on a pedestal with soft studio lighting and a white background",
"aspect_ratio": "1:1",
"duration": 5,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://video.cf.vidu.com/infer_40/tasks/26/0417/05/942599364482723840/creation-01/video.mp4"
},
"state": "Completed"
}参数
prompt
stringmaxLength: 5000描述视频中应出现的内容的文本提示词start_image
string用于视频生成的起始图像。单独使用时为图生视频,与 end_image 一起使用时为首尾帧生成视频。接受公开 URL 或 Base64 data URI(data:image/png;base64,...)end_image
string用于首尾帧生成视频的结束图像。必须与 start_image 一起使用。接受公开 URL 或 Base64 data URI(data:image/png;base64,...)duration
integerrequireddefault: 5minimum: 1maximum: 16视频时长(秒,1-16)resolution
stringrequireddefault: 720penum: 540p, 720p, 1080p视频分辨率audio
boolean启用音视频同步。Q3 模型默认为 true。为 false 时输出无声视频aspect_ratio
stringenum: 16:9, 9:16, 3:4, 4:3, 1:1视频宽高比(仅限文生视频)。默认值:16:9video
stringformat: uri生成视频的 URL