Gemini Omni 1.2 Flash API documentation
Integrate Gemini Omni 1.2 Flash with your VezAPI key. The operations below share the same authentication and account balance.
https://api.vezapi.comSend Authorization: Bearer YOUR_VEZAPI_KEY. Use a unique Idempotency-Key for each submission; reuse it only when checking the same request.
Gemini Omni 1.2 Flash
/api/v1/jobs/createTaskModel IDs: google/gemini-omni-flash-1-2
| Parameter | Type | Description & constraints |
|---|---|---|
modelrequired | string | The model name used to generate the task. This field is required. This interface must use the `google/gemini-omni-flash-1-2` model. Values: Default: |
callBackUrloptional | string | The callback URL for task completion notifications. This parameter is optional. If provided, the system will send a POST request to this URL when the task is completed, regardless of whether it succeeds or fails. If not provided, no callback notification will be sent. |
inputrequired | object | Input parameters for the generation task. Use only one generation mode per request: text / reference images, first frame only, first and last frame, or video edit. |
input.promptrequired | string | Video prompt. Required and must be non-empty. Describe the scene, action, camera, and sound.
|
input.durationoptional | integer | Duration of the generated video in seconds. Send an integer. - Text / reference images (no first frame, no video): **required**, **3–15** - First frame only: **required**, **3–15** - First and last frame: **required**, **3–10** - Video edit (`video_list` set): **do not send**; output duration follows the input video
|
input.aspect_ratiooptional | string | Aspect ratio of the generated video. Allowed values: `16:9`, `9:16`, `auto`. Default `16:9`. When no reference image is provided, `auto` is treated as `16:9`. Values: Default: |
input.resolutionoptional | string | Resolution of the generated video. Allowed values: `360p`, `720p`, `1080p`, `4k`. Default `720p`. Values: Default: |
input.seedsoptional | integer | Random seed. Range: 10000–99999. Send a single integer. If omitted, the system generates one.
|
input.image_urlsoptional | array | Reference image URLs, max **6**. Used for subject, scene, style, or storyboard reference. Two reference images are not treated as first/last frames. Limits: - Use publicly accessible image URLs - Each file must be no larger than `20MB` - Mutually exclusive with `first_frame_url` and `last_frame_url` - Each image costs 1 quota slot
|
input.first_frame_urloptional | string | First-frame image URL. Sets the starting frame of the generated video. Use a publicly accessible image URL. - First frame only (no last frame): `duration` is required, integer 3–15 - Together with `last_frame_url`: `duration` is required, integer 3–10 - When this field is set, do not send `image_urls` or `video_list` - Do not send `last_frame_url` alone |
input.last_frame_urloptional | string | Last-frame image URL. Sets the ending frame. Must be sent together with `first_frame_url`; cannot be used alone. `duration` is then required and must be 3–10. When first and last frames are set, do not send `image_urls` or `video_list`. |
input.video_listoptional | array | Video URL array, max **1**. Sending this field selects video-edit mode. **Do not send `duration`**; output duration follows the input video. Can be combined with `image_urls`. Mutually exclusive with `first_frame_url` and `last_frame_url`. Use a publicly accessible video URL, MP4 recommended, no longer than **15 seconds**.
|
Request example
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
-H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
-H 'Idempotency-Key: your-unique-request-id' \
-H 'Content-Type: application/json' \
-d '{
"model": "google/gemini-omni-flash-1-2",
"input": {
"prompt": "A cat plays piano in a jazz bar, one continuous shot, soft live jazz",
"duration": 8,
"aspect_ratio": "16:9",
"resolution": "720p"
}
}'Responses and errors
HTTP 200
Request successful
| Parameter | Type | Description & constraints |
|---|---|---|
codeoptional | integer | Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). Values: |
msgoptional | string | Response message, error description upon failure |
datarequired | object | |
data.taskIdrequired | string | The task ID can be used with the "Get Task Details" endpoint to query the task status. |
Task status and callbacks
For asynchronous tasks, keep the returned taskId. Query GET /api/v1/jobs/recordInfo?taskId=... or provide callBackUrl when creating the task. Only the account that created a task can access it or derive new resources from it.
A timeout can mean the submission was accepted. Inspect the existing request in your dashboard; do not create another task automatically. Callback delivery is retried and may arrive more than once. Deduplicate with X-VezAPI-Event-Id.
Files, logs and billing
Generated media normally follows a 14-day provider lifetime; uploaded files expire after 24 hours. Save the files you need before expiration. VezAPI streams registered files without keeping a permanent media library. Request logs are retained for two calendar months.
Credits are reserved before submission. Final deductions match actual discounted consumption one for one. Unknown usage pauses new paid requests. If available funds cannot cover final usage while protecting other reservations, settlement stays pending until funded; model usage cannot make the wallet negative. Time-based inputs require server-side metadata reads; a failed read prevents submission.