live
MODEL IDminimax:h3@image

MiniMax H3 Image

MiniMax
by

MiniMax H3 Image is an open-weights image generation and editing model from MiniMax. It creates images from text or edits and combines up to 16 reference images, at 1K, 2K or 4K, or at a custom width and height up to 20 megapixels. It follows counts, positions and layouts closely and renders long, dense text, which suits product and marketing visuals, posters and infographics, concept art, and compositions that merge several subjects.

MiniMax H3 Image

Editing images

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

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.

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

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.

WhiteNavy

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, and writing a prompt from scratch in prompting.

The request

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

Try in Playground
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
})
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 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
    }
  ]'
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
{
  "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
}
Response
[
  {
    "taskType": "imageInference",
    "taskUUID": "7c2e9a41-5b8d-4f36-a0e2-91d4c6b3f580",
    "imageUUID": "e4a1f7c2-3d96-4b08-8e5a-2c7f0b9d1a64",
    "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/e4a1f7c2-3d96-4b08-8e5a-2c7f0b9d1a64.jpg"
  }
]
  • 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.

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

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

RequestOutput
resolution set to 1K, 2K or 4KThat tier, in the aspect ratio of the reference
width and heightExactly that size, never scaled or rounded
Neither4K

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 sends resolution instead.

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:

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
ReferenceTargetChangeHoldKeep

Every edit on this page follows the same shape:

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

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:

OperationWhat the prompt names
MoveThe object, where it is, where it goes and what fills the spot it leaves
CopyThe object, where the copy goes and that the original stays
ReplaceWhat goes, what takes its place and that it keeps the spot and the size
DeleteWhat goes and what fills the area

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

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

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.

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

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.

$649$579
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.

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:

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

Try in Playground
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'
})
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 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"
    }
  ]'
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
{
  "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"
}
Response
[
  {
    "taskType": "imageInference",
    "taskUUID": "1f6b3d8e-a24c-4e97-b5d1-6a0c8e2f4b39",
    "imageUUID": "9b05e3a7-6c12-4d8f-a3e9-74f1b2c6d058",
    "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/9b05e3a7-6c12-4d8f-a3e9-74f1b2c6d058.jpg"
  }
]

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

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

  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.