ToAPIsToAPIs
Gemini Omni Flash

Gemini Omni 1.2 Standard

Standard supports text-to-video and image-to-video at 4-15 seconds / 720p, with up to 5 reference images and first/last frame control.

POST
/v1/videos

Standard supports text-to-video and image-to-video at 4-15 seconds / 720p, with up to 5 reference images and first/last frame control.

Use your platform API key, not a supplier key. In mainland China, use https://toapis.cn as the Base URL.

Omni 1.1 Standard

Request parameters

Authorizationstringheaderrequired

Bearer YOUR_API_KEY

modelstringbodyrequired

gemini-omni-1.2-flash-preview

promptstringbodyrequired
Required video description.
durationintegerbodydefault: 10
Video duration 4-15 seconds, defaults to 10 when omitted.
resolutionstringbodydefault: 720p
720p
aspect_ratiostringbodydefault: 16:9
16:9 or 9:16, default 16:9.
image_urlsstring[]body
Up to 5 public image URLs, used as reference images.
first_image_urlstringbody
Public URL of the first frame image.
last_image_urlstringbody
Public URL of the last frame image.
Upload local media first to obtain public URLs. Do not send base64, data URIs, or local file paths. Video inputs are not supported.

Request examples

curl https://toapis.com/v1/videos \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-omni-1.2-flash-preview",
    "prompt": "A cinematic tracking shot through a sunlit city",
    "duration": 10,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/image.png"]
  }'

First/last frame example

curl https://toapis.com/v1/videos \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-omni-1.2-flash-preview",
    "prompt": "Generate a video from the first and last frames",
    "duration": 6,
    "first_image_url": "https://example.com/first.png",
    "last_image_url": "https://example.com/last.png"
  }'

Retrieve a task

Submission returns a platform task id. Poll GET /v1/videos/{id} and retrieve the video result on completion. Do not use supplier task IDs or supplier polling endpoints.

curl https://toapis.com/v1/videos/YOUR_TASK_ID \
  -H 'Authorization: Bearer YOUR_API_KEY'

responseExample

{
  "id": "vid_example",
  "object": "generation.task",
  "model": "gemini-omni-1.2-flash-preview",
  "status": "queued",
  "created_at": 1789600000
}