Veo 3.1
Text-to-Video • Google
google/veo-3.1
- Third-party
- Zero data retention
Google's latest video generation model with improved quality, motion, and audio generation.
| Model Info | |
|---|---|
| Terms and License | link ↗ |
| More information | link ↗ |
| Zero data retention | Yes |
| Pricing | <ul><li>Default (per second)$0.40</li><li>@720p (per second)$0.20</li><li>@1080p (per second)$0.20</li><li>@4k (per second)$0.40</li><li>@720p w/ audio (per second)$0.40</li><li>@1080p w/ audio (per second)$0.40</li><li>@4k w/ audio (per second)$0.60</li></ul> |
Usage
const response = await env.AI.run(
'google/veo-3.1',
{
prompt:
'A majestic eagle soaring over snow-capped mountains, tracking shot following the bird as it glides through clouds',
aspect_ratio: '16:9',
duration: '8s',
generate_audio: true,
resolution: '1080p',
},
)
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.1",
"input": {
"prompt": "A majestic eagle soaring over snow-capped mountains, tracking shot following the bird as it glides through clouds",
"aspect_ratio": "16:9",
"duration": "8s",
"generate_audio": true,
"resolution": "1080p"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3.1/nature-documentary.mp4"
},
"state": "Completed"
}
Examples
<details>
<summary>Urban Time-lapse — City life time-lapse video</summary>
const response = await env.AI.run(
'google/veo-3.1',
{
prompt:
'A time-lapse of a busy city intersection at night, car lights creating streaks, people walking in fast motion',
aspect_ratio: '16:9',
duration: '6s',
generate_audio: true,
resolution: '1080p',
},
)
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.1",
"input": {
"prompt": "A time-lapse of a busy city intersection at night, car lights creating streaks, people walking in fast motion",
"aspect_ratio": "16:9",
"duration": "6s",
"generate_audio": true,
"resolution": "1080p"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3.1/urban-time-lapse.mp4"
},
"state": "Completed"
}
</details>
<details>
<summary>Abstract Art — Abstract motion graphics</summary>
const response = await env.AI.run(
'google/veo-3.1',
{
prompt:
'Colorful ink drops falling into water in slow motion, creating organic swirling patterns',
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.1",
"input": {
"prompt": "Colorful ink drops falling into water in slow motion, creating organic swirling patterns",
"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.1/abstract-art.mp4"
},
"state": "Completed"
}
</details>
<details>
<summary>Food Video — Appetizing food footage</summary>
const response = await env.AI.run(
'google/veo-3.1',
{
prompt: 'Melted chocolate being poured over fresh strawberries in slow motion, rich and glossy',
aspect_ratio: '9:16',
duration: '4s',
generate_audio: true,
resolution: '1080p',
},
)
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.1",
"input": {
"prompt": "Melted chocolate being poured over fresh strawberries in slow motion, rich and glossy",
"aspect_ratio": "9:16",
"duration": "4s",
"generate_audio": true,
"resolution": "1080p"
}
}'
{
"gatewayMetadata": {
"keySource": "Unified"
},
"result": {
"video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3.1/food-video.mp4"
},
"state": "Completed"
}
</details>
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)
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ai/models/google/veo-3.1/#page","headline":"Veo 3.1","description":"Google's latest video generation model with improved quality, motion, and audio generation.","url":"https://developers.cloudflare.com/ai/models/google/veo-3.1/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: A faster version of Veo 3.1 optimized for lower latency while maintaining high-quality video and audio output. title: Veo 3.1 Fast image: https://developers.cloudflare.com/og-docs.png
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/llms.txt
Use this file to discover all available pages before exploring further.

