xai/grok-imagine-video 🖼️📝🔢❓ → 🖼️

⭐ Official ▶️ 101.6K runs 📅 Feb 2026 ⚙️ Cog 0.16.12
image-to-video image-to-video-with-audio text-to-video text-to-video-with-audio video-editing

About

Generate videos using xAI's Grok Imagine Video model

Example Output

Prompt:

"a penguin walks away from the camera, towards a large snowy mountaintop in the distance"

Output

Performance Metrics

31.79s Prediction Time
31.82s Total Time
All Input Parameters
{
  "prompt": "a penguin walks away from the camera, towards a large snowy mountaintop in the distance",
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}
Input Parameters
image Type: string
Input image to generate video from (image-to-video). Supports jpg, jpeg, png, webp.
video Type: string
Input video to edit (video editing mode). Must be a direct link, max 8.7 seconds. Supports mp4, mov, webm.
prompt (required) Type: string
Text prompt for video generation
duration Type: integerDefault: 5Range: 1 - 15
Duration of the video in seconds (1-15). Ignored when editing a video.
resolution Default: 720p
Resolution of the video. Ignored when editing a video.
aspect_ratio Default: auto
Aspect ratio of the video. For text-to-video, defaults to 16:9. For image-to-video, defaults to the input image's native aspect ratio. Ignored when editing a video.
Output Schema

Output

Type: stringFormat: uri

Example Execution Logs
Video generation submitted with request_id: 1cbc9ba4-5bef-56cf-ce2d-c073a354437d
First poll response: {"video": {"url": "https://vidgen.x.ai/xai-vidgen-bucket/xai-video-6722e3e7-ad5d-43b5-82e2-006caf4327d5.mp4", "duration": 5, "respect_moderation": true}, "model": "grok-imagine-video"}
Video generation completed in 30.5sec
Downloading 2566399 bytes
Downloaded 2.45MB in 0.47sec
Output video duration: 5.04 seconds
Version Details
Version ID
ee86ec3a213afbf7782408ca5377d90a3d36d9909ab380a603dfabd4859c8c6a
Version Created
February 26, 2026
Run on Replicate →