# Veo 3.1 Fast Google DeepMind video generation with high fidelity and diverse styles. ## API Information - **Provider:** google - **Model Slug:** google/veo-3.1-fast/image-to-video - **Category:** image-to-video - **Status:** active - **Base Cost:** $0.01 per second - **List Price:** $0.10 per second - **Active Discount:** 90% off — already reflected in Base Cost above - **Estimated Processing Time:** 240 seconds ## Input Schema | Parameter | Type | Required | Default | Constraints | Description | |-----------|------|----------|---------|-------------|-------------| | prompt | string | Yes | animate this image | max 50000 chars | - | | image_url | string | Yes | https://assets.e2x.ai/uploads/0a2491b4-a2c1-444c-ae7c-95c6e9b0db38.png | - | - | | seed | integer | No | - | - | - | | aspect_ratio | string | No | 16:9 | 16:9, 9:16 | - | | resolution | string | No | 720p | 720p, 1080p, 4k | Resolution | | duration | string | No | 8 | 4, 6, 8 | Duration | | has_sound | string | No | true | false, true | Enable Sound | ### Parameter Details #### `resolution` - Type: `string` - Required: No - Description: Resolution #### `duration` - Type: `string` - Required: No - Description: Duration #### `has_sound` - Type: `string` - Required: No - Description: Enable Sound ## 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/veo-3.1-fast/image-to-video", "input": { "prompt": "animate this image", "image_url": "https://assets.e2x.ai/uploads/0a2491b4-a2c1-444c-ae7c-95c6e9b0db38.png" } }' ``` ## 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/veo-3.1-fast/image-to-video", "input": { "prompt": "animate this image", "image_url": "https://assets.e2x.ai/uploads/0a2491b4-a2c1-444c-ae7c-95c6e9b0db38.png", "seed": 1, "aspect_ratio": "16:9", "resolution": "720p", "duration": "8", "has_sound": "true" } }' ``` ## 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/veo-3.1-fast/image-to-video", "input": { "prompt": "animate this image", "image_url": "https://assets.e2x.ai/uploads/0a2491b4-a2c1-444c-ae7c-95c6e9b0db38.png", "seed": 1, "aspect_ratio": "16:9", "resolution": "720p", "duration": "8", "has_sound": "true" } }) }); 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`