xAI

Grok Imagine Video

AI Video Generation Model

xAI's video generation model based on the Aurora architecture, supporting text-to-video, image-to-video, and video editing with native audio-visual synthesis at up to 720p

grok-video API Async video generation

Base URL
https://api.lumenfall.ai/v1
Model
grok-imagine-video

Text to Video Generate

Submit a prompt, poll for the result, and download the video

# Step 1: Submit video generation request
VIDEO_ID=$(curl -s -X POST \
  https://api.lumenfall.ai/v1/videos \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-video",
    "prompt": "A serene mountain landscape at sunset",
    "size": "1024x1024"
  }' | jq -r '.id')
echo "Video ID: $VIDEO_ID"
# Step 2: Poll for completion
while true; do
  RESULT=$(curl -s \
    https://api.lumenfall.ai/v1/videos/$VIDEO_ID \
    -H "Authorization: Bearer $LUMENFALL_API_KEY")
  STATUS=$(echo $RESULT | jq -r '.status')
  echo "Status: $STATUS"
  if [ "$STATUS" = "completed" ]; then
    echo $RESULT | jq -r '.output.url'
    break
  elif [ "$STATUS" = "failed" ]; then
    echo $RESULT | jq -r '.error.message'
    break
  fi
  sleep 5
done