# Omni Flash Google DeepMind's latest video generation with high fidelity and diverse styles. ## API Information - **Provider:** google - **Model Slug:** google/omni-flash/reference-to-video - **Category:** reference-to-video - **Status:** active - **Base Cost:** $0.10 per second - **List Price:** $0.20 per second - **Active Discount:** 50% off — already reflected in Base Cost above - **Estimated Processing Time:** 240 seconds ## Input Schema | Parameter | Type | Required | Default | Constraints | Description | |-----------|------|----------|---------|-------------|-------------| | resolution | string | No | 720p | 720p, 1080p, 4k | Resolution | | image_urls | array | Yes | - | items: 1-7 | Array of values | | aspect_ratio | string | No | 16:9 | 16:9, 9:16 | - | | seed | integer | No | - | - | - | | duration | string | No | 8 | 4, 6, 8, 10 | Duration | | prompt | string | Yes | animate this image | max 50000 chars | - | ### Parameter Details #### `resolution` - Type: `string` - Required: No - Description: Resolution #### `image_urls` - Type: `array` - Required: Yes #### `duration` - Type: `string` - Required: No - Description: Duration ## Required Parameters Example ```bash curl -X POST https://api.e2x.ai/v1/jobs/submit \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/omni-flash/reference-to-video", "input": { "image_urls": [ "YOUR_IMAGE_URLS_ITEM" ], "prompt": "animate this image" } }' ``` ## Full Example ```bash curl -X POST https://api.e2x.ai/v1/jobs/submit \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/omni-flash/reference-to-video", "input": { "resolution": "720p", "image_urls": [ "YOUR_IMAGE_URLS_ITEM" ], "aspect_ratio": "16:9", "seed": 1, "duration": "8", "prompt": "animate this image" } }' ``` ## JavaScript Fetch Example ```javascript const response = await fetch('https://api.e2x.ai/v1/jobs/submit', { method: 'POST', headers: { Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ "model": "google/omni-flash/reference-to-video", "input": { "resolution": "720p", "image_urls": [ "YOUR_IMAGE_URLS_ITEM" ], "aspect_ratio": "16:9", "seed": 1, "duration": "8", "prompt": "animate this image" } }) }); const result = await response.json(); console.log(result); ``` ## Output Schema ```json {} ``` ## Job Polling After submitting, poll for the job status: ```bash curl https://api.e2x.ai/v1/jobs/{JOB_ID} \ -H "Authorization: Bearer YOUR_API_KEY" ``` ### Status Values | Status | Description | |--------|-------------| | `pending` | Job submitted, waiting in queue | | `processing` | Job is being processed by a worker | | `completed` | Job finished - check `data.outputs[0].url` | | `failed` | Job failed - check `data.error.message` | | `cancelled` | Job was cancelled | ### Python Polling Example ```python import time, requests job_id = submit_response.json()["data"]["jobId"] while True: resp = requests.get(f"https://api.e2x.ai/v1/jobs/{job_id}", headers={"Authorization": "Bearer YOUR_API_KEY"}) data = resp.json()["data"] if data["status"] == "completed": print("Done!", data["outputs"][0]["url"]) break elif data["status"] == "failed": raise Exception(f"Job failed: {data['error']['message']}") time.sleep(2) ``` ## Usage Notes - All monetary values are in micro-cents (1,000,000 = $1 USD) - For structured parameters such as `elements` or `shots`, send real JSON arrays/objects, not quoted strings. - Use `webhookUrl` parameter in your submit request to receive completion callbacks instead of polling - API Base URL: `https://api.e2x.ai/v1`