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, or intelligently edit existing images with natural language using grok-imagine-image.
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 | 1K | 0.16Credits(~$0.016)/pic | 0.152Credits(~$0.0152)/pic | 0.144Credits(~$0.0144)/pic | 0.2Credits(~$0.02)/pic | 20% |
| 2K | 0.16Credits(~$0.016)/pic | 0.152Credits(~$0.0152)/pic | 0.144Credits(~$0.0144)/pic | 0.2Credits(~$0.02)/pic | 20% | |
| Reference image (each) | 0.016Credits(~$0.0016)/pic | 0.0152Credits(~$0.0015)/pic | 0.0144Credits(~$0.0014)/pic | 0.02Credits(~$0.002)/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 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–5 reference images through image_urls. It does not accept a quality parameter.
Yes. Use grok-imagine-image with an editing prompt and 1–5 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 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.

Flux 3 Image Klein
FLUX 3 Image Klein is a compact, open-weight image generation and editing model developed by Black Forest Labs. It combines text-to-image creation, image editing, and composition using up to 10 reference images in a single model. With support for up to 4K resolution and bounding-box layout control, it gives creators flexible tools to bring their ideas to life.

Mai Image 2.6
MAI-Image-2.6 is Microsoft's image model for text-to-image, single-image editing and composition with up to 5 reference images. It is available in high-quality and Flash versions, with 1K and 2K output and sharp text rendering.

Mai Image 2.6 Flash
MAI-Image-2.6 Flash is the Flash version of Microsoft MAI-Image-2.6 for text-to-image and image editing with up to 5 references, 1K/2K PNG output and optional Bing grounding, billed by actual token usage.

Flux 3 Image
FLUX 3 Image by Black Forest Labs handles text-to-image, single-image editing and generation with up to 10 reference images. It supports multiple aspect ratios and resolutions up to 4K, priced by resolution with no extra charge for references.