The Grok Imagine Image Quality API on APIMart gives you xAI's grok-imagine-image-quality model: text to image and natural-language editing with up to three reference images, 1K or 2K output, auto plus 13 aspect ratios and 1–10 images per request.
Service Highlights
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.
What grok-imagine-image-quality supports on APIMart, based on APIMart's API documentation
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.
Call grok-imagine-image-quality on APIMart with one POST request. Generation is asynchronous: submit a task, then poll the task endpoint for the image URLs. This code sends no X-APIMart-Response-Version header, so the submit response is HTTP 200 with data[0].task_id; the docs example sends that header and gets HTTP 202 with data.id.
Save the key you created above in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every request.
POST /v1/images/generations with model grok-imagine-image-quality, your prompt, aspect_ratio, resolution and n. Add image_urls to edit an image, and do not send a quality field. The task ID is in data[0].task_id.
Poll GET /v1/tasks/{task_id} until status is completed, then read the image URL from data.result.images[0].url[0]. Results are kept for 72 hours. Failed tasks are not charged.
See the Grok Imagine Image Quality API reference for every parameter and response field.
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image-quality",
"prompt": "Minimal product photography of a white ceramic cup on a stone surface, soft window light, clean background",
"n": 1,
"aspect_ratio": "1:1",
"resolution": "2k"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "grok-imagine-image-quality",
"prompt": "Minimal product photography of a white ceramic cup on a stone surface, soft window light, clean background",
"n": 1,
"aspect_ratio": "1:1",
"resolution": "2k"
}
resp = requests.post(f"{API_BASE}/v1/images/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["images"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(3)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-image-quality",
"prompt": "Place the product on a marble kitchen counter with morning light and keep the product unchanged",
"n": 1,
"image_urls": [
"https://example.com/product.png"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: grok-imagine-image-quality | grok-imagine-image-quality. The same model handles text to image and editing. |
prompt | string | Required | Default: — | Image description, or the edit instruction when image_urls is set. Up to 8,000 characters. |
aspect_ratio | string | Optional | Default: auto | Aspect ratio: auto, 1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1. |
resolution | string | Optional | Default: 1k | Output resolution: 1k or 2k. 2K costs more per image than 1K. |
n | integer | Optional | Default: 1 | Number of images, 1–10. |
image_urls | array | Optional | Default: — | Reference images for editing, 1–3 public HTTP(S) URLs. Omit the field for text to image. |
nsfw_check | boolean | Optional | Default: false | Set true to moderate the prompt and input images before the task is submitted. |
“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
Pricing, parameters, model choice and results for grok-imagine-image-quality
It is API access to grok-imagine-image-quality, an image model in xAI's Grok Imagine API. On APIMart it supports text to image and editing with up to three reference images, 1K or 2K output and 1–10 images per request.
xAI lists grok-imagine-image-quality at $0.05 per image. In October 2026, APIMart Gold members paid $0.04 per image at 1K and $0.056 at 2K, plus $0.008 per reference image; Platinum and Diamond members save up to 28%. Failed tasks are not charged. The pricing table shows live rates.
Both use the same parameters, 1K or 2K output and up to 10 images per request. grok-imagine-image-quality accepts up to three reference images and costs more; grok-imagine-image accepts up to five and costs less (xAI lists it at $0.02 per image). Each has its own page and pricing on APIMart.
Grok Imagine 2.0 is xAI's newer image model, released on August 7, 2026, with low or medium quality settings. On APIMart its official model starts at $0.032 per 1K image, and an Ext model costs $0.015 per image. Compare both on the Grok Imagine 2.0 page before you choose.
model and prompt are required; the prompt can be up to 8,000 characters. Optional fields are n (1–10, default 1), aspect_ratio (default auto), resolution (1k or 2k, default 1k), image_urls (1–3 images) and nsfw_check. Despite the model name, there is no quality field; do not send one.
Yes. Add one public HTTP(S) image URL to image_urls with an editing instruction, or up to three URLs to combine references. Omit image_urls for text to image. Upload local files with POST /v1/uploads/images first.
aspect_ratio accepts auto, 1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1, with auto as the default. resolution accepts 1k or 2k; 2K costs more per image than 1K.
Set n from 1 to 10. Each output image is billed at the price of the selected resolution. Reference images are billed once per input per request; they are not multiplied by n.
Send the request to POST /v1/images/generations, save the task ID and poll GET /v1/tasks/{task_id} until the status is completed. Read the image URLs from the result. Results are kept for 72 hours, so download them to your own storage.
Sign up for APIMart, open the API Keys page in your dashboard and create a key. The same key calls grok-imagine-image-quality and every other model on the platform, with pay-as-you-go billing and no subscription.
No. There is no free quota on APIMart. Billing is pay-as-you-go per image: failed tasks are not charged, and members get 20% or more off every price.
No. Under APIMart's Terms of Service, your prompts and images are not used to train AI models or shared with third parties except as needed to provide the service.
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.