> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gengen.farm/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate videos with Veo

> Generate and extend videos with Google Veo 3.1, Fast and Lite.

Use `veo-3.1-generate-001`, `veo-3.1-fast-generate-001`, or `veo-3.1-lite-generate-001` (Preview). All return asynchronous tasks.

## Create a task

```bash theme={"dark"}
curl https://gengen.farm/v1/contents/generations/tasks \
  -H 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "veo-3.1-lite-generate-001",
    "mode": "text_to_video",
    "prompt": "A cinematic ocean sunrise with gentle surf sounds.",
    "controls": {"duration": 4, "resolution": "720p", "ratio": "16:9", "generateAudio": true, "outputCount": 1}
  }'
```

## Query the result

Veo uses the **shared video task query endpoint**, `GET /v1/contents/generations/tasks/{id}`. See [Retrieve a Veo task](/api-reference/google/veo-retrieve-task) for authentication, statuses, and response fields.

Pass the complete `id` returned by creation, including its `veo31:` prefix, and use the same API key. No `model` parameter or request body is needed. Poll until `status` is `succeeded` or `failed`; read successful video links from `outputs.videos`. Querying does not create another task or charge again.

```bash theme={"dark"}
curl 'https://gengen.farm/v1/contents/generations/tasks/veo31:YOUR_TASK_UUID' \
  -H 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx'
```

`GET /v1/contents/generations/tasks` lists owned tasks. Cancellation, deletion, callbacks and streaming are not supported for Veo.

## Modes and inputs

| Mode | `assets` | Models |
| - | - | - |
| `text_to_video` | Omit | All three |
| `image_first_frame` | `firstFrameImage` | All three |
| `image_first_last_frame` | `firstFrameImage` and `lastFrameImage` | All three |
| `multimodal_reference` | `referenceImages`: 1–3 subject images | Standard and Fast |
| `video_extend` | `sourceVideo` | All three; API only |

Omitting `mode` infers it from the assets. These input forms cannot be combined. Reference images describe subjects, not a separate style-reference operation. Audio inputs and video editing are not supported.

### HTTPS and GCS inputs

You can provide an HTTPS URL or a **`gs://bucket/object` URI directly** in any media field. Public and signed HTTPS URLs are accepted; local files, data URLs and Base64 input are not accepted by this endpoint.

Direct GCS inputs must meet both requirements:

* The object or directory is authorized for your GENGEN account. Contact support to register the exact object or prefix; another user's private GENGEN objects are never accepted.
* The object is readable by GENGEN. Contact support to configure read access for an external private bucket, or provide a signed HTTPS URL instead. A `gs://` URI alone does not grant access.

GCS images must be JPEG or PNG, with a maximum size of 20 MiB. HTTPS images also accept WebP and are converted to PNG; the converted image must remain within 20 MiB. Extension inputs must be Veo-generated MP4 videos, 1–30 seconds, 24 fps, 16:9 or 9:16, and 720p, 1080p or 4K, up to 64 MiB.

```json theme={"dark"}
{
  "model": "veo-3.1-generate-001",
  "mode": "image_first_last_frame",
  "prompt": "A smooth camera movement between the two frames.",
  "assets": {
    "firstFrameImage": "gs://your-authorized-bucket/frames/start.png",
    "lastFrameImage": "https://example.com/end.png"
  },
  "controls": {"duration": 8, "resolution": "1080p", "generateAudio": true}
}
```

### Video extension

```json theme={"dark"}
{
  "model": "veo-3.1-generate-001",
  "mode": "video_extend",
  "prompt": "Continue the camera movement along the coastline.",
  "assets": {"sourceVideo": "gs://your-authorized-bucket/veo/source.mp4"},
  "controls": {"duration": 7, "resolution": "720p", "ratio": "16:9", "generateAudio": true}
}
```

Extension adds exactly seven seconds. `controls.duration` represents the added duration, not the input video's duration. The Playground does not expose video extension.

## Controls

| Field | Values / default |
| - | - |
| `duration` | 4, 6 or 8 seconds; default 8. Extension: 7 only. Reference images and 1080p/4K generation require 8 seconds. |
| `resolution` | `720p` (default), `1080p`; Standard also accepts `4k`. |
| `ratio` | `16:9` (default), `9:16` |
| `generateAudio` | Boolean; default `true` |
| `outputCount` | Integer 1–4; default 1 |
| `seed` | Optional integer 0–4294967295 |

A nonempty prompt is required (up to 10,000 characters). Use English prompts. Unsupported controls are rejected instead of silently ignored.

Advanced settings go under `providerOptions.google`: `negativePrompt` (string, up to 10,000 characters), `enhancePrompt` (boolean), `personGeneration` (`allow_adult` or `disallow`), and `resizeMode` (`pad` or `crop`). `resizeMode` applies to image inputs. These fields are optional.

## Outputs, retention and billing

```json theme={"dark"}
{
  "id": "veo31:12345678-1234-4234-8234-123456789abc",
  "model": "veo-3.1-generate-001",
  "status": "succeeded",
  "outputs": {
    "videos": ["https://storage.googleapis.com/your-output-bucket/video.mp4?SIGNED_QUERY"],
    "images": [],
    "expiresAt": "2026-10-16T10:00:00.000Z",
    "urlsExpireAt": "2026-10-09T11:00:00.000Z"
  },
  "createdAt": "2026-10-09T09:58:00.000Z",
  "updatedAt": "2026-10-09T10:00:00.000Z"
}
```

Statuses are `queued`, `running`, `succeeded`, and `failed`. Failed tasks may include `failureReason`. Outputs are HTTPS URLs in `outputs.videos`, not raw GCS paths or Base64.

Videos remain available for seven days after generation completion. Signed links last at most one hour; retrieving or listing the task renews links while the video is retained. Copy the video to your own storage before `outputs.expiresAt`. After expiry the task remains successful but `outputs.videos` is empty.

GENGEN reserves the estimated balance before queueing. Successful tasks charge for the generated seconds and the number of videos actually returned; extension charges for seven added seconds per returned video. Filtered outputs are not included. Failed tasks release the reservation. Polling does not charge again. See [customer pricing](/pricing).

Try the [Veo API Explorer](https://gengen.farm/api-explorer/demos/veo-video-generation).


## OpenAPI

````yaml openapi/veo-video.yaml POST /contents/generations/tasks
openapi: 3.1.0
info:
  title: Google Veo video API
  version: 1.0.0
servers:
  - url: https://gengen.farm/v1
security:
  - bearerAuth: []
paths:
  /contents/generations/tasks:
    post:
      summary: Create a Veo video task
      description: >
        Create an asynchronous video task. Save the returned id and use the

        [shared task query endpoint](/api-reference/google/veo-retrieve-task)

        to check status and retrieve outputs.videos. Each POST creates a new
        task.
      operationId: createVeoVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VeoRequest'
            example:
              model: veo-3.1-lite-generate-001
              mode: text_to_video
              prompt: A cinematic ocean sunrise with gentle surf sounds.
              controls:
                duration: 4
                resolution: 720p
                ratio: '16:9'
                generateAudio: true
                outputCount: 1
      responses:
        '200':
          description: Owned asynchronous video task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VeoTask'
              example:
                id: veo31:12345678-1234-4234-8234-123456789abc
                model: veo-3.1-lite-generate-001
                status: queued
                outputs:
                  videos: []
                  images: []
                createdAt: '2026-10-09T09:58:00.000Z'
                updatedAt: '2026-10-09T09:58:00.000Z'
        '400':
          description: Invalid or unsupported request
        '402':
          description: Insufficient balance
        '503':
          description: Video generation is temporarily unavailable
components:
  schemas:
    VeoRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          enum:
            - veo-3.1-generate-001
            - veo-3.1-fast-generate-001
            - veo-3.1-lite-generate-001
        mode:
          type: string
          enum:
            - text_to_video
            - image_first_frame
            - image_first_last_frame
            - multimodal_reference
            - video_extend
          description: >-
            Inferred from assets when omitted. Lite does not support
            multimodal_reference. Extension is API-only.
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
        assets:
          type: object
          additionalProperties: false
          properties:
            firstFrameImage:
              type: string
              pattern: ^(https://|gs://)
              description: >-
                HTTPS URL or account-authorized gs:// object URI. External
                private GCS objects require read access configured with GENGEN
                support.
            lastFrameImage:
              type: string
              pattern: ^(https://|gs://)
              description: >-
                HTTPS URL or account-authorized gs:// object URI. External
                private GCS objects require read access configured with GENGEN
                support.
            referenceImages:
              type: array
              minItems: 1
              maxItems: 3
              items:
                type: string
                pattern: ^(https://|gs://)
                description: >-
                  HTTPS URL or account-authorized gs:// object URI. External
                  private GCS objects require read access configured with GENGEN
                  support.
            sourceVideo:
              type: string
              pattern: ^(https://|gs://)
              description: >-
                HTTPS URL or account-authorized gs:// object URI. External
                private GCS objects require read access configured with GENGEN
                support.
          description: >-
            Choose first frame, first+last frames, subject references, or
            extension video; input forms cannot be combined.
        controls:
          type: object
          additionalProperties: false
          properties:
            duration:
              type: integer
              enum:
                - 4
                - 6
                - 7
                - 8
              description: >-
                Generation 4/6/8 (default 8); extension 7 only. Reference images
                and 1080p/4K generation use 8.
            resolution:
              type: string
              enum:
                - 720p
                - 1080p
                - 4k
              default: 720p
              description: 4k is Standard only.
            ratio:
              type: string
              enum:
                - '16:9'
                - '9:16'
              default: '16:9'
            generateAudio:
              type: boolean
              default: true
            outputCount:
              type: integer
              minimum: 1
              maximum: 4
              default: 1
            seed:
              type: integer
              minimum: 0
              maximum: 4294967295
        providerOptions:
          type: object
          additionalProperties: false
          properties:
            google:
              type: object
              additionalProperties: false
              properties:
                negativePrompt:
                  type: string
                  maxLength: 10000
                enhancePrompt:
                  type: boolean
                personGeneration:
                  type: string
                  enum:
                    - allow_adult
                    - disallow
                resizeMode:
                  type: string
                  enum:
                    - pad
                    - crop
    VeoTask:
      type: object
      required:
        - id
        - model
        - status
        - outputs
      properties:
        id:
          type: string
          example: veo31:12345678-1234-4234-8234-123456789abc
        model:
          type: string
          enum:
            - veo-3.1-generate-001
            - veo-3.1-fast-generate-001
            - veo-3.1-lite-generate-001
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
        outputs:
          type: object
          required:
            - videos
            - images
          properties:
            videos:
              type: array
              items:
                type: string
                format: uri
              description: >-
                Temporary HTTPS links; empty for unfinished, failed or expired
                media.
            images:
              type: array
              maxItems: 0
              items:
                type: string
            expiresAt:
              type: string
              format: date-time
              description: Video retention deadline; seven days after completion.
            urlsExpireAt:
              type: string
              format: date-time
              description: >-
                Signed links expire within one hour. Retrieve again to renew
                before media expiry.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        failureReason:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.