Getting started

Quick start

Five steps. You will have your first Grok Imagine v1.0 result in the next minute.

  1. Sign up for a fal key. Create one at fal.ai/dashboard/keys. Copy it now; you will not see it again.
  2. Export it. export FAL_KEY=fal_... in your shell, or add it to a .env.local. Never commit it.
  3. Pick a snippet. The three below hit the same endpoint (xai/grok-imagine-video/text-to-video) with a minimal input derived from the default parameter set.
  4. Run it. The first call takes a few seconds; subsequent ones are faster. You get a response URL pointing at a video.
  5. Iterate. Try the playground to see a chat-style interface, or jump to the API reference for every parameter.
First call
$cat example.sh
BASH
1curl -X POST "https://queue.fal.run/xai/grok-imagine-video/text-to-video" \
2 -H "Authorization: Key $FAL_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{"prompt":"Dusk on a Brooklyn rooftop, string lights flickering. A woman in a denim jack...","duration":6,"resolution":"720p","aspect_ratio":"16:9"}'
Also reading