gemini-omni-1.2-flash. Pass reference assets via ref.A model is callable only when it appears in GET /v1/modelsfor your current API key. A successful creation response, task ID, or in-progress status does not mean a deliverable video has been obtained.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | Must be gemini-omni-1.2-flash. |
prompt | string | Yes | — | Non-empty video description. Reference input assets with the literal model tags @图片1, @视频1, etc. |
ref | object[] | No | — | Reference assets; see ref items below. Omit for text-to-video. |
duration | integer | No | 5 | Output duration in integer seconds (3–15). |
aspect_ratio | string | No | 9:16 | Supports 9:16, 16:9. |
resolution | string | No | 720p | Supports 360p, 720p, 1080p, 4K. |
ref Itemstype and url, plus role for strict first and last frames. Every URL must be a publicly accessible HTTPS address readable throughout task execution without login, cookies, or custom request headers.| Field | Required | Description |
|---|---|---|
type | Yes | image or video. |
url | Yes | Asset URL. |
role | No | Omit for general reference assets; pass first_frame for a strict first frame or last_frame for a strict last frame (type=image only). |
ref determine the generation mode:ref Contents | Generation Mode | Max Count |
|---|---|---|
Omit ref | Text-to-video | — |
| General images and/or videos only | Multi-reference video | Up to 6 images and 3 videos, individually or combined |
One role=first_frame image | Strict first-frame video | 1 image |
One first_frame and one last_frame image | Strict first-and-last-frame video | 2 images |
ref: the first image is @图片1 and the first video is @视频1 (note: @图片1 and @视频1 are literal Chinese model syntax tags—keep them unchanged in prompts).last_frame must be submitted together with first_frame; first and last frames cannot be mixed with general reference images or videos.{
"model": "gemini-omni-1.2-flash",
"prompt": "The two people in @图片1 and @图片2 walk side by side down a neon-lit street, following the motion and camera pacing of @视频1, then wave together at the end",
"duration": 10,
"aspect_ratio": "9:16",
"ref": [
{ "type": "image", "url": "https://example.com/person-1.png" },
{ "type": "image", "url": "https://example.com/person-2.png" },
{ "type": "video", "url": "https://example.com/motion-1.mp4" }
]
}{
"model": "gemini-omni-1.2-flash",
"prompt": "Natural transition of a street from early morning to night with a stationary camera",
"duration": 5,
"ref": [
{ "type": "image", "role": "first_frame", "url": "https://example.com/morning.png" },
{ "type": "image", "role": "last_frame", "url": "https://example.com/night.png" }
]
}first_frame for a strict first-frame request.id from the creation response and poll the same task via GET /v1/videos/{task_id}. Generation typically takes 1–5 minutes; poll every 10–30 seconds. Public statuses:| Status | Action |
|---|---|
queued | Queued; continue polling. |
in_progress | Generating; continue polling. |
completed | Read metadata.url. |
failed | Read error and stop polling. |
status=completed and metadata.url is non-empty and downloadable (result_url holds the same value as a fallback). Result URLs expire—download or persist the video immediately upon completion. If a creation request times out or returns a transient 5xx, verify whether the task was already created before submitting a second task.9:16 and 16:9, durations under 3 seconds or over 15 seconds, reference audio, and Chat Completions parameters (messages, temperature, top_p, stream).| HTTP Status | Common Cause |
|---|---|
400 | Invalid parameters; querying a non-existent task also returns 400 with code set to task_not_exist |
401 | Missing or invalid API key |
403 | Insufficient balance/quota, or no permission for the requested model |
429 | Rate limit exceeded |
503 | Service temporarily unavailable |
500 / 502 | Transient service error |