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

# Veo video API

> Generate an eight-second Veo video from text through Floodgate. Submit, poll and download with the compatible API, and check reviewed limits and request billing.

Use Veo through Floodgate's compatible Videos API. The reviewed route accepts text input and produces an eight-second video.

## Operations and limits

| Method | Path | Purpose |
| - | - | - |
| POST | `/v1/videos` | Submit |
| GET | `/v1/videos/{task_id}` | Poll |
| GET | `/v1/videos/{task_id}/content` | Download |

The reviewed models are `veo_3_1` and `veo_3_1-fast` in `Discounted-Gemini-2`. Check current availability in [Model Square](https://floodgate.dev/models).

| Field | Required | Values |
| - | - | - |
| `model` | Yes | The accepted model ID |
| `prompt` | Yes | Text input |
| `seconds` | No | `8` as a string or integer |
| `size` | No | `1280x720` or `720x1280` |

Image, reference-video, mode and audio controls are outside this reviewed contract.

## Submit

```bash theme={null}
curl --fail-with-body https://api.floodgate.dev/v1/videos \
  -H "Authorization: Bearer $FLOODGATE_API_KEY" -H 'Content-Type: application/json' \
  -d '{"model":"veo_3_1-fast","prompt":"A quiet forest beside a lake","seconds":"8","size":"1280x720"}'
```

```json theme={null}
{"id":"task_example","task_id":"task_example","object":"video","model":"veo_3_1-fast","status":"queued","progress":0,"created_at":1700000000}
```

## Poll and download

Set `TASK_ID` to the returned `id`. Poll until `completed` or `failed`; pending states are `queued` and `in_progress`.

```bash theme={null}
curl --fail-with-body "https://api.floodgate.dev/v1/videos/$TASK_ID" \
  -H "Authorization: Bearer $FLOODGATE_API_KEY"
```

```json theme={null}
{"id":"task_example","status":"completed","progress":100,"result_url":"/v1/videos/task_example/content"}
```

```json theme={null}
{"id":"task_example","status":"failed","error":{"code":"task_failed","message":"Video generation failed"}}
```

Only after completion:

```bash theme={null}
curl --fail-with-body "https://api.floodgate.dev/v1/videos/$TASK_ID/content" \
  -H "Authorization: Bearer $FLOODGATE_API_KEY" --output video.mp4
```

## Errors and billing

Veo uses a completed-request price for this group. Follow-ups retain the original group and price. Failed tasks release their reservation; missing final usage can leave settlement pending.

For `400`, check `seconds`, `size` and required fields. Unfinished downloads return `400`; expired results return `410`. Keep the task ID after a timeout or `submission_uncertain` rather than submitting again. See [shared video errors](https://docs.floodgate.dev/videos.md#errors-and-retries).


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