---
title: Editing images — MiniMax H3 Image | Runware Docs
url: https://runware.ai/docs/models/minimax-h3-image/guides/editing-images
description: "How to edit one image with MiniMax H3 Image: naming the target in words, moving, copying, replacing and deleting objects, rewriting text, and editing over several rounds."
---
### [Introduction](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#introduction)

Attach one image in `inputs.referenceImages` and MiniMax H3 Image **switches from generating to editing**. The prompt becomes an instruction about that image, and the result is the same picture with the change made.

There is **no mask to paint**. The instruction alone tells the model which object to change, so it has to point at that object in words, by where it sits or by what it looks like. The kitchen below went in with one instruction to repaint the lower cabinets.

**White**:

![A bright kitchen with white shaker cabinets above and below a white marble countertop, brass bar handles, a white subway tile backsplash, a stainless steel range and hood in the middle and a farmhouse sink under a window on the right](https://runware.ai/docs/assets/input-kitchen.D5TUBhDp_2mrnPk.jpg)

> **Prompt**: A real estate listing photograph of a bright renovated kitchen, seen straight on. One run of white shaker-style cabinets fills the back wall: upper cabinets above and lower cabinets below a white marble countertop with soft gray veining, every door with a slim brushed brass bar handle. A white subway tile backsplash between the countertop and the upper cabinets, a stainless steel range with a slim hood in the middle of the run, and a white farmhouse sink under a window on the right with soft daylight coming in and a small potted basil plant on the sill. Light oak wide-plank floor. Wide shot at chest height, 24mm lens, verticals straight. Photoreal interior photography, no people, no text.

**Navy**:

![The same kitchen with the lower cabinets painted deep navy blue, the upper cabinets still white and the countertop, backsplash, range, sink and window unchanged](https://runware.ai/docs/assets/output-recolor.Ez-TtjGq_Z1Ryfjo.jpg)

> **Prompt**: In image 1, repaint the lower cabinets below the countertop a deep navy blue, keeping their shaker doors, their brass handles, their size and their position. Keep the white upper cabinets, the marble countertop, the backsplash, the range and hood, the sink, the window, the floor, the framing and the lighting exactly as they are.

The upper and lower cabinets are the same white shaker doors, so **their location is all that tells them apart**. The instruction says "below the countertop" for the run that changes and names "the white upper cabinets" first among what stays.

This guide covers the request and the output size, writing the instruction, the four operations on an object, changing text, and editing over several rounds. Combining two or more images in one request is covered in [multi-reference composition](https://runware.ai/docs/models/minimax-h3-image/guides/multi-reference-composition), and writing a prompt from scratch in [prompting](https://runware.ai/docs/models/minimax-h3-image/guides/prompting).

### [The request](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#the-request)

An edit is an ordinary generation request **with one image attached**: the image goes in `inputs.referenceImages` and the instruction in `positivePrompt`.

**TypeScript**:

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'minimax:h3@image',
  positivePrompt: 'In image 1, repaint the lower cabinets below the countertop a deep navy blue, keeping their shaker doors, their brass handles, their size and their position. Keep the white upper cabinets, the marble countertop, the backsplash, the range and hood, the sink, the window, the floor, the framing and the lighting exactly as they are.',
  inputs: {
    referenceImages: [
      'https://assets.runware.ai/guides/minimax-h3-image/editing-images/input-kitchen.jpg'
    ]
  },
  width: 2304,
  height: 1728
})
```

**Python**:

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "minimax:h3@image",
            "positivePrompt": "In image 1, repaint the lower cabinets below the countertop a deep navy blue, keeping their shaker doors, their brass handles, their size and their position. Keep the white upper cabinets, the marble countertop, the backsplash, the range and hood, the sink, the window, the floor, the framing and the lighting exactly as they are.",
            "inputs": {
                "referenceImages": [
                    "https://assets.runware.ai/guides/minimax-h3-image/editing-images/input-kitchen.jpg"
                ]
            },
            "width": 2304,
            "height": 1728
        })

asyncio.run(main())
```

**cURL**:

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "imageInference",
      "taskUUID": "7c2e9a41-5b8d-4f36-a0e2-91d4c6b3f580",
      "model": "minimax:h3@image",
      "positivePrompt": "In image 1, repaint the lower cabinets below the countertop a deep navy blue, keeping their shaker doors, their brass handles, their size and their position. Keep the white upper cabinets, the marble countertop, the backsplash, the range and hood, the sink, the window, the floor, the framing and the lighting exactly as they are.",
      "inputs": {
        "referenceImages": [
          "https://assets.runware.ai/guides/minimax-h3-image/editing-images/input-kitchen.jpg"
        ]
      },
      "width": 2304,
      "height": 1728
    }
  ]'
```

**CLI**:

```bash
runware run minimax:h3@image \
  positivePrompt="In image 1, repaint the lower cabinets below the countertop a deep navy blue, keeping their shaker doors, their brass handles, their size and their position. Keep the white upper cabinets, the marble countertop, the backsplash, the range and hood, the sink, the window, the floor, the framing and the lighting exactly as they are." \
  inputs.referenceImages.0=https://assets.runware.ai/guides/minimax-h3-image/editing-images/input-kitchen.jpg \
  width=2304 \
  height=1728
```

**JSON**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "7c2e9a41-5b8d-4f36-a0e2-91d4c6b3f580",
  "model": "minimax:h3@image",
  "positivePrompt": "In image 1, repaint the lower cabinets below the countertop a deep navy blue, keeping their shaker doors, their brass handles, their size and their position. Keep the white upper cabinets, the marble countertop, the backsplash, the range and hood, the sink, the window, the floor, the framing and the lighting exactly as they are.",
  "inputs": {
    "referenceImages": [
      "https://assets.runware.ai/guides/minimax-h3-image/editing-images/input-kitchen.jpg"
    ]
  },
  "width": 2304,
  "height": 1728
}
```

- `inputs.referenceImages` takes the image as a URL, a UUID (a previous generation's, or one uploaded via Media Storage), a data URI or base64, in JPEG, PNG, WebP, HEIC or HEIF. Each side has to measure **between 128 and 8,192 pixels**, the long side can be at most four times the short one, and the file can weigh up to 64 MiB. The array takes up to 16 images, and more than one combines them.
- `positivePrompt` carries the instruction and **calls the reference image 1**. Every reference is named by its position in the array, so the same wording carries straight into requests with several images.
- `width` and `height` are optional, covered in [Output size](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#output-size).

An edit **always runs the prompt optimizer**, which rewrites the instruction into a detailed description before generating. A request that sets `settings.promptOptimizer` to `false` alongside a reference is rejected, so leave the setting out of edits.

#### [Output size](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#output-size)

With a reference attached, the size of the result comes from one of three places:

| Request | Output |
| --- | --- |
| `resolution` set to `1K`, `2K` or `4K` | That tier, in the aspect ratio of the reference |
| `width` and `height` | Exactly that size, never scaled or rounded |
| Neither | 4K |

`resolution` and `width`/`height` **cannot be combined** in one request. An exact size has to come to between 655,360 and 20,000,000 pixels, with each side from 468 to 7,745 and a ratio between 1:3 and 3:1.

Every before-and-after on this page sends **the source's own width and height**, so both frames come back the same size and the slider can line them up. The chain in [Multi-round editing](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#multi-round-editing) sends `resolution` instead.

### [Writing the instruction](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#writing-the-instruction)

After naming the reference, an instruction has **four parts**: the target, what it becomes, which parts of it hold, and what else in the frame stays. The kitchen prompt, clause by clause:

**[Reference]** In image 1,, **[Target]** repaint the lower cabinets below the countertop, **[Change]** a deep navy blue, **[Hold]** keeping their shaker doors, their brass handles, their size and their position, **[Keep]** Keep the white upper cabinets, the marble countertop, the backsplash, the range and hood, the sink, the window, the floor, the framing and the lighting exactly as they are

Every edit on this page follows the same shape:

```text
In image 1, change [the target, by location or features] to [what it becomes], keeping its [parts that stay]. Keep [everything else in the frame, by name] exactly as it is.
```

The target is **picked out by its location**, "the lower cabinets below the countertop". Features work as well, a color, a material, a shape or a printed label, as long as nothing else in the frame shares them. When two objects match, add the position and **name the look-alike in the keep list**, so the model has both halves: the one that changes and the one that stays.

The hold clause **fences the change to one property**. "Repaint" could also bring new doors or new handles, so the clause keeps the shaker doors, the handles, the size and the position. A cup that only changes color takes the same treatment: "change the cup on the left to blue, keeping its shape, material, position and size".

The keep list **names what is in the frame**, the backsplash or the floor, rather than ending on "everything else". Each name hands the model one part of image 1 to carry over, and none of them has to describe what that part looks like.

### [Moving, copying, replacing and deleting](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#moving-copying-replacing-and-deleting)

Most edits to an object are one of four operations, and **each verb leaves the frame in a different state**. The prompt covers what that state needs:

| Operation | What the prompt names |
| --- | --- |
| Move | The object, where it is, where it goes and what fills the spot it leaves |
| Copy | The object, where the copy goes and that the original stays |
| Replace | What goes, what takes its place and that it keeps the spot and the size |
| Delete | What goes and what fills the area |

The brunch spread below went through four separate requests, one per operation, each sent with the original photo:

**Original**:

![An overhead view of a brunch spread on a light oak table: granola with yogurt and blueberries at the upper left, avocado toast with a poached egg on a white plate in the center, a glass of orange juice at the upper right, a dish of sliced strawberries at the lower left and a crumpled napkin with a teaspoon at the lower right](https://runware.ai/docs/assets/input-brunch.DdOSmHXX_Z1vSx7W.jpg)

> **Prompt**: A food delivery app menu photograph of a brunch spread on a light oak table, shot straight down from above. Upper left: a white bowl of granola with yogurt and fresh blueberries. Center: a round white plate of avocado toast topped with a poached egg. Upper right: a tall glass of fresh orange juice. Lower left: a small white ceramic dish of sliced strawberries. Lower right: a crumpled paper napkin and a used teaspoon. Plenty of bare table between the dishes, with an empty stretch of table at the bottom center. Soft natural daylight from the left with gentle shadows. Photoreal food photography, no hands, no text, no logos.

**Move**:

![The same brunch spread with the dish of strawberries moved to the bottom center below the avocado toast and bare oak table in the lower left corner](https://runware.ai/docs/assets/output-move.CKngnVsL_ZFAdCh.jpg)

> **Prompt**: In image 1, move the small dish of sliced strawberries from the lower left corner to the bare table at the bottom center, just below the plate of avocado toast, keeping its size and its contents. Fill the lower left corner with bare light oak table that continues the wood grain. Keep the granola bowl, the plate of avocado toast, the glass of orange juice, the napkin, the teaspoon, the framing and the lighting exactly as they are.

**Copy**:

![The same brunch spread with a second glass of orange juice standing just to the left of the first](https://runware.ai/docs/assets/output-copy.BSddMNzc_Z1FcjP2.jpg)

> **Prompt**: In image 1, add a copy of the glass of orange juice in the upper right, identical in size, shape and fill level, standing on the bare table just to the left of it. Keep the original glass where it is, and keep the granola bowl, the plate of avocado toast, the dish of strawberries, the napkin, the teaspoon, the framing and the lighting exactly as they are.

**Replace**:

![The same brunch spread with a stack of blueberry pancakes and maple syrup on the center plate in place of the avocado toast](https://runware.ai/docs/assets/output-replace.BumRhyhJ_ZDBMlc.jpg)

> **Prompt**: In image 1, replace the avocado toast on the center plate with a short stack of three buttermilk pancakes topped with fresh blueberries and a drizzle of maple syrup, filling the plate the way the toast did. Keep the plate, the granola bowl, the glass of orange juice, the dish of strawberries, the napkin, the teaspoon, the framing and the lighting exactly as they are.

**Delete**:

![The same brunch spread with the napkin and teaspoon gone and bare oak table in the lower right corner](https://runware.ai/docs/assets/output-delete.BfBEta_i_RtVIG.jpg)

> **Prompt**: In image 1, remove the crumpled paper napkin and the used teaspoon from the lower right corner, and fill the area with bare light oak table that continues the wood grain and the daylight around it. Keep the granola bowl, the plate of avocado toast, the glass of orange juice, the dish of strawberries, the framing and the lighting exactly as they are.

A move and a delete **both leave a hole**, so both prompts say what fills it: bare oak table that continues the grain. Left unsaid, what lay under the dish or the napkin is the model's to invent.

A copy **keeps the original in the keep list**, "keep the original glass where it is", which separates a second glass from a glass that moved. A replace **holds the spot and the size**, the same plate filled the way the toast filled it, so for a delivery app one plated shot becomes a photo for every dish served on that plate.

### [Changing text and data](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#changing-text-and-data)

Text in an image is edited like any other object, and **quoting it is how you point at it**. Give each line as it reads now and **the complete line as it should read**, then say whether the layout and the rest of the copy stay.

**$649**:

![A portrait travel poster with a golden-hour photo of Lisbon's pastel hillside houses and a yellow tram above a deep navy panel reading LISBON, 4 nights · flights + hotel, from $649, Book by May 15 and a line of fine print](https://runware.ai/docs/assets/input-poster.8joamG0t_Chm9A.jpg)

> **Prompt**: A travel agency promotional poster, portrait format, a flat graphic design that fills the whole frame. The top half is a photograph of the hillside old town of Lisbon at golden hour, pastel houses with terracotta roofs and a yellow tram climbing a narrow street. The bottom half is a solid deep navy panel with centered text in clean sans-serif type, from top to bottom: the word "LISBON" in large bold white capitals, the line "4 nights · flights + hotel" in smaller white type, the line "from $649" in large bold coral type, the line "Book by May 15" in white, and at the bottom "Price per person, based on two sharing" in small white type. Generous margins, no other text, no logos.

**$579**:

![The same poster with the offer lines now reading from $579 and Book by June 30, and the photo, the LISBON title, the trip line and the fine print unchanged](https://runware.ai/docs/assets/output-text.BllexC9S_ZQmhWi.jpg)

> **Prompt**: In image 1, change the line "from $649" to "from $579" and the line "Book by May 15" to "Book by June 30". Keep both lines in the same font, size, color and position. Keep the photo, the word "LISBON", the line "4 nights · flights + hotel", the line about the price per person, the navy panel and the layout exactly as they are.

```text
In image 1, change the line "from $649" to "from $579" and the line "Book by May 15" to "Book by June 30". Keep both lines in the same font, size, color and position. Keep the photo, the word "LISBON", the line "4 nights · flights + hotel", the line about the price per person, the navy panel and the layout exactly as they are.
```

The prompt **writes out both new lines in full**, "from $579" rather than "take $70 off the price", which leaves the model no arithmetic or wording to work out. Prices and dates go in exactly as they should print.

The keep list **quotes a line that must not change**, "4 nights · flights + hotel", since a panel of white type offers several lines that look alike. When the new text runs longer than the old, say what gives: whether the line may wrap or the type should shrink to keep the layout.

Rendering text in a new image is covered in [text and layouts](https://runware.ai/docs/models/minimax-h3-image/guides/text-and-layouts).

### [Multi-round editing](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#multi-round-editing)

Each request is independent, and **the API keeps no memory between them**. To keep editing a result, send it back as the reference for the next round, as the previous response's `imageURL` or `imageUUID`, with a complete instruction of its own. The casual photo below became a headshot in three:

**Original**:

![A woman with shoulder-length wavy auburn hair and freckles smiling softly in a heather gray T-shirt, a beige sofa and a bookshelf out of focus behind her](https://runware.ai/docs/assets/input-portrait.CrbkPUAz_Z2sP5wW.jpg)

> **Prompt**: A casual portrait photograph of a woman in her early thirties with shoulder-length wavy auburn hair and light freckles, shown from the waist up, smiling softly at the camera. She wears a plain heather gray crew-neck T-shirt. Behind her, a home living room with a beige sofa and a bookshelf softly out of focus. Soft window daylight from the right. Eye level, 85mm lens, shallow depth of field. Photoreal portrait photography, no text.

**1 · Blazer**:

![The same woman in an open navy blazer over a white button-down shirt, in the same living room](https://runware.ai/docs/assets/output-round-1.DbfqsDJI_Z16p4QR.jpg)

> **Prompt**: In image 1, replace the gray T-shirt with a tailored navy blazer worn open over a crisp white button-down shirt. Keep her face, her hair, her freckles, her expression, her pose, the living room behind her, the framing and the lighting exactly as they are.

**2 · Office**:

![The same woman in the navy blazer and white shirt in a bright office with white walls, a glass partition and green plants out of focus behind her](https://runware.ai/docs/assets/output-round-2.DxHho4qF_Z9mCBj.jpg)

> **Prompt**: In image 1, replace the living room behind the woman with a bright modern office, white walls, a glass partition and a few green plants softly out of focus. Relight her with soft, even daylight from a large window on the left. Keep her face, her hair, her freckles, her expression, the navy blazer and the white shirt exactly as they are.

**3 · Charcoal**:

![The same woman in the same office with the blazer now gray over the white shirt](https://runware.ai/docs/assets/output-round-3.B3ZpNtqd_Z1wQBPJ.jpg)

> **Prompt**: In image 1, change the navy blazer to charcoal gray, keeping its cut, its lapels and its fit. Keep her face, her hair, her freckles, her expression, her pose, the white shirt, the office behind her, the framing and the lighting exactly as they are.

The second round, with the first round's output as its only reference:

**TypeScript**:

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'minimax:h3@image',
  positivePrompt: 'In image 1, replace the living room behind the woman with a bright modern office, white walls, a glass partition and a few green plants softly out of focus. Relight her with soft, even daylight from a large window on the left. Keep her face, her hair, her freckles, her expression, the navy blazer and the white shirt exactly as they are.',
  inputs: {
    referenceImages: [
      'https://assets.runware.ai/guides/minimax-h3-image/editing-images/output-round-1.jpg'
    ]
  },
  resolution: '2K'
})
```

**Python**:

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "minimax:h3@image",
            "positivePrompt": "In image 1, replace the living room behind the woman with a bright modern office, white walls, a glass partition and a few green plants softly out of focus. Relight her with soft, even daylight from a large window on the left. Keep her face, her hair, her freckles, her expression, the navy blazer and the white shirt exactly as they are.",
            "inputs": {
                "referenceImages": [
                    "https://assets.runware.ai/guides/minimax-h3-image/editing-images/output-round-1.jpg"
                ]
            },
            "resolution": "2K"
        })

asyncio.run(main())
```

**cURL**:

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "imageInference",
      "taskUUID": "1f6b3d8e-a24c-4e97-b5d1-6a0c8e2f4b39",
      "model": "minimax:h3@image",
      "positivePrompt": "In image 1, replace the living room behind the woman with a bright modern office, white walls, a glass partition and a few green plants softly out of focus. Relight her with soft, even daylight from a large window on the left. Keep her face, her hair, her freckles, her expression, the navy blazer and the white shirt exactly as they are.",
      "inputs": {
        "referenceImages": [
          "https://assets.runware.ai/guides/minimax-h3-image/editing-images/output-round-1.jpg"
        ]
      },
      "resolution": "2K"
    }
  ]'
```

**CLI**:

```bash
runware run minimax:h3@image \
  positivePrompt="In image 1, replace the living room behind the woman with a bright modern office, white walls, a glass partition and a few green plants softly out of focus. Relight her with soft, even daylight from a large window on the left. Keep her face, her hair, her freckles, her expression, the navy blazer and the white shirt exactly as they are." \
  inputs.referenceImages.0=https://assets.runware.ai/guides/minimax-h3-image/editing-images/output-round-1.jpg \
  resolution=2K
```

**JSON**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "1f6b3d8e-a24c-4e97-b5d1-6a0c8e2f4b39",
  "model": "minimax:h3@image",
  "positivePrompt": "In image 1, replace the living room behind the woman with a bright modern office, white walls, a glass partition and a few green plants softly out of focus. Relight her with soft, even daylight from a large window on the left. Keep her face, her hair, her freckles, her expression, the navy blazer and the white shirt exactly as they are.",
  "inputs": {
    "referenceImages": [
      "https://assets.runware.ai/guides/minimax-h3-image/editing-images/output-round-1.jpg"
    ]
  },
  "resolution": "2K"
}
```

In every round **the reference is image 1**, and image 1 is whatever the round before returned. Round three recolors "the navy blazer" that round one added and keeps "the office behind her" from round two, because from its side both are simply in the image it was given.

**Name things by what they are now**, never by their history. "The jacket from before" or "undo the last change" points at a request this round cannot see. To step back, send the earlier round's image as the reference again.

Each round **writes its own keep list**, including what earlier rounds added. Round two leaves her pose, the framing and the lighting out of it, since putting her in a new room under new light is the change itself.

The chain sends `resolution: "2K"` and no `width` or `height`, so each round comes back at 2K **in the shape of the image it was given**, and the chain stays in the 3:4 of the original portrait.

#### [Drift across rounds](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#drift-across-rounds)

Every round **re-renders the whole image**, including the parts the keep list protects, and each pass adds contrast and sharpening. Two four-round test chains from the original portrait measured it on her face: edge sharpness rose every round, to more than twice the original's by the fourth, and her skin and hair turned painted. One chain asked for nothing to change, the other for small edits away from her face, and both drifted at the same rate. The headshot chain shows the start of it, with the hair and the blazer fabric sharper by round three than in the original.

Keep chains **as short as you can**. Make the changes you already know in as few rounds as possible, and when a result has drifted, go back to the original or the earliest round that still looks right rather than editing the latest one.

### [Tips](https://runware.ai/docs/models/minimax-h3-image/guides/editing-images#tips)

1. **Name the reference as image 1.** Every reference is numbered by its position, and with one image attached, the image is always 1.
    
2. **Point at the target in words.** There is no mask, so name where the target sits or a feature nothing else in the frame shares.
    
3. **Fence the change.** Say what the target becomes, then which of its parts hold, such as its shape, material, position and size.
    
4. **Build the keep list from the frame.** Name what stays, look-alikes first, rather than writing "everything else".
    
5. **Say what fills a hole.** A move or a delete leaves an empty spot, and the prompt names the surface that continues into it.
    
6. **Quote old and new text in full.** Write the complete replacement line, and say whether the layout and the rest of the copy stay.
    
7. **Send the latest output back.** Each round is independent, so pass the last result as image 1 with a complete instruction, and resend an earlier image to step back.
    
8. **Keep chains short.** Every round re-renders and sharpens the whole image, so make known changes in as few rounds as you can.
    
9. **Send a size.** The source's `width` and `height` for a before-and-after, `resolution` for a chain. With neither, the edit comes back at 4K.
    
10. **Leave the optimizer setting out.** Every edit runs the prompt optimizer, and `settings.promptOptimizer` set to `false` with a reference is rejected.