X-ai logo

Grok Imagine Image 2.0

xAIReleased Aug 11, 2026x-ai/grok-imagine-image-2-0
Compare

Grok Imagine Image 2.0 is xAI's quality-tier image generation and editing model, accessed through the Grok Imagine API. It generates images from text prompts with control over aspect ratio (including an automatic mode), 1K or 2K resolution, low or medium quality, and batch generation of up to 10 images per request. It supports base64 or temporary-URL output and deferred generation for long-running batches. It is proprietary and closed-weight.

Context
4K
Input /1M
—
Output /1M
$0.04/img
AcceptsTextProducesImage

Providers

FastRouter routes your requests to this provider. You can also bring your own key.

X-AI logo
X-AI
x-ai
Input /1M—
Output /1M$0.04/img
Context4K
Max output—

Supported parameters

Request parameters you can send with this model.

Parameter
Type
X-AI
Core (Sampling & basic generation)
nNumber of completions to generate.
number
1 to 10default: 1
Media (Generation Controls)
aspectRatioOutput image aspect ratio.
string
"1:1", "3:4", "4:3", "9:16", "16:9", "3:2", "2:3", "1:2", "2:1", "19.5:9", "9:19.5", "20:9", "9:20", "21:9", "5:2", "auto"default: auto
Other
image_response_format
string
"url", "b64_json"default: url
prompt
string
-
quality
string
"low", "medium", "auto"default: auto
size
string
"1k", "2k"default: 1k

Make your first API call

OpenAI-compatible. Point your SDK at FastRouter, or call the API directly.

Full API docs
Replace <FASTROUTER_API_KEY> with your key · Get your key →Install
OpenAI SDKHTTP
import base64
from openai import OpenAI
client = OpenAI(
api_key="<FASTROUTER_API_KEY>",
base_url="https://api.fastrouter.ai/api/v1"
)
img = client.images.generate(
model="x-ai/grok-imagine-image-2-0",
prompt="A cute baby sea otter",
n=1,
size="1024x1024"
)
image_base64 = img.data[0].b64_json
image_bytes = base64.b64decode(image_base64)
with open("otter.png", "wb") as f:
f.write(image_bytes)

Frequently asked questions

More models from X-ai

X-ai logo
Grok 4.7x-ai/grok-4.7

Grok 4.7 is xAI's flagship multimodal reasoning model, built on a new, larger base model than Grok 4.6 (reportedly ~2.1T parameters vs. 1.5T) with a longer reinforcement-learning run weighted toward multi-hour tasks. It accepts text and images, supports a 500K-token context window, four reasoning levels (low, medium, high, xhigh), and native understanding of the Grok Bot harness for agentic coding and knowledge work. xAI reports stronger self-verification, long-context handling, and document/presentation generation, at the same per-token price as Grok 4.6.

X-ai logo
Grok 4.6x-ai/grok-4.6

Grok 4.6 is xAI's frontier multimodal reasoning model for coding, long-running agentic tasks, knowledge work, and interactive/visual projects, released as the successor to Grok 4.5. It accepts text and images and returns text, with a 500,000-token context window, a February 1, 2026 knowledge cutoff, and four reasoning-effort levels (low, medium, high, xhigh, with high as default). It supports function calling, JSON-schema structured outputs, web search, X search, code execution, and prompt caching, and received a longer supplemental training run than 4.5 with curated technical and agentic reasoning data.

X-ai logo
Grok Imagine Video 1.5x-ai/grok-imagine-video-1.5

Grok Imagine Video 1.5 is xAI’s next-generation AI video model for animating still images into short, cinematic clips. It preserves the source image’s composition and identity while adding motion, camera movement, and synchronized audio such as dialogue, effects, ambience, and music.

X-ai logo
Grok 3 Betax-ai/grok-3-beta

Grok 3 Beta is xAI's flagship model featuring specialized domain expertise in finance, healthcare, law, and scientific fields. This enterprise-focused solution delivers exceptional performance in data extraction, code generation, and text summarization tasks. Released in 2025, the model particularly excels in structured tasks and achieves superior results on challenging benchmarks like GPQA, LCB, and MMLU-Pro, consistently outperforming the smaller Grok 3 Mini even when the latter operates at high thinking levels. Grok 3's sophisticated knowledge architecture makes it particularly valuable for professional and technical applications requiring deep contextual understanding in regulated industries. The model offers dual deployment options: a standard endpoint optimized for quality and a fast endpoint prioritizing throughput, allowing users to select the appropriate performance profile based on their specific application requirements.

X-ai logo
Grok 3 Mini Betax-ai/grok-3-mini-beta

Grok 3 Mini Beta is xAI's lightweight reasoning model designed specifically for quantitative problem-solving with transparent thinking processes. Unlike conventional AI systems that generate immediate answers, this model implements explicit reasoning steps before responding, making it particularly effective for mathematics, puzzles, and logical reasoning tasks. The model defaults to low reasoning effort but can be configured with increased reasoning capacity (reasoning: { effort: high }) for more complex problems. With accessible thinking traces, users can examine the model's step-by-step problem-solving approach, providing valuable insights into its reasoning process. This beta release offers early access to xAI's reasoning capabilities through dual endpoint options: a standard endpoint optimized for quality and a fast endpoint prioritizing throughput for latency-sensitive applications.

X-ai logo
Grok 4.20 Betax-ai/grok-4.20-beta

Grok 4.20 Beta is xAI’s newest flagship large language model that uses four specialized “agents” working together to answer complex questions more accurately and with deeper reasoning than prior Grok versions.

X-ai logo
Grok 4.3x-ai/grok-4.3

Grok-4.3 is xAI's advanced reasoning model, launched in late April 2026, designed for complex tasks like advanced logic, math, scientific analysis, and multi-step agentic workflows.

X-ai logo
Grok 4.5x-ai/grok-4.5

Grok 4.5 is xAI’s flagship multimodal reasoning model optimized for coding, agentic workflows, and knowledge work, with support for very long contexts (up to ~500K tokens) and tools. It accepts text and images and can call tools for search, code execution, and other actions via the xAI API. Designed as an Opus-class model, it targets high performance at aggressive per-token pricing for large, tool-heavy sessions.

X-ai logo
Grok Build 1x-ai/grok-build-0.1

grok-build-0.1 is xAI's specialized, ultra-fast AI model explicitly engineered for agentic software engineering and multi-step coding workflows. Rather than operating as a general-purpose conversational chatbot, it is optimized to run tools, handle debugging, and execute complex programming instructions autonomously.

X-ai logo
Grok Imagine Imagex-ai/grok-imagine-image

Grok Imagine Image is xAI’s text-to-image generation model for creating visuals from prompts, with support for both text and image inputs. xAI describes it as a model for generating images through the Grok Imagine API, and its docs list it as available for image generation with configurable output sizes.

X-ai logo
Grok Imagine (Image Quality)x-ai/grok-imagine-image-quality

Grok Imagine Image Quality is xAI’s higher-fidelity image generation and editing model, designed to produce sharper, more realistic images than the standard Grok Imagine mode. It emphasizes stronger text rendering, richer textures, more accurate compositions, and more realistic lighting/physics, but it is a bit slower than the speed-focused version.

X-ai logo
Grok Imagine (Video)x-ai/grok-imagine-video

x-ai/grok-imagine-video is xAI’s video generation model for creating short clips from text or images, with native synchronized audio such as dialogue, sound effects, and music. It supports text-to-video, image-to-video, and video editing/extending workflows, making it useful for cinematic clip generation and iterative creative editing.

Model scores sourced from ArtificialAnalysis