Veo 3.1
High-quality video generation with text-to-video, first/last frame, and reference image modes
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generateTask/veo-3-1 | Create generation task |
| GET | /api/v1/statusTask/veo-3-1 | Query task status |
Authentication
All requests require an API Key in the header:
Request Body
Parameters
Parameter
Required
Default
Description
request_typestring—
asyncasync (polling) or callback (webhook)
callback_urlstring✱
—
Callback URL, required when request_type=callback
providerstring—
autoRouting strategy: auto, value, or official
inputobject✓
—
Model input parameters
Generation Types:
TEXT_2_VIDEO— Pure text-to-videoFIRST_AND_LAST_FRAMES_2_VIDEO— First/last frame to video, requiresimage_urls(max 2)REFERENCE_2_VIDEO— Reference image to video, requiresfastmode,image_urls(max 3),aspect_ratiomust be16:9
Mode Options:
quality— High quality modefast— Fast generation mode
Example
Text-to-Video (TEXT_2_VIDEO)
First/Last Frame to Video (FIRST_AND_LAST_FRAMES_2_VIDEO)
Reference Image to Video (REFERENCE_2_VIDEO)
Response
POST /api/v1/generateTask/veo-3-1
Returns taskId on success for subsequent status queries.
Success:
Error:
GET /api/v1/statusTask/veo-3-1
Query task execution status and results via taskId.
Success:
Failed:
Status Response Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique task identifier |
state | string | pending processing success failed |
resultJson | string | JSON containing resultUrls array (on success) |
failCode | string | Error code (on failure) |
failMsg | string | Error message (on failure) |
createTime | integer | Task creation timestamp (ms) |
completeTime | integer | Task completion timestamp (ms) |
costTime | integer | Processing duration (ms) |
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid parameters or request error |
| 401 | Invalid or missing API Key |
| 429 | Rate limit exceeded |
| Fail Code | Description |
|---|---|
CONTENT_VIOLATION | Content violates safety guidelines |
INVALID_IMAGE_URL | Cannot access provided image URL |
Rate Limits
| Limit | Value |
|---|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
Exceeding limits returns 429 error. Wait and retry.
Tips
- Generation time: Average ~2 minutes. Submit task, wait 90 seconds, then poll every 5 seconds.
- Callback mode: Video generation takes time, strongly recommend using
callbackmode. - Video expiration: Result URLs are valid for 15 days. Download promptly.
- Content moderation: Prompts must comply with content safety guidelines.
- REFERENCE_2_VIDEO constraints: This type only supports
fastmode andaspect_ratiomust be16:9. - Image formats:
image_urlssupports JPG, PNG, WebP, max 10MB per image.