Grok Imagine Video API

x-ai/grok-imagine-video
Generate videos from images using xAI's Grok Imagine Video model via AIML API.
Output
$0.065 / sec (variable)
Released
Jun 1, 2026

Overview

What exactly is Grok Imagine Video?
Grok Imagine Video is xAI's image-to-video generation model that animates static images into short video clips using a text motion prompt. It is the production-ready predecessor to the 1.5 Preview release — stable, cost-efficient, and well-suited for workflows that require consistent video output at scale.

API Pricing
* Video generation: $0.065 / second of generated video

Architecture: what makes it work
Image-anchored generationThe source image defines the visual starting state of the video. The model generates subsequent frames conditioned on both the image embedding and the text prompt, maintaining subject identity and scene composition throughout the clip.

Motion-aware decodingFrame transitions are computed to reflect physically plausible motion — the model is not interpolating between keyframes but generating each frame with awareness of prior context, producing fluid rather than stuttery animation.

Prompt-driven scene controlText input describes the desired motion: camera direction, subject behavior, environmental effects. The model blends semantic intent from the prompt with spatial information from the image to produce targeted, controllable output.

Core capabilities
Image-to-video animationConvert any image into an animated video clip. Suitable for product photography, illustrations, portraits, architectural renders, and graphic design assets.

Consistent subject preservationThe primary subject of the source image is maintained across frames — faces, objects, and branded elements do not distort or drift over the course of the clip.

Scalable video productionLow cost per second of output makes Grok Imagine Video practical for high-volume workflows — batch processing product catalogs, automating social content pipelines, or generating variations at scale.

Who should use Grok Imagine Video?
E-commerce and retail teamsTeams animating product images for ads, landing pages, or marketplace listings without manual video editing.

Marketing automation pipelinesContent operations teams generating short video variations from existing image libraries — at volume, without per-asset production cost.

Developers and platform buildersEngineers integrating video generation into creative tools, CMS platforms, or media workflows where cost efficiency and API simplicity are the primary requirements.

Startups and indie creatorsCost-conscious teams that need reliable image-to-video output without the per-second pricing of higher-tier models.

‍

Use cases

Grok Imagine Video is documented as suited to generating videos from text prompts, including text-to-video workflows. It is also documented for image-to-video use, where a still image is animated into a video.

It is documented for reference-to-video generation, using reference images to guide the output and preserve specific visual elements. It is also documented for extending an existing video by continuing from its last frame.

How to use Grok Imagine Video API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to x-ai/grok-imagine-video.
import requests, time

headers = {"Authorization": "Bearer " + AIMLAPI_KEY}
job = requests.post(
    "https://api.aimlapi.com/v2/video/generations",
    headers=headers,
    json={
      "model": "x-ai/grok-imagine-video",
      "prompt": "A serene timelapse of clouds over a mountain range"
    },
).json()
gid = job["id"]

while True:
    res = requests.get(f"https://api.aimlapi.com/v2/video/generations?generation_id={gid}", headers=headers).json()
    if res.get("status") in ("completed", "error"):
        break
    time.sleep(5)
print(res["video"]["url"])
const headers = {
  Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
  "Content-Type": "application/json",
};
const job = await (await fetch("https://api.aimlapi.com/v2/video/generations", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "model": "x-ai/grok-imagine-video",
    "prompt": "A serene timelapse of clouds over a mountain range"
  }),
})).json();

let res;
do {
  await new Promise((r) => setTimeout(r, 5000));
  res = await (await fetch(`https://api.aimlapi.com/v2/video/generations?generation_id=${job.id}`, { headers })).json();
} while (!["completed", "error"].includes(res.status));
console.log(res.video.url);
# submit the generation — the response contains the job "id"
curl -X POST https://api.aimlapi.com/v2/video/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"x-ai/grok-imagine-video","prompt":"A serene timelapse of clouds over a mountain range"}'

# then poll until status is "completed" — video.url holds the result
curl "https://api.aimlapi.com/v2/video/generations?generation_id={id}" -H "Authorization: Bearer $AIMLAPI_KEY"

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Grok Imagine Video API Pricing

TypePrice
Output
$0.065 / sec (variable)

Grok Imagine Video Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
Image-to-Video Arena
1329
Human preference Elo from blind pairwise comparisons of videos animated from the same input image, measured independently by Artificial AnalysisSourceSeptember 28, 2026
Text-to-Video Arena
1235
Human preference Elo from blind pairwise comparisons of generated videos, measured independently by Artificial AnalysisSourceSeptember 28, 2026

Grok Imagine Video vs other models

ModelInputOutputContextBest for
$0.065 / sec (variable)
Video generation
$0.26 / sec (variable)
Video generation
$1.95 / 1M tokens
$22.75 / 1M tokens
Video generation
$0.09243–$1.014 / sec (by resolution)
Cinematic video + native audio

Frequently asked questions

Grok Imagine Video takes image, text, video as input and returns video.

Grok Imagine Video is priced at $0.065 / sec (variable).

Grok Imagine Video is billed per generation — a fixed charge per output rather than by prompt length.

Yes, Grok Imagine Video accepts image input as well as a text prompt.

Grok Imagine Video was built by xAI .

Use x-ai/grok-imagine-video as the model id on AI/ML API.

Yes. Grok Imagine Video is served through AI/ML API, so the same key and endpoint format used for other models applies.

Yes, it takes image and text inputs together with video and produces video output.

It transforms static images into short animated video clips with coherent motion and visual consistency.

It is classified as a video generation model.

Start building with Grok Imagine Video

Get API Key
1000+ models, one API.