Veo 3.1 video generation (async): one endpoint, params pick the type — omit image for text-to-video, include image (first frame) for image-to-video; tier=lite/fast/quality, resolution=720p/1080p/4k (1080p/4k require quality), size=16:9/9:16, duration=4s/6s/8s. Returns a job id (HTTP 202); poll GET /v1/videos/jobs/{id} until status=succeeded, result in data[0].url (a re-hosted mp4). ~1-2 min per clip, billed per clip, fully refunded on failure.
Try in Playground →Authentication
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Create an API Key in the console to start.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID, here veo-3.1. |
| prompt | string | Yes | Text prompt describing the video. |
| tier | string | No | Quality tier: lite (default, cheapest) / fast / quality. |
| resolution | string | No | Resolution: 720p (default) / 1080p (quality-tier only; Lite/Fast are 720p). 4K is temporarily unavailable. |
| size | string | No | Orientation: 16:9 (landscape, default) / 9:16 (portrait). |
| duration | string | No | Duration: 4s / 6s / 8s (default 8s). |
| image | string | No | Image-to-video: include a reference image (used as the first frame) — a public URL, a data: URI, or base64 — to run image-to-video; omit for text-to-video. |
Request example
# 1) submit -> 202 {"id":"img_...","status":"queued"}
curl https://nezhagate.com/v1/videos/generations -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"model": "veo-3.1", "prompt": "a cat surfing a wave at sunset", "tier": "quality", "resolution": "1080p", "size": "16:9", "duration": "8s"}'
# image-to-video: also pass "image": "https://example.com/first-frame.png"
# 2) poll every ~5s until status=succeeded, then read data[0].url
curl https://nezhagate.com/v1/videos/jobs/img_3f9a...c2 -H 'Authorization: Bearer YOUR_API_KEY'Response
{
"id": "img_3f9a...c2",
"object": "video.generation.job",
"status": "queued",
"model": "veo-3.1"
}Async video job (submit → poll)
One model; params pick the type: tier=lite/fast/quality, resolution=720p/1080p/4k (1080p/4k need quality), size=16:9/9:16, duration=4s/6s/8s; add an image param for image-to-video (first frame). Returns HTTP 202 + a job id; poll until status=succeeded, result in data[0].url (a re-hosted mp4, ~1-2 min).
curl https://nezhagate.com/v1/videos/generations -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"model": "veo-3.1", "prompt": "a cat surfing at sunset", "tier": "quality", "resolution": "1080p", "size": "16:9", "duration": "8s"}'{ "id": "img_3f9a...c2", "object": "video.generation.job", "status": "queued", "model": "veo-3.1" }curl https://nezhagate.com/v1/videos/jobs/img_3f9a...c2 -H 'Authorization: Bearer YOUR_API_KEY'
{
"id": "img_3f9a...c2",
"object": "video.generation.job",
"status": "succeeded",
"model": "veo-3.1",
"data": [{ "url": "https://img.nezhagate.com/i/9f86d081a8....mp4" }]
}Billed per clip and fully refunded on failure; a failed or timed-out render returns the reserved credits automatically.
Error codes
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 402 | Insufficient balance / key limit reached |
| 400 | Invalid parameters or model |
| 429 | Rate limited |
| 502 | All upstream providers failed |