# Gemini Omni Flash 1.2 API Google’s updated omni-modal Flash video model with native sound, 3–15 s (up to 10 s with an end frame), 360p up to 4K, closer reference following. Base URL: https://01router.com/api/v1 Model ID: gemini-omni-flash-1.2 Documentation: https://01router.com/gateway/gemini-omni-flash-1.2#api ## Quick start Set API_KEY to your project key, then run a sample from your server. Replace example media URLs with your own public URLs. ```bash export API_KEY="YOUR_API_KEY" curl "https://01router.com/api/v1/generations" \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ --data-binary @- <<'JSON' { "model": "gemini-omni-flash-1.2", "input": { "prompt": "A cinematic shot of a red fox running through snow", "duration": 8, "resolution": "720p", "aspect_ratio": "16:9" } } JSON ``` ## Endpoints | Method | Path | Authentication | Description | | --- | --- | --- | --- | | POST | /api/v1/generations | API key required | Create a generation (charges credits) | | GET | /api/v1/generations/{id} | API key required | Get a generation; polls the provider while running | | POST | /api/v1/generations/{id}/cancel | API key required | Cancel a running generation (credits refunded) | | POST | /api/v1/quote | Public · no key | Price a request on every provider (no charge, no key needed) | | GET | /api/v1/prompts?model=gemini-omni-flash-1.2&locale=en&page=1 | Public · no key | Prompt list, model categories and filters | | GET | /api/v1/prompts/{id} | Public · no key | Prompt details | | GET | /api/v1/models/gemini-omni-flash-1.2 | Public · no key | Get one model | ## Authentication Send your API key as a Bearer token. Requests are billed to the key owner's credits. `Authorization: Bearer ` ## Input Send JSON with Content-Type: application/json. Model parameters belong inside input; model, provider and callback_url are top-level fields. | Name | Type | Required | Description | | --- | --- | --- | --- | | model | string | Yes | "gemini-omni-flash-1.2" | | provider | string | No | Pin a provider; omit to auto-route to the cheapest. One of: fal \| 01router \| wavespeed \| kie \| apimart \| evolink \| atlascloud | | input | object | Yes | Model parameters, see the input fields below. | | callback_url | string | No | Optional public HTTPS webhook URL. The final task result is signed and delivered here; polling remains available. | ### input Required fields are marked explicitly. Other fields use the listed defaults when omitted. | Name | Type | Required | Description | Default | | --- | --- | --- | --- | --- | | input.prompt | string | Yes | Prompt | — | | input.image_url | string | No | Optional start image (image-to-video) | — | | input.end_image_url | string | No | Last frame | — | | input.image_urls | string[] | No | Reference-to-video images; cite them in the prompt as the model documents; maxItems: 10 | — | | input.duration | integer | No | Duration (s); min: 3; max: 15 | 8 | | input.resolution | string | No | Resolution; options: ["360p","720p","1080p","4k"] | "720p" | | input.aspect_ratio | string | No | Aspect ratio; options: ["16:9","9:16"] | "16:9" | Auto-routing chooses a provider that supports the request. Select a provider to see its input constraints and pinned request examples. ### Provider parameters, prices and billing ```json [ { "provider": "fal", "params": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "prices": [ { "unit": "second", "conditions": { "resolution": "360p" }, "priceMicros": 25935, "originalMicros": 27300, "credits": 3 }, { "unit": "second", "conditions": { "resolution": "720p" }, "priceMicros": 77805, "originalMicros": 81900, "credits": 8 }, { "unit": "second", "conditions": { "resolution": "1080p" }, "priceMicros": 116755, "originalMicros": 122900, "credits": 12 }, { "unit": "second", "conditions": { "resolution": "4k" }, "priceMicros": 233415, "originalMicros": 245700, "credits": 24 } ], "billing": { "version": 1, "priceScope": "gateway", "creditsPerUsd": 100, "modelParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "videoFirstOnly": false, "videoRoutes": [ { "when": { "mode": "reference" }, "firstOnly": false, "free": false } ] } }, { "provider": "01router", "params": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "prices": [ { "unit": "second", "conditions": { "resolution": "360p" }, "priceMicros": 19000, "originalMicros": null, "credits": 2 }, { "unit": "second", "conditions": { "resolution": "720p" }, "priceMicros": 42750, "originalMicros": null, "credits": 5 }, { "unit": "second", "conditions": { "resolution": "1080p" }, "priceMicros": 47500, "originalMicros": null, "credits": 5 }, { "unit": "second", "conditions": { "resolution": "4k" }, "priceMicros": 104500, "originalMicros": null, "credits": 11 } ], "billing": { "version": 1, "priceScope": "gateway", "creditsPerUsd": 100, "modelParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "videoFirstOnly": false, "videoRoutes": [], "upstreamParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ] } }, { "provider": "wavespeed", "params": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "prices": [ { "unit": "second", "conditions": { "resolution": "360p" }, "priceMicros": 21850, "originalMicros": 23000, "credits": 3 }, { "unit": "second", "conditions": { "resolution": "720p" }, "priceMicros": 66500, "originalMicros": 70000, "credits": 7 }, { "unit": "second", "conditions": { "resolution": "1080p" }, "priceMicros": 99750, "originalMicros": 105000, "credits": 10 }, { "unit": "second", "conditions": { "resolution": "4k" }, "priceMicros": 199500, "originalMicros": 210000, "credits": 20 } ], "billing": { "version": 1, "priceScope": "gateway", "creditsPerUsd": 100, "modelParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "videoFirstOnly": false, "videoRoutes": [ { "when": { "mode": "reference" }, "firstOnly": false, "free": false } ] } }, { "provider": "kie", "params": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "prices": [ { "unit": "second", "conditions": { "resolution": "360p" }, "priceMicros": 19000, "originalMicros": 20000, "credits": 2 }, { "unit": "second", "conditions": { "resolution": "720p" }, "priceMicros": 42750, "originalMicros": 45000, "credits": 5 }, { "unit": "second", "conditions": { "resolution": "1080p" }, "priceMicros": 47500, "originalMicros": 50000, "credits": 5 }, { "unit": "second", "conditions": { "resolution": "4k" }, "priceMicros": 104500, "originalMicros": 110000, "credits": 11 } ], "billing": { "version": 1, "priceScope": "gateway", "creditsPerUsd": 100, "modelParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "videoFirstOnly": false, "videoRoutes": [] } }, { "provider": "apimart", "params": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "prices": [ { "unit": "second", "conditions": { "resolution": "360p" }, "priceMicros": 19000, "originalMicros": 20000, "credits": 2 }, { "unit": "second", "conditions": { "resolution": "720p" }, "priceMicros": 57000, "originalMicros": 60000, "credits": 6 }, { "unit": "second", "conditions": { "resolution": "1080p" }, "priceMicros": 85880, "originalMicros": 90400, "credits": 9 }, { "unit": "second", "conditions": { "resolution": "4k" }, "priceMicros": 171760, "originalMicros": 180800, "credits": 18 } ], "billing": { "version": 1, "priceScope": "gateway", "creditsPerUsd": 100, "modelParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "videoFirstOnly": false, "videoRoutes": [] } }, { "provider": "evolink", "params": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "720p" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "prices": [ { "unit": "second", "conditions": { "resolution": "720p" }, "priceMicros": 62700, "originalMicros": 66000, "credits": 7 } ], "billing": { "version": 1, "priceScope": "gateway", "creditsPerUsd": 100, "modelParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "videoFirstOnly": false, "videoRoutes": [] } }, { "provider": "atlascloud", "params": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "prices": [ { "unit": "second", "conditions": { "resolution": "360p" }, "priceMicros": 21470, "originalMicros": 22600, "credits": 3 }, { "unit": "second", "conditions": { "resolution": "720p" }, "priceMicros": 56620, "originalMicros": 59600, "credits": 6 }, { "unit": "second", "conditions": { "resolution": "1080p" }, "priceMicros": 83030, "originalMicros": 87400, "credits": 9 }, { "unit": "second", "conditions": { "resolution": "4k" }, "priceMicros": 162260, "originalMicros": 170800, "credits": 17 } ], "billing": { "version": 1, "priceScope": "gateway", "creditsPerUsd": 100, "modelParams": [ { "name": "prompt", "type": "text", "label": "Prompt", "required": true }, { "name": "image_url", "type": "image", "label": "First frame", "description": "Optional start image (image-to-video)" }, { "name": "end_image_url", "type": "image", "label": "Last frame" }, { "name": "image_urls", "type": "images", "label": "Reference images", "description": "Reference-to-video images; cite them in the prompt as the model documents", "maxItems": 10, "mode": "reference" }, { "name": "duration", "type": "integer", "label": "Duration (s)", "min": 3, "max": 15, "default": 8 }, { "name": "resolution", "type": "enum", "label": "Resolution", "options": [ "360p", "720p", "1080p", "4k" ], "default": "720p" }, { "name": "aspect_ratio", "type": "enum", "label": "Aspect ratio", "options": [ "16:9", "9:16" ], "default": "16:9" } ], "videoFirstOnly": false, "videoRoutes": [] } } ] ``` ## Output Creating a task does not mean generation has finished. Keep its id, poll until succeeded or failed, then read outputs or error. Amounts below are illustrative; actual charges depend on the request. | Name | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | Generation ID. Use it to query or cancel this task. | | object | string | Yes | generation | | model | string | Yes | gemini-omni-flash-1.2 | | type | string | Yes | video | | provider | string | Yes | Provider | | status | string | Yes | queued → processing → succeeded / failed. Stop polling at either terminal state. | | input | object | Yes | Model parameters, see the input fields below. | | outputs | string[] | Yes | Result URLs. Empty while processing; read after succeeded and save the files promptly. | | error | string \| null | Yes | Failure reason, or null when no failure is reported. | | credits | number | Yes | Credits charged for this request. | | price_usd | number | Yes | Request price in USD. | | created_at | string | Yes | Creation time in ISO 8601 format. | | completed_at | string \| null | Yes | Completion time in ISO 8601 format; null before completion. | ### Task submitted ```json { "id": "gen_example", "object": "generation", "model": "gemini-omni-flash-1.2", "type": "video", "provider": "fal", "status": "processing", "input": { "prompt": "A cinematic shot of a red fox running through snow", "duration": 8, "resolution": "720p", "aspect_ratio": "16:9" }, "outputs": [], "error": null, "credits": 0, "price_usd": 0, "created_at": "2026-10-25T08:00:00.000Z", "completed_at": null } ``` ### Task completed ```json { "id": "gen_example", "object": "generation", "model": "gemini-omni-flash-1.2", "type": "video", "provider": "fal", "status": "succeeded", "input": { "prompt": "A cinematic shot of a red fox running through snow", "duration": 8, "resolution": "720p", "aspect_ratio": "16:9" }, "outputs": [ "https://example.com/output.mp4" ], "error": null, "credits": 0, "price_usd": 0, "created_at": "2026-10-25T08:00:00.000Z", "completed_at": "2026-10-25T08:01:00.000Z" } ``` ## Get the result Poll every few seconds until status is succeeded or failed. Output URLs are provider-hosted and may expire — download them promptly. Or pass callback_url to get the result pushed. ```bash curl "https://01router.com/api/v1/generations/GENERATION_ID" -H "Authorization: Bearer $API_KEY" ``` ## Cancel a task Cancellation depends on provider support and task state. A confirmed cancellation returns status: failed and error: Canceled by user. Unsupported or completed tasks return 409 not_cancelable. ```bash curl -X POST "https://01router.com/api/v1/generations/GENERATION_ID/cancel" -H "Authorization: Bearer $API_KEY" ``` ## Quote Choose API quotes or frontend quotes: the API returns costs for currently available providers; frontend quotes read prices and billing fields from models and recalculate locally when inputs change. ### API quotes ```bash curl "https://01router.com/api/v1/quote" -H "Content-Type: application/json" --data-binary @- <<'JSON' { "model": "gemini-omni-flash-1.2", "input": { "prompt": "A cinematic shot of a red fox running through snow", "duration": 8, "resolution": "720p", "aspect_ratio": "16:9" } } JSON ``` ### Frontend quotes Read prices: request GET /api/v1/models, optionally filtering by type. In the standard catalog, select a model by slug from data, then a channel from providers, and read that channel’s prices, params and billing. For GET /api/v1/models?project=PROJECT_ID, read these fields directly from the selected model in data. Reads are public and require no API key; project catalogs enforce their configured domain restrictions for cross-origin access. Project prices: billing.priceScope=project means unit prices already include the resale ratio; do not apply it again. billing.creditsPerUsd=null, so these prices cannot determine gateway credits. POST /quote returns gateway prices and credits even with project supplied; it excludes project resale markup. ```text catalog ← GET /api/v1/models (add project for a project catalog) source ← selected model’s provider; for a project, select the model directly input ← validate, apply defaults and derive mode using params and billing rule ← match prices conditions; for tokens, select context tiers quantity ← derive from unit and input; use billing.metering for audio holds total micros ← ordinary: round(unit price × quantity); tokens: ceil(input cost + output cost) dollars ← total micros / 1,000,000 credits ← if creditsPerUsd is non-null: max(1, ceil(dollars × creditsPerUsd - 1e-9)) Display estimate; recalculate locally on input changes without calling /quote ``` Fields: https://01router.com/docs/models Calculation rules: https://01router.com/docs/quote ## Prompt API Public read-only endpoints: no API key or credits required. Browse published examples for active models using combined model, source and scene filters. ```bash curl "https://01router.com/api/v1/prompts?model=gemini-omni-flash-1.2&locale=en&page=1" curl "https://01router.com/api/v1/prompts/PROMPT_ID?locale=en" ``` Use modelSlug and prompt to construct the request body below for POST /generations. Generation still requires an API key and incurs model charges. Query GET /models/gemini-omni-flash-1.2 for any additional required inputs. ## Callbacks Optional public HTTPS webhook URL. The final task result is signed and delivered here; polling remains available. See https://01router.com/docs/callback for signature verification. ## Errors Check the HTTP status and error.message. Fix the request before retrying validation or authentication errors. A failed generation is reported in status and error on the task itself. ```json { "error": { "message": "Invalid or missing API key", "code": "unauthorized" } } ``` HTTP 400: invalid request; 401: unauthorized; 402: insufficient credits; 404: not found; 409: not cancelable; 429: rate/concurrency/quota limit; 5xx: upstream/server error. Full API reference: https://01router.com/docs/errors