xAI: Grok Imagine Image
grok-imagine-image- Price
- From $0.02
- Modalities
- Image
About Grok Imagine Image
Grok Imagine Image is xAI's image model for generating pictures from text and for editing pictures you supply. It is the original Imagine image model, 1.0, placed below the newer 2.0 release. It offers 1K and 2K resolution and a wide set of aspect ratios, including tall phone formats, which helps when one idea must fit posts, banners and stories.
Where it works well
- Covers both text-to-image generation and editing of an existing image in the same model.
- Offers many aspect ratios, from square to wide and tall phone shapes, plus an auto option.
- Choice of 1K or 2K output lets you draft small and render larger once a concept works.
- Suits drafts and volume work where the newer 2.0 model is not needed.
- Natural-language edit instructions change a supplied picture without re-describing the whole scene.
When to choose another model
- Grok Imagine Image 2.0 is the newer model and the better pick when fine detail matters.
- It produces still images only; moving shots need a Grok Imagine video model.
- Text rendered inside images and exact layouts can need several attempts.
Getting started
Create API key
Create a key in Console, then use it with every model on the platform.
Send your first request
Copy the example for your language and run it against the endpoint.
Image editingImage to imageText to imageTokenLab endpointPOST/v1/images/generationscurl -X POST "https://api.tokenlab.sh/v1/images/generations" \ -H "Authorization: Bearer sk-xxx" \ -H "Content-Type: application/json" \ -d '{ "operation": "text-to-image", "model": "grok-imagine-image", "prompt": "A minimalist product photo of matte black headphones on a soft blue background." }'
Parameters
Image editing
| Parameter | Values and limits | Default | Notes |
|---|---|---|---|
aspect_ratio | 1:1, 1:2, 2:1, 2:3, 3:2, 3:4, 4:3, 9:16, 9:19.5, 9:20, 16:9, 19.5:9, 20:9, auto | Not provided | Not provided |
image | Inputs: ≥ 1, ≤ 3 | Not provided | Use at least one source image and at most 3 in total across all source-image representations. |
image_url | Inputs: ≥ 1, ≤ 1 | Not provided | Not provided |
images | Inputs: ≥ 1, ≤ 3 | Not provided | Not provided |
n | Not provided | 1 | Defaults to one output image. The model-specific maximum is not declared in this public contract. |
operation | Not provided | Not provided | Not provided |
prompt | Not provided | Not provided | Not provided |
resolution | 1k, 2k | Not provided | Not provided |
response_format | Not provided | Not provided | The public image response selector accepts url or b64_json. A URL-only supply rejects b64_json before upstream execution. Omit this field to keep the selected supply response representation; no uniform omitted-field default is declared here. |
Image to image
| Parameter | Values and limits | Default | Notes |
|---|---|---|---|
aspect_ratio | 1:1, 1:2, 2:1, 2:3, 3:2, 3:4, 4:3, 9:16, 9:19.5, 9:20, 16:9, 19.5:9, 20:9, auto | Not provided | Not provided |
image | Inputs: ≥ 1, ≤ 3 | Not provided | Use at least one source image and at most 3 in total across all source-image representations. |
image_url | Inputs: ≥ 1, ≤ 1 | Not provided | Not provided |
images | Inputs: ≥ 1, ≤ 3 | Not provided | Not provided |
n | Not provided | 1 | Defaults to one output image. The model-specific maximum is not declared in this public contract. |
operation | Not provided | Not provided | Not provided |
prompt | Not provided | Not provided | Not provided |
resolution | 1k, 2k | Not provided | Not provided |
response_format | Not provided | Not provided | The public image response selector accepts url or b64_json. A URL-only supply rejects b64_json before upstream execution. Omit this field to keep the selected supply response representation; no uniform omitted-field default is declared here. |
Text to image
| Parameter | Values and limits | Default | Notes |
|---|---|---|---|
aspect_ratio | 1:1, 1:2, 2:1, 2:3, 3:2, 3:4, 4:3, 9:16, 9:19.5, 9:20, 16:9, 19.5:9, 20:9, auto | Not provided | Not provided |
image | Not provided | Not provided | Text-to-image does not accept source images. Do not send this field for that operation. Use one of this model's declared image operations for source-image requests. |
image_url | Not provided | Not provided | Text-to-image does not accept source images. Do not send this field for that operation. Use one of this model's declared image operations for source-image requests. |
images | Not provided | Not provided | Text-to-image does not accept source images. Do not send this field for that operation. Use one of this model's declared image operations for source-image requests. |
n | Not provided | 1 | Defaults to one output image. The model-specific maximum is not declared in this public contract. |
operation | Not provided | Not provided | Not provided |
prompt | Not provided | Not provided | Not provided |
resolution | 1k, 2k | Not provided | Not provided |
response_format | Not provided | Not provided | The public image response selector accepts url or b64_json. A URL-only supply rejects b64_json before upstream execution. Omit this field to keep the selected supply response representation; no uniform omitted-field default is declared here. |
For image editing, pass image_url, images[] references, or an uploaded image.
TokenLab rejects image edits with more than three source images.
Pricing
The Verified price applies to Verified, which costs less on most models. The Official price is the model maker's published price and applies to the more reliable Official route. Auto bills the route that completes the request.
Pricing
per request- Verified price
- How pricing works
- Official price
- How pricing works
| Official priceper request | Verified priceper request | Discount | |
|---|---|---|---|
| Price | How pricing works | How pricing works | — |
Usage & activity
Success rate is the share of requests that completed. Latency is how long a full response takes; P95 means 95% of requests finished within that time.
Usage & availability
Last 24 hours- Requests
- Success rate
- P95 latency
- Total tokens
Data is based on aggregate user requests, excluding status checks.
Open in Console
Open Grok Imagine Image in Console with a prompt ready to edit or send.
Help me create an image with grok-imagine-image using text-to-image at /v1/images/generations. Show the result, cost, and any limits I should know.
Use cases
Best for- Text to Image
Social media variants
Render one concept at square, portrait and widescreen ratios so the same visual fits a feed post, a story and a banner.
Concept drafts
Explore many visual directions quickly from short prompts, then move the best one to a higher-fidelity model for final art.
Photo edits by instruction
Upload a product photo and ask for a new background or a changed colour, keeping the subject in place.
Prompt examples
A vertical poster of a lighthouse at dusk, painted in thick oil strokes, with space at the top for a title.
Change the background of this product photo to a pale concrete studio wall and keep the shadows natural.
Three-by-two banner for a coffee brand: steam rising from a cup on a wooden table, warm morning light.
FAQ
What can Grok Imagine Image do?
It generates images from a text prompt and edits images you provide, following a written instruction. You can choose a 1K or 2K output size and pick from many aspect ratios, including portrait and widescreen.
How does grok-imagine-image differ from grok-imagine-image-2.0?
This is the original Imagine image model, and 2.0 is the newer generation that xAI uses in its documentation examples. Start here for drafts and larger batches, and move to 2.0 when you need finer detail in the final picture.
Which aspect ratios does it support?
It supports square, 3:2, 4:3, 16:9 and their portrait counterparts, plus taller phone shapes such as 9:19.5 and 9:20, and an auto setting that lets the model choose.
Can it edit my own images?
Yes. Supply an image and a text instruction, and the model returns an edited version. This is useful for background swaps, colour changes and small additions to an existing picture.
Does it generate video?
No, it makes still images. For motion, use one of the Grok Imagine video models, which can animate an image or generate a clip from text.
How much does Grok Imagine Image cost?
Rates depend on the billing unit, specification, and usage. Compare matching conditions in the model's detailed pricing; a single rate does not determine the total cost.
Which endpoint should Grok Imagine Image use?
Use https://api.tokenlab.sh/v1/images/generations for Grok Imagine Image. The request example below shows the matching code shape.
Which operations does Grok Imagine Image support?
Grok Imagine Image supports Image editing, Image to image, Text to image. Select an operation above to see its endpoint and request example.
Compare Grok Imagine Image
Guides that use Grok Imagine Image
Sources
- xAI model page: grok-imagine-image
- xAI image generation guide
- xAI migration guide: grok-imagine-image-quality
Reviewed Nov 5, 2026