跳转到内容
搜索文档
Google logo

Veo 3 Fast

Text-to-Video • Google

查看 MarkdownAgent 设置
  • Third-party
  • Zero data retention

A faster version of Veo 3 optimized for lower latency video generation with audio support.

Model Info
Terms and Licenselink
More informationlink
Zero data retentionYes
PricingView pricing in the Cloudflare dashboard

Usage

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"
}

Examples

Social Media Clip — Quick vertical video for 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"
}
Animated Loop — Short loopable animation
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"
}
Product Shot — Quick product video preview
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"
}

Parameters

prompt
stringrequiredText prompt describing the video to generate
image_input
stringBase64-encoded reference image for i2v
duration
stringrequireddefault: 6senum: 4s, 6s, 8sVideo duration
aspect_ratio
stringrequireddefault: 16:9enum: 16:9, 9:16, 1:1Video aspect ratio
resolution
stringrequireddefault: 720penum: 720p, 1080pVideo resolution
generate_audio
booleanrequireddefault: trueWhether to generate audio with the video
video
stringformat: uriURL to the generated video

API Schemas (Raw)

Input
Output

这篇文档对您有帮助吗?