The Grok Imagine API is xAI's Grok image API for powerful image generation and editing. Create stunning photorealistic images from text prompts with grok-imagine-image-quality, or intelligently edit existing images with natural language using grok-imagine-image-quality.
74 / 8000

Transparent pricing with no hidden fees. Pay only for what you use.
| Variant | Tier | GoldCurrent price | Platinum | Diamond | Official | Your savings |
|---|---|---|---|---|---|---|
grok-imagine-image-quality | 1K | 0.4Credits(~$0.04)/pic | 0.38Credits(~$0.038)/pic | 0.36Credits(~$0.036)/pic | 0.5Credits(~$0.05)/pic | 20% |
| 2K | 0.56Credits(~$0.056)/pic | 0.532Credits(~$0.0532)/pic | 0.504Credits(~$0.0504)/pic | 0.7Credits(~$0.07)/pic | 20% | |
| Reference image (each) | 0.08Credits(~$0.008)/pic | 0.076Credits(~$0.0076)/pic | 0.072Credits(~$0.0072)/pic | 0.1Credits(~$0.01)/pic | 20% |
* Actual costs are subject to final output.
Powerful capabilities for professional AI image generation and editing
Follow these simple steps to start generating images with Grok Imagine
Create your free APIMart account to access Grok Imagine API.
Top up your account balance to use Grok Imagine.
Create an API key for Grok Imagine in your dashboard.
“Grok Imagine delivers photorealistic quality that honestly surprised me. The color accuracy and texture detail are exceptional — we use it daily for product campaign visuals.”
Alex Chen
Creative Director at DesignWorks
“The edit model is a game-changer. I just describe what needs changing in plain text and grok-imagine-1.5-edit-apimart handles it cleanly. No more fiddling with masks in Photoshop.”
Sarah Mitchell
UI/UX Designer
“The prompt interpretation is incredibly nuanced. Grok Imagine picks up on subtle stylistic cues that other models miss entirely. My clients are constantly asking how I generate these so fast.”
Marcus Weber
Freelance Illustrator
“APIMart's pricing for Grok Imagine is unbeatable. We generate hundreds of product visuals per week and the cost is a fraction of what we paid before.”
Emma Rodriguez
Marketing Manager
“The two-parameter API is refreshingly simple. I integrated Grok Imagine into our platform in under an hour. The reliability via APIMart is rock solid.”
James Liu
Full-Stack Developer
“We switched to Grok Imagine for all our campaign concepting. The speed-to-quality ratio is the best we've found, and the APIMart pricing makes scaling completely viable.”
Sophie Anderson
Art Director at AdVision
grok-imagine-image and grok-imagine-image-quality are separate official model IDs, with their own pages and pricing. grok-imagine-image accepts up to 5 reference images; grok-imagine-image-quality accepts up to 3. Both support 1–10 output images at 1k or 2k.
grok-imagine-image-quality uses model, prompt and n (1–10 outputs, default 1), with optional nsfw_check. It uses aspect_ratio (auto or 13 preset ratios) and resolution (1k/2k), and accepts 0–3 reference images through image_urls. It does not accept a quality parameter.
Yes. Use grok-imagine-image-quality with an editing prompt and 1–3 HTTP(S) reference images in image_urls. The model applies your instructions to the references without requiring masks.
This page’s model uses its own current per-output-image price, calculated from its original price and actual discount. Output fees scale with n. Official reference images have their own price and discount, charged once per reference per request without multiplying by n. See the pricing details for current rates.
grok-imagine-image-quality uses aspect_ratio for composition and resolution for 1k/2k output. It does not accept a quality parameter.
Create an APIMart account, add credits, and generate an API key. Then send a POST request to /v1/images/generations with your model and prompt. The Grok image API reference in our documentation (docs.apimart.ai) has complete code examples in Python, JavaScript, and more.