Grok Imagine (Image-to-Video)

xAI Grok Imagine video generation. Text-to-video and image-to-video, 6-30s, 480p / 720p. · xai

All models
Parameters

0-based image index when using task_id (Grok generates 6 images per task).

Text prompt describing the desired video motion. Reference uploaded images via @image1, @image2, etc.

task_id from a previous grok-imagine text-to-image generation. Mutually exclusive with image_urls. Supports Spicy mode.

Video length in seconds.

External image URLs (JPEG/PNG/WEBP, max 10MB each, up to 7 images). Mutually exclusive with task_id. Spicy mode not supported with external images.

Only applies to multi-image inputs; single-image mode follows the source image aspect ratio.

Enable content filtering. Set to false to disable.

Pricing
14.399999999999999credits
6s
Per second2.4 credits/s
Result

Configure parameters and click Run to test the API.

Code Example
curl -X POST https://aivideoapi.ai/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-imagine-image-to-video",
  "input": {
    "mode": "normal",
    "index": 0,
    "duration": 6,
    "resolution": "480p",
    "aspect_ratio": "2:3",
    "nsfw_checker": true
  }
}'