---
title: Veo 3.1
description: Google's latest video generation model with improved quality, motion, and audio generation.
image: https://edgetunnel-b2h.pages.dev/dev-products-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/ai/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

![Google logo](https://edgetunnel-b2h.pages.dev/_astro/google.DyXKPTPP.svg) 

#  Veo 3.1 

Text-to-Video • Google 

`google/veo-3.1` 

Google's latest video generation model with improved quality, motion, and audio generation.

| Model Info          |                                                                                                                  |
| ------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Terms and License   | [link ↗](https://ai.google.dev/gemini-api/terms)                                                                 |
| More information    | [link ↗](https://deepmind.google/technologies/veo/)                                                              |
| Zero data retention | Yes                                                                                                              |
| Pricing             | [View pricing in the Cloudflare dashboard ↗](https://dash.cloudflare.com/?to=/:account/ai/models/google/veo-3.1) |

## Usage

* [ TypeScript ](#tab-panel-804)
* [ cURL ](#tab-panel-805)

**TypeScript**

```ts
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)
```

```bash
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"
  }
}'
```

* [ Output ](#tab-panel-800)
* [ Raw response ](#tab-panel-801)

```json
{
  "gatewayMetadata": {
    "keySource": "Unified"
  },
  "result": {
    "video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3.1/nature-documentary.mp4"
  },
  "state": "Completed"
}
```

## Examples

**Urban Time-lapse**  — City life time-lapse video 

* [ TypeScript ](#tab-panel-808)
* [ cURL ](#tab-panel-809)

**TypeScript**

```ts
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)
```

```bash
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"
  }
}'
```

* [ Output ](#tab-panel-802)
* [ Raw response ](#tab-panel-803)

```json
{
  "gatewayMetadata": {
    "keySource": "Unified"
  },
  "result": {
    "video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3.1/urban-time-lapse.mp4"
  },
  "state": "Completed"
}
```

**Abstract Art**  — Abstract motion graphics 

* [ TypeScript ](#tab-panel-812)
* [ cURL ](#tab-panel-813)

**TypeScript**

```ts
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)
```

```bash
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"
  }
}'
```

* [ Output ](#tab-panel-806)
* [ Raw response ](#tab-panel-807)

```json
{
  "gatewayMetadata": {
    "keySource": "Unified"
  },
  "result": {
    "video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3.1/abstract-art.mp4"
  },
  "state": "Completed"
}
```

**Food Video**  — Appetizing food footage 

* [ TypeScript ](#tab-panel-814)
* [ cURL ](#tab-panel-815)

**TypeScript**

```ts
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)
```

```bash
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"
  }
}'
```

* [ Output ](#tab-panel-810)
* [ Raw response ](#tab-panel-811)

```json
{
  "gatewayMetadata": {
    "keySource": "Unified"
  },
  "result": {
    "video": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__veo-3.1/food-video.mp4"
  },
  "state": "Completed"
}
```

## Parameters

* [ Input ](#tab-panel-816)
* [ Output ](#tab-panel-817)

prompt

`string`requiredText prompt describing the video to generate

image\_input

`string`Base64-encoded reference image for i2v

duration

`string`requireddefault: 6senum: 4s, 6s, 8sVideo duration

aspect\_ratio

`string`requireddefault: 16:9enum: 16:9, 9:16, 1:1Video aspect ratio

resolution

`string`requireddefault: 720penum: 720p, 1080pVideo resolution

generate\_audio

`boolean`requireddefault: trueWhether to generate audio with the video

video

`string`format: uriURL to the generated video

## API Schemas (Raw)

Input [ ](https://edgetunnel-b2h.pages.dev/ai/models/google/veo-3.1/schema-input.json "Open") [ ](https://edgetunnel-b2h.pages.dev/ai/models/google/veo-3.1/schema-input.json "Download") 

Output [ ](https://edgetunnel-b2h.pages.dev/ai/models/google/veo-3.1/schema-output.json "Open") [ ](https://edgetunnel-b2h.pages.dev/ai/models/google/veo-3.1/schema-output.json "Download")

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://edgetunnel-b2h.pages.dev/ai/models/google/veo-3.1/#page","headline":"Veo 3.1 (Google) · Cloudflare AI docs · Cloudflare AI docs","description":"Google's latest video generation model with improved quality, motion, and audio generation.","url":"https://edgetunnel-b2h.pages.dev/ai/models/google/veo-3.1/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/dev-products-preview.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/ai/","name":"AI"}},{"@type":"ListItem","position":3,"item":{"@id":"/ai/models/","name":"Models"}}]}
```
