Models/xAI/Grok Imagine Image 2.0
Available2 endpoints

Grok Imagine Image 2.0 API

Grok Imagine Image 2.0 is xAI's next-generation image model, built for real creative work rather than one-shot novelty. It follows instructions closely down to fine detail and plans typography and layout the way a designer would. Muapi exposes it as two chained endpoints — grok-imagine-image-2 for text-to-image generation, and grok-imagine-image-2-edit for a targeted follow-up edit to a prior generation — both use Muapi's asynchronous submit-and-poll pattern.

i

Grok Imagine Image 2.0 API is available on Muapi

Create a Muapi API key, submit a generation request, and poll the returned request ID for the finished image.

Capabilities

xAI built Image 2.0 around editing as a first-class capability, alongside stronger instruction-following for generation.

Precise instruction-following

Follows detailed prompts down to fine layout and typography.

Chained follow-up edits

Edit a prior generation by its request ID without re-describing the whole scene.

Targeted edits

Change only the described region, optionally scoped with mask_indexs.

Aspect ratio control

Generate in 1:1, 2:3, 3:2, 16:9, or 9:16.

Sharp text rendering

Keep small text and dense typography legible for posters, infographics, and UI mockups.

Consistent style across edits

Preserve subject, style, and composition across chained edits.

Real-world performance

xAI reports Image 2.0 ranks second in the world in both text-to-image generation and image editing on the public Arena leaderboards as of August 2026, trained for fidelity across photography, design, and illustration.

One Grok Imagine integration

Grok Imagine Image 2.0 uses Muapi's shared authentication, task lifecycle, file upload, and billing infrastructure — the same pattern already used by the Grok Imagine models.

Grok Imagine Image 2.0 endpoint comparison

EndpointPurposeInputOutputPrice
grok-imagine-image-2Text-to-image generationprompt, aspect_ratioNew image + request_id$0.05/call
grok-imagine-image-2-editChained follow-up editprompt, request_id, optional mask_indexsRefined image + request_id$0.05/call

Built for practical visual work

Posters and infographics

Create dense compositions where small text, hierarchy, and layout remain legible.

Product and campaign design

Generate polished concepts and refine a selected region without rebuilding the scene.

Photography, design, and illustration

Maintain a consistent subject, style, and composition across creative edits.

Grok Imagine Image 2.0 API endpoints

Both endpoints use the same Muapi REST contract. Submit JSON with the x-api-key header, then poll the standard prediction endpoint. Editing chains off the request_id of a prior generation.

1. Generate an image

curl -X POST https://api.muapi.ai/api/v1/grok-imagine-image-2 \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A high-contrast halftone portrait in fine white dots on black", "aspect_ratio":"1:1"}'

Returns a request_id. Poll /predictions/{request_id}/result until the task completes.

2. Apply a follow-up edit

curl -X POST https://api.muapi.ai/api/v1/grok-imagine-image-2-edit \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Change the jacket to a teal windbreaker", "request_id":"REQUEST_ID"}'

Pass the request_id from step 1 or a prior edit to keep refining the same image. Optionally add mask_indexs.

Grok Imagine Image 2.0 API FAQ

What's new in Grok Imagine Image 2.0 compared to the original Grok Imagine?

Image 2.0 focuses on precise instruction-following, sharp typography and layout, and a dedicated follow-up edit endpoint.

Can I edit an existing image with Grok Imagine Image 2.0?

Yes. Use grok-imagine-image-2-edit with the request_id from a prior generation and a prompt describing the edit.

Can I edit a photo I upload?

No. Editing chains from a prior generation request_id, not an arbitrary uploaded image.

What does mask_indexs do?

It is an optional array of segment indexes that scopes an edit to a specific region.

What aspect ratios are supported?

Text-to-image generation supports 1:1, 2:3, 3:2, 16:9, and 9:16.

How do I access Grok Imagine Image 2.0?

Create a Muapi API key, send it in the x-api-key header, and call grok-imagine-image-2 or grok-imagine-image-2-edit for follow-up edits.

How is Grok Imagine Image 2.0 billed?

Each generation and follow-up edit is billed at $0.05 per call.