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.
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.
Cost analysis
| Provider | Cost | Notes |
|---|---|---|
| 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.ai | Not available | Grok Imagine Image 2.0's chained edit model is not listed on Fal.ai as of this writing. |
| Replicate | Not available | Grok Imagine Image 2.0's chained edit model is not listed on Replicate as of this writing. |
Muapi bills each follow-up edit the same as a standard generation, with no separate pricing tier for edits.
Grok Imagine Image 2.0's chained edit model is not listed on Fal.ai as of this writing.
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.
Configuration schema
| Parameter | Type | Description | Default |
|---|---|---|---|
| Prompt | string | Text prompt describing the desired edit. Max 5000 characters. | Change the subject's jacket to a teal windbreaker, keep everything else in the scene unchanged. |
| Source Request ID | string | The request_id returned by a prior grok-imagine-image-2 generation to edit. | 189245 |
| Mask Segment Indexes | array | Optional index numbers of segments from the source image to restrict the edit to. | - |
Text prompt describing the desired edit. Max 5000 characters.
Change the subject's jacket to a teal windbreaker, keep everything else in the scene unchanged.The request_id returned by a prior grok-imagine-image-2 generation to edit.
189245Optional index numbers of segments from the source image to restrict the edit to.
-Developer documentation
Generate a base image first
grok-imagine-image-2 with a prompt and aspect_ratio, and note the request_id once the task completes.Describe the edit
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.Optionally scope the edit
mask_indexs (an array of segment index numbers from the source generation) to restrict the edit to particular regions instead of the whole image.Poll and chain
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"}'
Frequently asked
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.
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.
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.
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.
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.
Each edit call is billed at $0.05 per generation, the same as a standard Grok Imagine Image 2.0 request.