grok_image_to_video
Generate an animated video from a reference image by describing the motion. Provide an image URL and optional prompt to control the animation.
Instructions
Generate AI video from a reference image using Grok Imagine.
This animates your input image into a video clip. Provide a prompt to
describe the motion you want, and optional reference images to guide style.
Use this when:
- You have a specific image you want to animate
- You want consistent visual style from a reference
- You want to turn a still photo into a short video
For video generation from text only, use grok_text_to_video instead.
Returns:
Task ID and generated video information including URLs and state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Grok Imagine model. 'grok-imagine-video' (default) supports image-to-video at a lower price. 'grok-imagine-video-1.5-preview' is image-to-video only and may offer higher fidelity. | grok-imagine-video |
| prompt | No | Optional description of the motion/action to apply to the image. Examples: 'The camera slowly zooms in as the character smiles', 'Gentle wind moves the trees and clouds drift across the sky'. Optional when an image_url is provided. | |
| duration | No | Video duration in seconds (default 8). grok-imagine-video supports 1-30; grok-imagine-video-1.5-preview supports 1-15. | |
| image_url | Yes | URL of the input image to animate into a video. Required for image-to-video generation. | |
| resolution | No | Output resolution. '480p' (default, cheaper), '720p', or '1080p' (higher quality, costs more credits per second for grok-imagine-video-1.5-preview). | 480p |
| aspect_ratio | No | Video aspect ratio. Should typically match your input image aspect ratio for best results. | 16:9 |
| callback_url | No | Optional URL to receive a POST callback when generation completes. | |
| reference_image_urls | No | Optional list of additional reference image URLs used to guide the style or content of the generated video. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |