NezhaGateNezhaGate
gemini-omni-flash

Gemini Omni Flash · API

POST https://nezhagate.com/v1/videos/generations

Gemini Omni Flash video generation (async): Google's next-generation video model. One endpoint, parameters pick the mode - no image is text-to-video, one image (image) is the first frame, two images (images) are first + last frame, and image_role=reference makes 1-3 images subject / style references. duration=6 / 8 / 10 seconds, resolution=720P / 1080P, size=16:9 / 9:16, native audio, and strong at following a storyboard across several shots. Returns a job id (HTTP 202); poll GET /v1/videos/jobs/{id} until status=succeeded, result in data[0].url (a re-hosted mp4 kept for 60 days). Billed per second at $0.05/s ($0.30 / $0.40 / $0.50), the same at both resolutions; fully refunded on failure.

Try in Playground →

Authentication

Header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Create an API Key in the console to start.

Request body

ParameterTypeRequiredDescription
model string Yes Model ID, here gemini-omni-flash.
prompt string Yes Text prompt describing the video, camera and motion, up to 20000 characters (Chinese and English count the same). With reference images you can point at them as @Image1 / @Image2 in the prompt.
duration integer No Length: 6 / 8 / 10 seconds (default 6); alias seconds. Billed per second at $0.05/s, i.e. $0.30 / $0.40 / $0.50.
resolution string No Resolution: 720P / 1080P (default 720P), both at the same rate.
size string No Aspect ratio: 16:9 (default) / 9:16; alias aspect_ratio. Other ratios are refused.
audio boolean No This model always generates native audio; the parameter can be omitted (false is rejected).
image string No One reference image (public URL, data: URI or base64): image-to-video with it as the first frame. Send no image for text-to-video.
images array No Up to 3 images (each up to 16 MB, jpg / png / webp / gif). image_role=first_frame (the default for 1-2 images): image 1 is the first frame and image 2 the last frame. image_role=reference: 1-3 subject / style references that are not used as frames; 3 images default to reference. Alias reference_images (implies reference). Exceeding the cap is rejected, never truncated.
image_role string No How the images are used: first_frame (first frame; with two images the second is the last frame) or reference (subject / style references). Omitted: 1-2 images mean first_frame, 3 mean reference.

Request example

cURL
# 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": "gemini-omni-flash", "prompt": "a paper crane unfolding over a misty lake", "duration": 8, "resolution": "720P", "size": "16:9"}'
# first frame: also pass  "image": "https://example.com/first-frame.png"
# first + last frame: "images": ["https://example.com/first.png", "https://example.com/last.png"]
# 1-3 references: "images": [...], "image_role": "reference"
# 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

200 · JSON
{
  "id": "img_3f9a...c2",
  "object": "video.generation.job",
  "status": "queued",
  "model": "gemini-omni-flash"
}

Async video job (submit → poll)

Submitting returns HTTP 202 and a job id right away; poll until status=succeeded and read data[0].url (an mp4 link). The allowed duration, resolution and size values are in the parameter table above; add an image param for image-to-video.

curl · submit (text-to-video)
curl https://nezhagate.com/v1/videos/generations -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"model": "gemini-omni-flash", "prompt": "a cat surfing at sunset", "size": "16:9"}'
Image-to-video: also pass an image param (first-frame reference: a public URL, a data: URI, or base64).
First + last frame: pass two images in images (first, then last). References: pass 1-3 images with "image_role": "reference"; the people or style in them appear in the video without being used as a frame.
Response Example
{ "id": "img_3f9a...c2", "object": "video.generation.job", "status": "queued", "model": "gemini-omni-flash" }
curl · poll
curl https://nezhagate.com/v1/videos/jobs/img_3f9a...c2 -H 'Authorization: Bearer YOUR_API_KEY'
Response Example
{
  "id": "img_3f9a...c2",
  "object": "video.generation.job",
  "status": "succeeded",
  "model": "gemini-omni-flash",
  "data": [{ "url": "https://img.nezhagate.com/i/9f86d081a8....mp4" }]
}

🕑 data[0].url is a link on our image host that is kept for 60 days and then deleted automatically; to keep using it, download it and store it on your own storage or CDN.

Billed per second ($0.05/s x duration); the hold equals the settle exactly, and a failed or timed-out render is refunded in full automatically.

Error codes

Every error body carries error.message / error.type / error.code / error.param - branch on code; the full list is in the integration guide.

HTTPcodeDescription
401invalid_api_keyAPI Key missing or invalid
402insufficient_quotaInsufficient balance or Key over quota
400invalid_requestUnsupported model or parameter
429rate_limit_exceededUpstream rate limit
502upstream_errorAll upstream routes failed