Grok Imagine API: fal.ai's video-generation model, one key away
Grok Imagine via the ApexApi gateway
Grok Imagine guided by reference images rather than a single first frame, for holding a subject steady across a clip. Call it through ApexApi's unified, OpenAI-compatible API with one `ak-` key, alongside every other model in the catalog. Pricing is $0.060–$0.084/sec per second, billed pay-per-use from your credit balance with no subscription.
Grok Imagine is served through ApexApi's unified, OpenAI-compatible API. One key, one format, with smart routing and automatic failover. Provider: fal.ai.
Why Grok Imagine
AI video generation
Text-to-video (and image-to-video where supported) via a simple async job.
Per-second pricing ($0.060–$0.084/sec)
Pay only for what you generate from your credit balance. No subscription.
OpenAI-compatible
Drop-in with any OpenAI SDK. Change the base URL and key, keep your code.
Specifications
- Modality
- video
- Context window
- —
- Max output
- —
- Streaming
- —
- Tool / function calling
- —
- Vision input
- —
Grok Imagine pricing
- That makes it the 2nd cheapest of the 32 video models we serve, ranked on output price.
Getting started with Grok Imagine
OpenAI-compatible. Point your client at ApexApi, swap your key, and call it. No new SDK to learn.
import requests, time
job = requests.post(
"https://api.apexapi.dev/v1/videos/generations",
headers={"Authorization": "Bearer <YOUR_APEXAPI_KEY>"},
json={"model": "xai/grok-imagine-video/reference-to-video", "prompt": "A drone shot over a neon city at night", "duration": 5},
).json()
# Poll until the async job completes
while True:
res = requests.get(
f"https://api.apexapi.dev/v1/videos/generations/{job['id']}",
headers={"Authorization": "Bearer <YOUR_APEXAPI_KEY>"},
).json()
if res["status"] in ("completed", "failed"):
print(res)
break
time.sleep(3)Grok Imagine use cases
What teams build with Grok Imagine on ApexApi.
Short-form content
Generate clips for social, ads, and marketing.
Product & explainer
Turn prompts or images into motion for launches and demos.
Creative prototyping
Explore video concepts fast before a full production.
Grok Imagine vs other models
How it compares, and on ApexApi you can switch between any of them with a single string change, same key, same endpoint.
Grok Imagine vs Veo 3.1
Compare Grok Imagine against this model on price, capabilities, and latency. A/B them with a single key on ApexApi.
Learn more about Veo 3.1 API →Grok Imagine vs Seedance 2.0
Compare Grok Imagine against this model on price, capabilities, and latency. A/B them with a single key on ApexApi.
Learn more about Seedance 2.0 API →Grok Imagine API: FAQ
How do I call Grok Imagine through ApexApi?
Create an ApexApi key, point your client at https://api.apexapi.dev/v1, and POST to /v1/videos/generations with the model set to `xai/grok-imagine-video/reference-to-video`. The API is OpenAI-compatible, so an existing OpenAI SDK works once you change the base URL and key.
How much does Grok Imagine cost on ApexApi?
$0.060–$0.084/sec, billed per second with no subscription or minimum. The exact figure is shown before you generate, so nothing is charged against a price you have not seen.
What do I send to Grok Imagine?
This variant takes one or more reference images that fix the subject or style, plus a prompt. The other variants of the same model accept different inputs, so pick the slug that matches what you already have.
Ready to build with Grok Imagine?
One API key. Every major AI model. Pay only for what you use.
Get your API key, free to start