# OpenRouter APIs — Google: Gemini Omni 1.2 Flash (google/gemini-omni-1.2-flash) Guide for calling every confirmed OpenRouter API that serves `google/gemini-omni-1.2-flash`. Model page: https://openrouter.ai/google/gemini-omni-1.2-flash Create an API key: https://openrouter.ai/settings/keys ## Pricing Standard-variant prices for `google/gemini-omni-1.2-flash`, per provider, in the unit each provider bills (tokens, images, seconds of video, or characters of audio). Pay-as-you-go with no markup on the provider's price. - Google AI Studio: $1.50/M tokens input, $9/M tokens output (plus 1 more; see the model page for the full price list) Full price table, including other variants and per-request charges: https://openrouter.ai/google/gemini-omni-1.2-flash How OpenRouter prices requests: https://openrouter.ai/pricing ## EU in-region routing `google/gemini-omni-1.2-flash` is not currently available through EU in-region routing. Docs: https://openrouter.ai/docs/guides/features/in-region-routing ## Authentication Send this header with every request: - Authorization: Bearer $OPENROUTER_API_KEY ## Text / Chat Completions API Generate text with `google/gemini-omni-1.2-flash` through OpenRouter's Chat Completions API. Docs: https://openrouter.ai/docs/api/api-reference/chat/create-a-chat-completion ### Endpoint POST https://openrouter.ai/api/v1/chat/completions Headers: - Content-Type: application/json ### Request fields (google/gemini-omni-1.2-flash) - model: string (required) — `"google/gemini-omni-1.2-flash"` - messages: array (required) — ordered conversation messages with `role` and `content` - stream: boolean (optional) — return Server-Sent Events as tokens are generated - max_tokens: optional — accepted by this model; see the API reference for its value shape - reasoning: optional — accepted by this model; see the API reference for its value shape - reasoning_effort: optional — accepted by this model; see the API reference for its value shape - seed: optional — accepted by this model; see the API reference for its value shape - temperature: optional — accepted by this model; see the API reference for its value shape - top_p: optional — accepted by this model; see the API reference for its value shape The model-specific optional fields above come from this model's advertised capabilities. `stream` and `provider` routing preferences are API controls accepted independently of that model capability list. ### Response Without `stream`, the response is a Chat Completions JSON object: ```json { "id": "gen-abc123", "choices": [{ "message": { "role": "assistant", "content": "..." } }], "usage": { "prompt_tokens": 12, "completion_tokens": 24, "total_tokens": 36, "cost": 0.001 } } ``` With `stream: true`, the response is `text/event-stream`: read each `data:` JSON chunk until `data: [DONE]`. The final usage chunk carries token counts and cost when usage is requested. ### Examples #### Chat completion ```bash curl -X POST https://openrouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer $OPENROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemini-omni-1.2-flash", "messages": [ { "role": "user", "content": "What is the meaning of life?" } ] }' ``` ### Error differences - 400 — malformed messages or a parameter this model does not support - 502 — the upstream text generation failed ## Video API Generate videos with `google/gemini-omni-1.2-flash` through OpenRouter's Video API. Docs: https://openrouter.ai/docs/guides/overview/multimodal/video-generation Model discovery API: https://openrouter.ai/api/v1/videos/models ### Endpoint POST https://openrouter.ai/api/v1/videos Headers: - Content-Type: application/json Generation is asynchronous: the submit call returns a job, which is polled until it finishes. The finished video is downloaded from the job, not returned inline. ### Request fields (google/gemini-omni-1.2-flash) - model: string (required) — `"google/gemini-omni-1.2-flash"` - prompt: string (optional when frame_images is set, otherwise required) — text description of the desired video - duration: 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 (optional) — length of the video in seconds - size: "1280x720" | "720x1280" | "1920x1080" | "1080x1920" | "3840x2160" | "2160x3840" | "640x360" | "360x640" (optional) — exact pixel dimensions, as WIDTHxHEIGHT - resolution: "720p" | "1080p" | "4K" | "360p" (optional) — resolution tier; interchangeable with size when paired with aspect_ratio - aspect_ratio: "16:9" | "9:16" (optional) — aspect ratio of the generated video - frame_images: array of frame references (optional) — images to condition the named frame on, as `{ "type": "image_url", "image_url": { "url": "…" }, "frame_type": "first_frame" }` entries; frame_type is one of "first_frame" | "last_frame", and the url is an https URL or a base64 data URL - input_references: array of reference assets (optional) — images to guide the generation, as `{ "type": "image_url", "image_url": { "url": "…" } }` entries - generate_audio: boolean (optional) — generate audio alongside the video - seed: integer (optional) — sample deterministically; determinism is not guaranteed for every provider - callback_url: string (optional) — https URL notified by webhook when the job finishes, instead of polling These are the generation parameters this model accepts between its providers; an unlisted value is rejected, and a listed one can still be refused by whichever provider serves the call. `provider` (routing preferences) is accepted on every request. ### Response The submit call returns `202` with the job: ```json { "id": "job-abc123", "generation_id": "gen-xyz789", "polling_url": "/api/v1/videos/job-abc123", "status": "pending" } ``` Poll `GET https://openrouter.ai/api/v1/videos/{id}` with the same Authorization header while `status` is `pending` or `in_progress`, and stop once it is `completed`, `failed`, `cancelled`, or `expired`: ```json { "id": "job-abc123", "status": "completed", "unsigned_urls": ["https://storage.example.com/video.mp4"], "usage": { "cost": 0.5 } } ``` Download the bytes from `GET https://openrouter.ai/api/v1/videos/{id}/content` (`?index=N` selects a clip when the job produced more than one). `usage.cost` is the USD charge for the call. ### Examples #### Text to Video ```bash curl -X POST https://openrouter.ai/api/v1/videos \ -H "Authorization: Bearer $OPENROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemini-omni-1.2-flash", "prompt": "a slow cinematic push-in on a glowing neon sign that reads \"OpenRouter\" in the window of a cozy coffee shop on a rainy night, rain streaking down the glass, reflections rippling on wet pavement", "duration": 5, "aspect_ratio": "16:9" }' ``` ### Error differences - 404 also covers an unknown video job - 500 — the job could not be submitted A job that fails after acceptance reports `status: "failed"` with an `error` message rather than an HTTP error, since the submit call already succeeded. ## Errors Failures return `{"error": {"code": , "message": }}` with the HTTP status: - 400 — malformed request or an unsupported parameter - 401 — missing or invalid API key - 402 — insufficient credits - 403 — spend limit reached, key disabled, or access blocked - 404 — unknown model or no provider can serve the request - 429 — rate limited; retry with backoff - 502 — the operation failed upstream; failed generations are not billed --- Canonical version of this document: https://openrouter.ai/google/gemini-omni-1.2-flash/llms.txt