Grok Imagine Image 2.0 Edit: AI Image Editor

Apply targeted edits to a prior Grok Imagine Image 2.0 image. Chain follow-up prompts to refine one image over multiple rounds. Pay per generation.

📝

Overview

About this model

Grok Imagine Image 2.0 Edit applies a targeted, natural-language edit to a prior Grok Imagine Image 2.0 generation. Rather than accepting a freshly uploaded photo, it chains off the request_id returned by an earlier grok-imagine-image-2 (or grok-imagine-image-2-edit) call, changing only the region described in the prompt while preserving the rest of the composition, subject, and style.

An optional mask_indexs field lets you scope the edit to specific segments identified in the source generation, useful when you want to change one element — a garment, a prop, a background detail — without disturbing anything else in the frame. Because each edit returns its own request_id, edits can be chained repeatedly to progressively refine the same image across multiple rounds, making this endpoint well suited to iterative design and concepting workflows rather than one-shot generation.

1Swapping a single element (clothing, prop, background detail) in a previously generated image while keeping everything else identical
2Progressive, multi-round refinement of a concept image toward a final version
3Targeted corrections to typography, layout, or composition flagged after an initial generation
4Iterative product mockup or marketing asset revision driven by prompt-only feedback
5Building variant sets from one base generation by chaining different follow-up edits
💰

Pricing & Value

Cost analysis

muapiapp$0.05 per generation

Muapi bills each follow-up edit the same as a standard generation, with no separate pricing tier for edits.

Fal.aiNot available

Grok Imagine Image 2.0's chained edit model is not listed on Fal.ai as of this writing.

ReplicateNot available

Grok Imagine Image 2.0's chained edit model is not listed on Replicate as of this writing.

* Competitor pricing is estimated based on similar model architectures and usage tiers.

⚙️

Technical Details

Configuration schema

Promptstring

Text prompt describing the desired edit. Max 5000 characters.

Default ValueChange the subject's jacket to a teal windbreaker, keep everything else in the scene unchanged.
Source Request IDstring

The request_id returned by a prior grok-imagine-image-2 generation to edit.

Default Value189245
Mask Segment Indexesarray

Optional index numbers of segments from the source image to restrict the edit to.

Default Value-
📖

Implementation Guide

Developer documentation

How to Use Grok Imagine Image 2.0 Edit

  1. Generate a base image first

    • Call grok-imagine-image-2 with a prompt and aspect_ratio, and note the request_id once the task completes.
  2. Describe the edit

    • Call grok-imagine-image-2-edit with the source request_id and a prompt describing exactly what should change. Be specific about what to keep unchanged.
  3. Optionally scope the edit

    • Pass mask_indexs (an array of segment index numbers from the source generation) to restrict the edit to particular regions instead of the whole image.
  4. Poll and chain

    • Poll the standard Muapi prediction endpoint for the result. The response's request_id can be passed into another grok-imagine-image-2-edit call to keep refining the same image.
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, keep everything else unchanged", "request_id":"189245"}'

Common Questions

Frequently asked

What does Grok Imagine Image 2.0 Edit do?

It applies a targeted, prompt-described edit to an image previously generated by Grok Imagine Image 2.0, changing only the described region while preserving the rest of the image.

Can I upload my own photo to edit?

No. This endpoint only edits images that were themselves generated by grok-imagine-image-2 (or a prior grok-imagine-image-2-edit call), referenced by request_id.

What is request_id and where do I get it?

request_id is the identifier returned by a completed grok-imagine-image-2 (or grok-imagine-image-2-edit) generation. Pass it into this endpoint to edit that specific image.

What does mask_indexs control?

mask_indexs is an optional array of segment index numbers from the source generation, letting you restrict the edit to specific regions rather than the entire image.

Can I chain multiple edits together?

Yes. Each edit call returns its own request_id, which can be passed into another grok-imagine-image-2-edit call to progressively refine the same image over several rounds.

How is Grok Imagine Image 2.0 Edit billed?

Each edit call is billed at $0.05 per generation, the same as a standard Grok Imagine Image 2.0 request.