Grok Imagine

Available in API

From prompt to
pixel-perfect reality.

State-of-the-art image and video generation, editing, and restyling — one API for every visual modality.

Up to 2K resolution10 images per requestVideo up to 15sFrom $0.02 / image

Text & image to video

Product demos, visual effects, and creative content. Turn a photo into a cinematic video with smooth pans, zooms, and reveals.

  • Text-to-video and image-to-video in one API
  • Up to 15-second clips with motion control
  • High-fidelity output across photoreal and stylized scenes

Virtual try-on

Upload a photo of a person and a clothing item — the API generates a video of them wearing it. Perfect for e-commerce and fashion.

  • Combine product and client references into one shot
  • Preserves garment shape, texture, and color
  • Returns ready-to-use video for product detail pages
Product
Product
Client
Client
Try-on

Product placement

Turn a single product photo into scroll-stopping content for every channel. Generate up to 10 images per request at 2K resolution.

  • Restage your product in any environment or angle
  • Add people, change perspective, or shift the scene
  • Up to 10 images per request at 2K resolution
Original

Precision edits

Edit colors and objects with accuracy for complete control over your product showcase.

  • Target specific attributes without disturbing the rest
  • Iterate on colors, materials, and details in seconds
  • Switch between image and video edits on demand

Creative restyle

Seamlessly switch between styles to reinvent the experience in seconds. Drag the slider to compare the original with the restyle.

  • Apply cinematic, anime, retro, watercolor, and more
  • Side-by-side compare with the source video
  • One source — endless creative directions
Original
Block

Mockups into reality

Turn your rough ideas into multiple realities at the click of a button.

  • Go from sketch or render to polished output
  • Explore variations across mood, lighting, and style
  • Bridge concept and production with a single prompt
Sketch

Ready to build?

Start generating images and videos with just a few lines of code.

import xai_sdkclient = xai_sdk.Client()response = client.video.generate(    prompt="A glowing crystal-powered rocket launching from Mars",    model="grok-imagine-video",    duration=10,    aspect_ratio="16:9",    resolution="720p",)print(response.video.url)

Powerful without compromise

Our image and video models top the leaderboards on quality, speed, and price.

ModelRankPriceLatency
Grok Imagine
1
Veo 3.1 Fast
4
Veo 3
5
Sora 2 Pro
9
Sora 2
12

Source: Artificial Analysis Text-to-Video Rankings, 2026-01-28

Grok Imagine API delivers outstanding video quality with native audio generation, combining photorealistic realism, strong creative style, and an impressive level of control.

fal

Common questions

About image and video generation, editing, and pricing. For a deeper dive, visit the docs.