Grok Imagine Image 2.0 API
Try Grok Imagine Image 2.0 before you integrate the API.
Test output quality, estimate credit usage, and generate samples before you formally integrate.
Create image task
Fixed to grok-imagine-image-2.0Optional. Add 1-3 images to switch to editing mode. Each input image is billed once per request.

Know your testing cost before you add credits.
Pricing is a simple matrix of resolution (1K/2K) and quality (Low/Medium). Start from the cost of a single sample and pick a testing budget.
First Test Cost
Text-to-Image - 1K - Low qualityOne 1K Low prompt-only image
About 333 tests with $10 in credits.
Start with the 1K Low tier for drafts, then switch to Medium or 2K for the final check. Input images add a per-image fee once per request.
Testing Budget Guide
Pick an amount based on how many tests you expect.Good for a first validation.
Good for prompt iteration.
Good before production integration.
Common Cost Examples
Estimated cost for one generated image. Multiply the output rate by n for multi-image requests; input image fees are charged once per request.
Model Pricing
| Item | Rule | Rate | Billing |
|---|---|---|---|
| 1K · Low | Fastest tier (~10s) for drafts and prompt iteration. | $0.030/image-25% 2.04 cr/image$0.040 official price | Per output image |
| 1K · Medium (default) | Default tier with better detail; generation may take 10-75s. | $0.045/image-25% 3.06 cr/image$0.060 official price | Per output image |
| 2K · Low | Higher resolution with the fast quality tier. | $0.045/image-25% 3.06 cr/image$0.060 official price | Per output image |
| 2K · Medium | Highest tier for final quality checks. | $0.060/image-25% 4.08 cr/image$0.080 official price | Per output image |
Optional Add-ons & Billing NotesInput image pricing and multi-image requests.
| Item | Rule | Rate | Billing |
|---|---|---|---|
| Input images | Applied to each input image in image_urls (max 3), charged once per request regardless of n. | $0.0075/image-25% 0.51 cr/image$0.010 official price | Per input image |
| Multiple outputs (n) | n can be 1-10. The output rate is multiplied by n; failed tasks are not charged. | Output rate × n | Per request |
Grok Imagine Image 2.0 capabilities for production image workflows
Generate images from text or edit them with up to 3 reference images in one model. The mode switches automatically based on the number of input images, with matrix-priced Low/Medium quality and 1K/2K resolution, and up to 10 images per request.
Grok Imagine Image 2.0 guides and comparisons
Core image capabilities

Create a commercial visual from one prompt

Direct an edit with a reference image

Compose from multiple references
What You Can Do
Generate Marketing Visuals
Edit With Input Images
Batch Variations With n
Control Cost by Tier
Grok Imagine Image 2.0 vs other image models
| Feature | Grok Imagine Image 2.0 | Seedream 5.0 Pro | GPT Image |
|---|---|---|---|
| Starting price | ~$0.030 / image | From ~$0.034 / image | Token or tier based |
| Output tiers | Low/Medium x 1K/2K | 1K / 2K | Quality tiers |
| Reference input | Up to 3 images | Up to 10 images | Supported |
| Images per request | 1-10 | 1 | Model dependent |
| Best for | Fast iteration, batch creatives, reference edits | Ads, product creative, image editing | OpenAI image workflows |
Model ID, reference inputs, and output limits
Exact model ID, two image modes
Use model ID grok-imagine-image-2.0. Send a prompt alone for text-to-image, or add 1-3 input images to switch to editing without a separate edit model ID.
Quality and resolution are independent
quality (low/medium) controls generation effort and speed; resolution (1k/2k) controls output pixels. Both enter the price matrix - the four combinations are priced 1x / 1.5x / 1.5x / 2x of base.
Input fees are charged once
Each input image adds 0.25x base per request, regardless of how many outputs you request with n. Failed tasks are not charged.
Why use Grok Imagine Image 2.0 through EvoLink
Live cost before generation
Review the current price and estimated credits before submitting a task, based on resolution, quality, output count, and reference images.
Unified API
One API key works across Grok, Seedream, Nano Banana, GPT Image, video, audio, and LLM models.
Unified Balance
Track credits, spending, and model usage in one console.
Task Status Tracking
See whether an image task is submitted, processing, completed, or failed.
Stable Result Hosting
Generated images are re-hosted on EvoLink CDN so result links stay usable after the upstream links expire.
Grok Model Family

Grok Imagine Video 1.5
xAI video generation route: text-to-video, image-to-video, and reference-to-video in one model with 1-15s durations.
View
Grok Imagine Video
The first-generation Grok Imagine video route for text-to-video and image-to-video workflows.
View
Other image models on EvoLink

Seedream 5.0 Pro
BytePlus image route with 1K/2K output tiers, up to 10 reference images, and instruction-based editing.
View


FAQ
What is the exact Grok Imagine Image 2.0 model ID?
Use grok-imagine-image-2.0 for both text-to-image generation and editing with 1-3 reference images. You do not need a separate editing model ID.
How much does Grok Imagine Image 2.0 cost?
Pricing is a matrix of resolution and quality: 1K Low is the base rate, 1K Medium and 2K Low are 1.5x, and 2K Medium is 2x. The output rate is multiplied by n, and each input image adds 0.25x base once per request.
Can I preview before integrating the API?
Yes. Use the Playground to test output quality, estimate credits, and inspect the request JSON before wiring it into your product.
What is the difference between quality and resolution?
quality (low/medium) controls generation effort - low takes about 10s, medium 10-75s with better detail. resolution (1k/2k) controls output pixels. They are independent parameters and both affect the price.
How do I use it for image editing?
Pass 1-3 image URLs in image_urls together with the prompt. The model switches to editing mode automatically. With multiple images, reference each one in the prompt as <IMAGE_0>, <IMAGE_1>, <IMAGE_2>.
Can I generate multiple images with n?
Yes. n can be 1-10 in a single request. The output rate is multiplied by n, while input image fees are charged only once per request.
Are input images billed?
Yes. Each input image in image_urls adds 0.25x the base rate, charged once per request regardless of n. Only public http(s) URLs are accepted - base64 uploads are rejected.
Can I set custom pixel dimensions?
No. size accepts 13 aspect-ratio presets plus auto. Custom WIDTHxHEIGHT values are not supported; resolution is controlled separately with the 1k/2k parameter.
What if a generation fails?
Failed tasks are not charged - the full pre-authorized amount is refunded, including upstream rejections, content moderation blocks, and timeouts.
Where do I go after topping up?
Return to the Playground for more tests, or create an API key and use /v1/images/generations with model grok-imagine-image-2.0.
API Reference
Select endpoint
Authentication
All APIs require Bearer Token authentication.
Authorization:
Bearer YOUR_API_KEY/v1/images/generationsGenerate Image
Grok Imagine Image 2.0 is xAI's image generation and editing model — text-to-image and image editing share the same model name. Omit image_urls for text-to-image; pass 1-3 reference images and it automatically switches to image editing, no model change needed.
Asynchronous processing mode, use the returned task ID to .
Generated image links are valid for 24 hours, please save them promptly.
Request Parameters
modelstringRequiredDefault: grok-imagine-image-2.0Image generation model name. Text-to-image and image editing share this model name; the mode switches automatically depending on whether image_urls is provided.
| Value | Description |
|---|---|
| grok-imagine-image-2.0 | Grok Imagine Image 2.0 model |
grok-imagine-image-2.0promptstringRequiredPrompt describing the image you want to generate, or how to edit the reference images you provide.
Notes
- Multi-image reference syntax: use <IMAGE_0>, <IMAGE_1>, <IMAGE_2> in the prompt to refer to the 1st, 2nd and 3rd reference image respectively
- Indexes start at 0 and map one-to-one to the order of the image_urls array
- Example: Place the person from <IMAGE_0> into the scene of <IMAGE_1>
Cyberpunk Tokyo street at night, neon lights reflecting on the wet pavementimage_urlsarrayOptionalReference image URL list for image-to-image and image editing functions.
Notes
- Number of input images per request: 0~3 (omitted = text-to-image, 1~3 = image editing)
- Only publicly accessible http / https image URLs are supported; base64 and data URLs are not supported
- Supported file formats: .jpeg, .jpg, .png, .webp
- Image URLs must be directly accessible by the server, or directly download when accessed (typically ending with image file extensions such as .png, .jpg)
- In image editing scenarios the reference images incur an additional charge, counted once per request and not multiplied by n
["https://example.com/person.png", "https://example.com/scene.png"]sizestringOptionalDefault: autoAspect ratio of the generated image, defaults to auto.
| Value | Description |
|---|---|
| auto | The model decides the ratio itself; omitting this parameter is equivalent to auto (output is usually portrait) |
| 1:1 | Square |
| 4:3 / 3:4 | Classic landscape / portrait |
| 3:2 / 2:3 | Standard landscape / portrait |
| 16:9 / 9:16 | Widescreen / mobile portrait |
| 2:1 / 1:2 | Ultra-wide / ultra-tall |
| 19.5:9 / 9:19.5 | Full-screen phone landscape / portrait |
| 20:9 / 9:20 | Ultra-wide landscape / portrait |
Notes
- Values outside the 13 supported ratios are not supported; custom WIDTHxHEIGHT pixel sizes are not accepted
16:9resolutionstringOptionalDefault: 1KPixel tier of the output image, defaults to 1K; supports the 1K and 2K tiers.
| Value | Description |
|---|---|
| 1K | Standard resolution (default) |
| 2K | Higher resolution |
Notes
- This model does not support 4K
- Values are case-insensitive
1KqualitystringOptionalDefault: mediumGeneration quality tier, controls how deeply the model thinks, defaults to medium.
| Value | Description |
|---|---|
| low | Faster output, lower cost |
| medium | Better image quality and detail |
Notes
- This model only supports the low / medium tiers; other values such as high are not supported
- quality (quality tier) and resolution (pixel tier) are independent and can be combined freely
- Values are case-insensitive
mediumnintegerOptionalDefault: 1Number of images to generate, range 1~10, defaults to 1.
| Value | Description |
|---|---|
| 1-10 | Any integer between 1 and 10 |
Notes
- Each image is billed independently, cost grows linearly with n
- The additional charge for reference images is counted once per request and is not multiplied by n
- When the task completes, results returns n independent image links
1callback_urlstringOptionalHTTPS callback address after task completion.
Notes
- Triggered when task is completed, failed, or cancelled; sent after billing confirmation
- HTTPS only; callbacks to internal IP addresses are prohibited; max length 2048 chars
- Timeout: 10s, max 3 retries on failure (after 1s / 2s / 4s)
- Callback body format is consistent with the task query API response; a 2xx response is considered successful, other status codes trigger a retry
https://your-domain.com/webhooks/image-task-completed