Grok Imagine Video API
xAI's Grok Imagine video generation. Text or image to video, configurable 1–15s clips. $0.05/sec at 480p (default), $0.07/sec at 720p — official per-second rates, plus $0.002 per input image and a flat $0.001 per generation.
xai/grok-imagine-videoPOST /api/v1/videos/generationsfrom blockrun_llm import LLMClient
client = LLMClient() # uses BLOCKRUN_WALLET_KEY (never sent to server)
job = client.video_generate(
model="xai/grok-imagine-video",
prompt="a red apple slowly spinning on a wooden table",
duration_seconds=8,
image_url="https://example.com/seed.jpg", # optional
)
print(job["data"][0]["url"]) # MP4 URLimport { LLMClient } from "@blockrun/llm";
const client = new LLMClient({ privateKey: process.env.BASE_CHAIN_WALLET_KEY! });
const job = await client.videoGenerate({
model: "xai/grok-imagine-video",
prompt: "a red apple slowly spinning on a wooden table",
durationSeconds: 8,
imageUrl: "https://example.com/seed.jpg", // optional
});
console.log(job.data[0].url); // MP4 URL# 1. Submit (returns 402 first, sign EIP-3009 USDC TransferWithAuthorization)
curl -X POST https://blockrun.ai/api/v1/videos/generations \
-H "Content-Type: application/json" \
-H "x-payment: <signed-x402>" \
-d '{
"model": "xai/grok-imagine-video",
"prompt": "a red apple slowly spinning on a wooden table",
"duration_seconds": 8
}'
# 2. The returned id is opaque — poll the response's poll_url until completed:
curl -H "x-payment: <signed-x402>" \
"https://blockrun.ai/api/v1/videos/generations/<id>?model=xai/grok-imagine-video&duration=8"Try It — Video Generation
Type a prompt below and click Generate.
Output: downloadable MP4. Payment in USDC via x402 — no API key.
Connect your wallet to generate. Pay-per-call in USDC on Base via x402 — no API key needed.
About xAI Grok Imagine Video
Grok Imagine Video is a video model from xAI that generates a clip from a text prompt or a reference image. A default job is 8 seconds and the longest it will render is 15 seconds; it is billed by the second of generated video. It is served through BlockRun's video generation API, so it can be called without an account, an API key, or a subscription.
Use Grok Imagine Video for
- Short ads, product demos and social clips generated from a prompt
- Animating a still image or a product shot into motion
- Storyboards and previsualisation before a shoot
What it costs
Grok Imagine Video is billed by the length of the clip it produces. A default 8-second generation costs $0.402, settlement fee included, and the maximum supported length is 15 seconds. The exact price is quoted in the 402 before you pay. Generation is asynchronous: the API returns a job you poll, and the finished MP4 is mirrored to BlockRun storage so the URL does not expire.
Specifications
- Default duration
- 8 seconds
- Maximum duration
- 15 seconds
- Input modes
- Text-to-video and image-to-video
- Payment
- Pay-per-call USDC via x402
- Output hosting
- Permanent MP4 hosting on BlockRun
Calling it from your code
Pass xai/grok-imagine-video as the model field to the video generation endpoint. The response contains a job id; poll it until the clip is ready.
The first request returns a 402 carrying the exact price; a signed retry runs it, and client libraries fold the two into one call — how the payment works. See the documentation for request and response shapes, the AI Video Generator page for every model on this endpoint, or browse the full catalog of 90 chat models to compare alternatives.
Grok Imagine Video or another video model
The closest alternatives by price that do the same kind of work. Each is called on the same endpoint with the same request, so comparing two is a one-line change.
| Model | Price | Length |
|---|---|---|
| xAI Grok Imagine Video (this page) | $0.402 per 8s clip | up to 15s |
| ByteDance Seedance 2.0 Mini | $0.400 per 5s clip | up to 15s |
| OpenAI Sora 2 | $0.421 per 4s clip | up to 12s |
| ByteDance Seedance 1.5 Pro | $0.355 per 5s clip | up to 12s |
Grok Imagine Video API questions
How much does the Grok Imagine Video API cost?
A default 8-second clip costs $0.402, settlement fee included; longer clips cost more. The exact price is quoted in the 402 response before the job starts.
How long can a Grok Imagine Video video be?
Up to 15 seconds per generation. A job runs asynchronously: the request returns a job id, and you poll it until the clip is ready.
Can Grok Imagine Video turn an image into a video?
Yes. Send a reference image with the prompt and Grok Imagine Video animates it; text-only prompts work too.
Do I need an API key to use Grok Imagine Video?
No. Each request carries its own payment, so an agent or script can call Grok Imagine Video with no account and no key. Teams that prefer one can use an API key with card or invoice billing instead.
Other video models
Every model on BlockRun is reached through the same endpoint and the same payment flow, so switching is a one-line change to the model field. These are the closest alternatives to Grok Imagine Video:
- ByteDance Seedance 1.5 Pro$0.355 for 5s
- ByteDance Seedance 2.0 Fast$0.827 for 5s
- ByteDance Seedance 2.0 Mini$0.400 for 5s
- ByteDance Seedance 2.0 Pro$1.136 for 5s
- ByteDance Seedance 2.5$1.579 for 5s
- xAI Grok Imagine Video 1.5$0.642 for 8s
Two ways to run this
Get an API key
Sign in, get a key, and call the same endpoints with usage billed to your account. For teams that want one invoice instead of one wallet.
Get an API keyOr let your agent pay per call, in USDC
No account, no API key. Three steps, and the last one is the request this page is about.
- Point your agent at BlockRun
Install ClawRouter, or add the BlockRun MCP server to Claude Code, Cursor, Codex or OpenClaw. Any OpenAI-compatible client works too — change the base URL, nothing else.
curl -fsSL https://blockrun.ai/ClawRouter-update | bash - Fund a wallet with USDC
Send USDC to a wallet on Base, Solana or Arc. There is no account to create and no API key to issue: the wallet is the account, and it pays per call.
- Call Grok Imagine Video
The first call returns HTTP 402 with the exact price, your agent signs it, and the answer comes back. Payment settles on-chain; nothing is charged if the call fails.
curl -X POST https://blockrun.ai/api/v1/videos/generations \ -H "Content-Type: application/json" \ -d '{"model": "xai/grok-imagine-video", "prompt": "a cat on a skateboard"}'
Explore everything on BlockRun
- GPT-6 Astra
- GPT-6.1 Sol
- GPT-6 Sol
- GPT-6 Luna
- GPT-5.6 Sol
- GPT-5.6 Terra
- GPT-5.6 Luna
- GPT-5.6 Sol Pro
- GPT-5.6 Terra Pro
- GPT-5.6 Luna Pro
- GPT-5.5
- GPT-5.5 Pro
- ChatGPT Instant (GPT-5.5)
- GPT-5.4
- GPT-5.4 Pro
- GPT-5.1
- GPT-5.2
- GPT-5.4 Mini
- GPT-5 Mini
- GPT-5.4 Nano
- GPT-5.2 Pro
- GPT-5.3 Codex
- GPT-4.1
- GPT-4.1 Mini
- GPT-4.1 Nano
- GPT-4o
- GPT-4o Mini
- o1
- o3
- o3-mini
- All models →