{ "model_id": "xai/grok-imagine-video-1.5-preview", "provider_id": "xai", "name": "Grok Imagine Video 1.5 Preview", "description": "xAI's next-generation video generation model. Generates, edits, and extends videos from text and image inputs. Supports multiple aspect ratios and resolutions with improved quality over the previous generation.", "task": "Image-to-Video", "tags": [ "Video Generation", "Image-to-Video", "Multimodal" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "@480p (per second)": 0.08, "@720p (per second)": 0.14, "Default (per second)": 0.08, "@1080p (per second)": 0.25 }, "examples": [ { "name": "Image to video", "description": "Image to video", "input": { "prompt": "Generate a slow and serene time-lapse", "image": { "url": "https://docs.x.ai/assets/api-examples/video/milkyway-still.png" }, "duration": 12 }, "output": { "video": "https://examples.aig.cloudflare.com/xai/grok-imagine-video-1.5-preview/image-to-video.mp4" }, "raw_response": { "state": "Completed", "result": { "video": "https://examples.aig.cloudflare.com/xai/grok-imagine-video-1.5-preview/image-to-video.mp4" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'xai/grok-imagine-video-1.5-preview',\n {\n prompt: 'Generate a slow and serene time-lapse',\n image: { url: 'https://docs.x.ai/assets/api-examples/video/milkyway-still.png' },\n duration: 12,\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"xai/grok-imagine-video-1.5-preview\",\n \"input\": {\n \"prompt\": \"Generate a slow and serene time-lapse\",\n \"image\": {\n \"url\": \"https://docs.x.ai/assets/api-examples/video/milkyway-still.png\"\n },\n \"duration\": 12\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": true, "zdr_comment": null, "external_info": "https://docs.x.ai/developers/models/grok-imagine-video", "terms": "https://x.ai/legal/terms-of-service", "cover_image_url": "https://pub-26f1392c1b674324be6786695bd72257.r2.dev/xai/grok-imagine-video-1.5-preview.png", "metadata": { "Aspect Ratios": "1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3", "Input Modalities": "Text, Image, Video", "Max Duration": "15 seconds", "Resolutions": "480p, 720p, 1080p" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "xai", "pricing": { "480p": 0.08, "720p": 0.14, "default": 0.08, "1080p": 0.25 } } ], "banner": null, "created_at": "2026-06-03 20:26:48", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "_operation": { "type": "string", "enum": [ "generate", "edit", "extend" ] }, "prompt": { "type": "string" }, "duration": { "type": "integer", "minimum": 1, "maximum": 15 }, "aspect_ratio": { "type": "string", "enum": [ "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3" ] }, "resolution": { "type": "string", "enum": [ "480p", "720p", "1080p" ] }, "size": { "type": "string", "enum": [ "848x480", "1696x960", "1280x720", "1920x1080" ] }, "image": { "type": "object", "properties": { "url": { "type": "string" } }, "required": [ "url" ], "additionalProperties": false }, "video": { "type": "object", "properties": { "url": { "type": "string" } }, "required": [ "url" ], "additionalProperties": false }, "reference_images": { "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" } }, "required": [ "url" ], "additionalProperties": false } }, "output": { "type": "object", "properties": { "upload_url": { "type": "string" } }, "required": [ "upload_url" ], "additionalProperties": false }, "user": { "type": "string" } }, "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "video": { "type": "string" } }, "required": [ "video" ], "additionalProperties": false } } }