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

Model

xai/grok-imagine

Parameters

ParameterTypeRequiredDefaultDescription
promptstringYes-Text description of the video to generate
image_urlstringNonullOptional start image reference URL
durationnumberNo3Video duration in seconds: 1, 3, 6, 9, 12, 15
resolutionstringNo”720p”Output resolution: 480p, 720p
aspect_ratiostringNo”16:9”Aspect ratio: 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9
seednumberNorandomSeed value for reproducibility

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",
    "input": {
      "prompt": "A futuristic cityscape at sunset with flying cars",
      "duration": 6,
      "resolution": "720p",
      "aspect_ratio": "16:9"
    }
  }'

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",
    "input": {
      "prompt": "Camera slowly zooms in while clouds move across the sky",
      "image_url": "https://example.com/landscape.jpg",
      "duration": 9,
      "resolution": "720p",
      "aspect_ratio": "16:9",
      "seed": 123456
    }
  }'

Response

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

Pricing

DurationPrice
1s$0.04
3s$0.10
6s$0.18
9s$0.28
12s$0.36
15s$0.46