Generate high-quality AI videos using xAI’s Grok Imagine model.

Model

xai/grok-imagine-video

Parameters

ParameterTypeRequiredDefaultAllowed ValuesDescription
promptstringYesVideo generation prompt
aspect_ratiostringNo"1:1""1:1", "2:3", "3:2", "9:16", "16:9"Output aspect ratio
durationintNo106, 10, 15Video duration in seconds
resolutionstringNo"720p""480p", "720p"Output resolution
image_urlstringNonullReference image URL (optional)
video_presetstringNo"custom""custom", "spicy", "fun", "normal"Generation style preset
Video presets:
PresetStyle
customDefault generation
spicyExtremely spicy/nsfw
funExtremely crazy/fun
normalNormal style

Example Request

Text to Video

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "xai/grok-imagine-video",
    "input": {
      "prompt": "A futuristic cityscape at sunset with flying cars",
      "duration": 10,
      "resolution": "720p",
      "aspect_ratio": "16:9",
      "video_preset": "custom"
    }
  }'

Image to Video

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "xai/grok-imagine-video",
    "input": {
      "prompt": "Camera slowly zooms in while clouds move across the sky",
      "image_url": "https://example.com/landscape.jpg",
      "duration": 6,
      "resolution": "720p",
      "aspect_ratio": "16:9"
    }
  }'

Response

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "pending"
  }
}

Pricing

DurationPrice
6s$0.18
10s$0.36
15s$0.46