Jan Sverre Bauge

xAI brings image and video together in Grok Imagine API

Grok Imagine API now combines image and video generation, editing, references and batch jobs. Compare the models, prices and practical production limits.

Grok Imagine API combining image generation, video generation, editing and batch processing in one workflow
Grok Imagine now covers much of the workflow from a first image to a finished video clip.

Grok Imagine API has become a broad toolkit for creating and editing both images and video in one system. xAI now offers text-to-image, image editing, text-to-video, image-to-video and video editing, with separate models for detailed control and lower-cost production at scale.

That makes the API far more useful than a single video generator. You can work with reference images, pin specific frames to the beginning, end or middle of a clip, generate audio with lip-synced speech and submit large workloads through the Batch API. The cheapest video model starts at $0.02 per second, while the newest image model starts at $0.04 per image.

Video and the next generation of image generation originally arrived on January 28, 2026. xAI has expanded the system considerably since then. For developers, the useful story today is that Grok Imagine now covers much of the workflow from the first still image to a finished clip.

What is the Grok Imagine API?

Grok Imagine API is xAI’s combined API for generating and editing images and video. The official xAI release notes list video and next-generation image generation on January 28, 2026. The current documentation shows multiple models, batch support and much more detailed control than that initial release.

For images, grok-imagine-image-2.0 is the newest model. It can generate an image from a prompt or edit an existing image with as many as five references. Output is available at 1K, 1.5K or 2K, with low and medium quality tiers. The older and cheaper grok-imagine-image remains available for simpler work.

For video, the main choice is between grok-imagine-video-1.5 and grok-imagine-video-1.5-lite. Both can create clips from text or a still image. The full model offers more control and native 1080p, while Lite is meant for straightforward clips where cost and volume matter more.

What can Grok Imagine Video 1.5 do?

Grok Imagine Video 1.5 can produce clips up to 15 seconds long at 480p, 720p or 1080p. According to xAI’s video overview, the model supports text-to-video, image-to-video, lip-synced speech, up to 14 image references and up to three voice references. Voice references made from your own audio are limited to approved partners and require a request.

The references are not just decorative. They can guide people, objects, visual style and voice throughout a clip. A developer can also lock in a first frame, a final frame and as many as four images at specified points in the timeline. That gives the model clearer boundaries for where a scene begins, where it ends and which visual beats it must pass along the way.

The API also has endpoints for editing and extending video, but those use the separate grok-imagine-video model rather than Video 1.5. An existing video can be edited from an instruction or extended from its final frame. Combined with references and keyframes, that gives you several ways to continue a clip without regenerating the entire sequence from scratch.

Grok Imagine Video 1.5 workflow using references, a first frame, a last frame and timed keyframes
Video 1.5 can be guided with reference images, first and last frames, and images placed at specific points in the clip.

How does video generation work in practice?

Video requests are asynchronous. You submit a job to /v1/videos/generations, receive a request_id and then query the status endpoint until the job is pending, done or failed. xAI’s Python SDK can handle the waiting automatically, but a production system will usually be better off storing the job ID and monitoring it explicitly.

That operational detail matters because a video request does not behave like a normal text response. A web request should not remain open for several minutes while a clip renders. Put the job in a queue, store the request_id, handle the error states and collect the result when it is ready. Retry temporary capacity failures, but correct invalid parameters before submitting the job again.

Duration can be set from 1 to 15 seconds, with 8 seconds as the default. Text-to-video also lets you choose the aspect ratio, but image-to-video inherits the ratio from the starting image. The documentation states that aspect_ratio is ignored in that mode. If you need a 16:9 or 9:16 result, prepare the source image in the correct shape before submitting the job.

What changed in xAI’s image tools?

grok-imagine-image-2.0 combines generation and editing in a model that accepts up to five reference images. You can provide an image as a public URL, a data URL or a file ID from xAI’s Files API. The same workflow can change objects, materials, colors, perspective or visual style.

Developers who want direct control can use the generation and editing endpoints. xAI also offers an image_generation tool that Grok can call from within a conversation. The model can decide when an image should be generated or edited and can chain several image calls inside one task. In an agent workflow, that distinction is useful: image production becomes one step in a larger job instead of a separate application.

There is one concrete compatibility trap. xAI’s image-editing endpoint expects JSON, while the OpenAI SDK method images.edit() sends multipart/form-data. That method is therefore not supported for xAI image editing. Use xAI’s SDK, the Vercel AI SDK or a direct HTTP request with JSON instead.

How much does the Grok Imagine API cost?

Pricing varies by model, resolution and quality. grok-imagine-image-2.0 starts at $0.04 for a low-quality 1K image. A medium-quality 2K image costs $0.08, and each reference image supplied as input adds $0.01.

The older grok-imagine-image costs $0.02 per image at both 1K and 2K. That makes it a sensible candidate when you need many simple variations and do not need the newer model’s quality controls. xAI’s Imagine API pricing table also shows that image jobs can run through the Batch API, but there is no separate batch discount.

Video 1.5 Lite starts at $0.02 per second for 480p, so a 15-second clip costs $0.30. At 720p, the rate is $0.03 per second, or $0.45 for 15 seconds. Lite at 1080p costs $0.14 per second.

The full Video 1.5 model costs $0.08 per second at 480p, $0.14 at 720p and $0.25 at 1080p. A 15-second native 1080p clip therefore costs $3.75 before any input charges. The difference between a quick experiment and a production render becomes rather visible at that point.

Price comparison for Grok Imagine images, Video 1.5 Lite and the full Video 1.5 model
Grok Imagine pricing ranges from low-cost images and Lite video to the more controllable full Video 1.5 model.

Why does batch support matter?

The Batch API added support for image generation, image editing and video generation on March 15, 2026. It lets a developer upload a JSONL file containing many requests and process them together. A single batch can include chat, image and video jobs, which is useful for product catalogs, campaign variations and automated production runs.

There is a catch: result URLs from batch jobs expire after one hour. Finished images and videos must be downloaded or moved to permanent storage as soon as the job has been processed. If you archive only the URL and expect it to work later, you have built a time-delayed 404 machine.

This is why I would treat the API as infrastructure rather than a magic button. A real implementation needs queue handling, status tracking, durable storage, cost controls and a plan for failed jobs. xAI’s direct API is now a serious option when one provider handling both images and video is valuable, but the surrounding engineering still belongs to you.

Which Grok Imagine model should you choose?

Choose grok-imagine-video-1.5-lite for simple text- or image-based clips at volume when price matters most. Choose the full Video 1.5 model when you need native 1080p, many reference images, voice references or control over the first, last and intermediate frames. The price gap is large enough that the full model should not be your automatic default.

For images, grok-imagine-image is the inexpensive option for many straightforward variations. Use Image 2.0 when quality tiers, multiple references and newer editing controls create real value in the final result. Measure the cost per approved asset, not merely the cost per request. Five cheap generations that go in the bin can easily cost more than one better-controlled result.

I have not run my own quality test of these models for this article. xAI’s documentation establishes what the API supports and what it costs, but it cannot tell you whether the output will match your style, continuity requirements or product identity reliably enough. Run a limited comparison using the actual subjects, references and formats you plan to produce before committing an entire workflow to one provider.

xAI has built more than a video generator

xAI entered the generative-video race relatively late, but the API is no longer a thin wrapper around a single model. The combination of image generation, video generation, editing, references, keyframes, audio, batch processing and agent tools turns Grok Imagine into a broad generation and editing platform.

This is the right direction. For developers, one impressive clip is less valuable than a workflow that can be controlled, repeated, priced and monitored. xAI has put many of the necessary building blocks in place. The remaining question cannot be answered by a specification sheet: whether quality stays consistent when the API meets real production work at volume.

My advice is simple: start with Lite or the cheaper image model, use the full models only where their added control produces measurable value, and store every result yourself. Grok Imagine API absolutely belongs in a vendor comparison. That is not the same as handing it your entire production pipeline without testing it first.

Frequently asked questions

Can Grok Imagine turn an image into a video?

Yes. Both Video 1.5 and Video 1.5 Lite support image-to-video. The output inherits the starting image’s aspect ratio, so prepare that image in the required format before submission. The full model also adds more references and control over specific frames.

How long can videos generated through the xAI API be?

Standard video generation supports durations from 1 to 15 seconds, with 8 seconds as the default. Video editing keeps the source clip’s duration and has separate limits. Longer sequences therefore require multiple clips or the video-extension feature.

What is the difference between Video 1.5 and Video 1.5 Lite?

Lite is the cheaper model for straightforward text-to-video and image-to-video work. The full version adds native 1080p, up to 14 image references, up to three voice references and control over first, last and timed intermediate frames, but costs substantially more per second.

Can I use the OpenAI SDK with xAI’s image API?

OpenAI-compatible calls work for several parts of the xAI API. Image editing is the exception: images.edit() sends multipart data while xAI expects JSON. Use xAI’s SDK, the Vercel AI SDK or a direct HTTP request for image edits.