About Grok Imagine Image 2.0
Grok Imagine Image 2.0 is xAI's image model, released in August 2026 with a focus on layout and lettering. It makes a picture from a prompt in five shapes (square, 2:3, 3:2, 16:9 and 9:16) and edits with one to five source pictures, at one price per picture.
Call it with the model name xai/grok-imagine-image-2.0/text-to-image on POST /jobs/createTask, from $0.028.
Introduction
Create a Grok Imagine Image 2.0 picture with a prompt and an optional aspect_ratio selection.
Key features
The text limit is 8,000 characters, and five shapes are offered at the same image rate.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Describe what you want to make. |
aspect_ratio | No | The shape of the frame: wide, square or tall. 1:1 · 2:3 · 3:2 · 16:9 · 9:16 · Default: 1:1 |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per image |
|---|---|
| Standard | $0.028 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
Prompt guide & pro tips
Name the subject, its action and the desired view; the gardener example asks for a macro photo and shallow depth of field.
API quick start
Call the Grok Imagine Image 2.0 API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model xai/grok-imagine-image-2.0/text-to-image and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "xai/grok-imagine-image-2.0/text-to-image",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"aspect_ratio": "1:1"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
Grok Imagine Image 2.0 API questions
How much does the Grok Imagine Image 2.0 API cost?
Grok Imagine Image 2.0 starts at $0.028 per image with Create Image, its lowest-priced task. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What is the model name for Grok Imagine Image 2.0 in the API?
Put xai/grok-imagine-image-2.0/text-to-image for Create Image; xai/grok-imagine-image-2.0/edit for Edit Image in the model field of POST /jobs/createTask.
What does Grok Imagine Image 2.0 accept?
A text prompt can create a new image, while an edit also takes one to five images. Both workflows offer five aspect ratios.
How should I refer to several source images?
Write Image 1, Image 2 and later positions in the instruction so each source has a clear role. The editing endpoint accepts up to five uploads.
Did the tea-tin edit keep the scene around it?
In our tests, the tin received a plum-blossom and gold-leaf label while its lid, table and lighting stayed as they were. That is an observation from the supplied example.
What did the robot-gardener test show?
In our tests, the small moss-covered robot poured water onto a bonsai, with textured miniature details and blurred herbs behind it.
Which image shapes can I request?
Choose 1:1, 2:3, 3:2, 16:9 or 9:16 for generation or editing. Omitting the shape uses 1:1.
What are the limits of the Grok Imagine Image 2.0 API?
Aspect ratios: 1:1 · 2:3 · 3:2 · 16:9 · 9:16; Prompt length (characters): 8,000. Requests outside these limits are rejected before anything is charged.
Can I try Grok Imagine Image 2.0 without writing code?
Run Grok Imagine Image 2.0 in the Playground with your API USD balance, without an API key. Each run appears in your developer history with its matching code.
All Grok models
Nano Banana 2.1 goes up to 4K and takes up to fourteen references. Grok Imagine Image 2.0 costs less per picture for posters and quick edits.
- Grok Imagine Image 2.0 APIxAI's image model for text-to-image and edits from up to five picturesFrom $0.028 per image
- Grok Imagine Video 1.5 API1 to 15-second clips with sound and spoken lines, timed keyframes and seamless loopsFrom $0.14 for a 5-second clip
- Grok STT APITranscripts with word timings in 25 languagesFrom $0.00004 per second
- Grok TTS API71 voices across 20 languages with speech tagsFrom $0.018 per 1,000 characters