- Third-party
- Zero data retention
Veo 3 的快速版本,针对更低延迟的视频生成进行了优化,并支持音频。
| 模型信息 | |
|---|---|
| 条款和许可证 | 链接 ↗ |
| 更多信息 | 链接 ↗ |
| 零数据保留 | 是 |
| 定价 | 在 Cloudflare 仪表板中查看定价 ↗ |
用法
const response = await env.AI.run(
'google/veo-3-fast',
{
prompt: 'Ocean waves crashing on a rocky shoreline at sunset',
aspect_ratio: '16:9',
duration: '6s',
generate_audio: true,
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": "google/veo-3-fast",
"input": {
"prompt": "Ocean waves crashing on a rocky shoreline at sunset",
"aspect_ratio": "16:9",
"duration": "6s",
"generate_audio": true,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3-fast/quick-preview.mp4"
},
"state": "Completed"
}示例
社交媒体短片 — 用于快拍(Stories)的快速竖屏视频
const response = await env.AI.run(
'google/veo-3-fast',
{
prompt: 'A coffee cup with steam rising, cozy cafe atmosphere',
aspect_ratio: '9:16',
duration: '4s',
generate_audio: true,
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": "google/veo-3-fast",
"input": {
"prompt": "A coffee cup with steam rising, cozy cafe atmosphere",
"aspect_ratio": "9:16",
"duration": "4s",
"generate_audio": true,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3-fast/social-media-clip.mp4"
},
"state": "Completed"
}循环动画 — 可循环播放的短动画
const response = await env.AI.run(
'google/veo-3-fast',
{
prompt: 'A campfire burning with flames dancing and sparks floating upward, seamless loop',
aspect_ratio: '16:9',
duration: '4s',
generate_audio: true,
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": "google/veo-3-fast",
"input": {
"prompt": "A campfire burning with flames dancing and sparks floating upward, seamless loop",
"aspect_ratio": "16:9",
"duration": "4s",
"generate_audio": true,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3-fast/animated-loop.mp4"
},
"state": "Completed"
}产品镜头 — 快速产品视频预览
const response = await env.AI.run(
'google/veo-3-fast',
{
prompt: 'A smartphone rotating on a dark surface with dramatic lighting',
aspect_ratio: '16:9',
duration: '6s',
generate_audio: false,
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": "google/veo-3-fast",
"input": {
"prompt": "A smartphone rotating on a dark surface with dramatic lighting",
"aspect_ratio": "16:9",
"duration": "6s",
"generate_audio": false,
"resolution": "720p"
}
}'{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3-fast/product-shot.mp4"
},
"state": "Completed"
}参数
prompt
stringrequired描述要生成的视频的文本提示词image_input
string用于图生视频的 Base64 编码参考图像duration
stringrequireddefault: 6senum: 4s, 6s, 8s视频时长aspect_ratio
stringrequireddefault: 16:9enum: 16:9, 9:16, 1:1视频宽高比resolution
stringrequireddefault: 720penum: 720p, 1080p视频分辨率generate_audio
booleanrequireddefault: true是否随视频一同生成音频video
stringformat: uri生成视频的 URL