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.
No, there is no free quota for the Grok Imagine API. It is pay-as-you-go: you only pay for successful requests, and every price already comes with 20% off. Platinum and Diamond members save up to 28%.
Sign up for APIMart, open the API Keys page in your dashboard and create a key. The same key calls the xAI Grok Imagine API and every other model on the platform, with pay-as-you-go billing and no subscription.
Yes. The Grok Imagine API is billed per generated image. The pricing table on this page lists every specification and shows the Gold member price, 20% off. Platinum and Diamond members save even more, up to 28%. You only pay for successful requests.
You can reach us via the live chat in the bottom-right corner, email us at [email protected], or join our Discord community. Our team will get back to you as soon as possible.
Explore more models in the same category.

Grok Imagine 2.0 Ext
Grok Imagine 2.0 Ext is xAI's text-to-image model on APIMart. Each request generates 1–12 images in one of seven aspect ratios, billed only for images successfully delivered.

Qwen Image 3.0 Pro
Qwen Image 3.0 Pro is the Pro version of Qwen Image 3.0, with clear instruction following, stable bilingual text rendering, 1K/2K output and image editing with up to 3 references.

Qwen Image 3.0
Qwen Image 3.0 is Alibaba's image model for text-to-image and editing with 1–3 reference images. It offers stable bilingual text rendering and dense layouts, in standard and Pro versions at 1K or 2K, up to 6 images per request.

Flux 2 Max
FLUX.2 Max delivers the highest output quality in the FLUX.2 family for text-to-image and image editing, supporting up to 8 references and output up to 4 MP.