inference.minimax.h3-image.base.img2img.v0
The inference.minimax.h3-image.base.img2img.v0 job edits an image, or
combines up to 16 reference images into a new one, following a prompt with
MiniMax H3 Image.
{ "type": "inference.minimax.h3-image.base.img2img.v0", "config": { "prompt": "Turn Image 1 into a watercolor painting and keep everything else", "images": ["input.jpg"] }}Prompting
Section titled “Prompting”Refer to the uploaded images as Image 1, Image 2, and so on (or <Picture 1>,
<Picture 2>), in upload order. If images is omitted, the uploaded files
are used in upload order.
The prompt is used as written (up to 4096 tokens). A good edit prompt says what to keep, then what to change, then describes the whole target image. Put several changes in one edit rather than chaining edits.
Inputs and size
Section titled “Inputs and size”Each image must be 128 to 8192 px per side, with the long side at most 4 times the short side. Images above 4 megapixels are downscaled to 4 MP.
Without width and height, the output keeps the first image’s aspect ratio
(limited to 1:3..3:1) at 2048x2048 worth of pixels. With them (set together),
the output is exactly that size, with the same limits as text-to-image: each
side 468 to 7745 px, 655,360 to 20,000,000 pixels, aspect ratio 1:3 to 3:1.
{ "type": "inference.minimax.h3-image.base.img2img.v0", "config": { "prompt": "Place the lamp from Image 2 on the desk in Image 1, keep the room unchanged", "images": ["room.jpg", "lamp.png"], "width": 2048, "height": 1536 }}Generation time grows with the number and size of images: a single-image edit at 4 MP takes about 2-3 s, and 16 images about 20-75 s.
Schema
Section titled “Schema”{ "type": "object", "required": [ "type", "config" ], "additionalProperties": false, "properties": { "type": { "type": "string", "enum": [ "inference.minimax.h3-image.base.img2img.v0" ] }, "config": { "type": "object", "required": [ "prompt" ], "additionalProperties": false, "properties": { "images": { "type": "array", "minItems": 1, "maxItems": 16, "items": { "type": "string", "format": "filename", "example": "input.png", "description": "The filename of the input image." }, "description": "The images to edit or compose, at most 16, in the order the prompt cites them. Each side must be 128 to 8192 pixels, with the long side at most 4 times the short side. Images above 4 megapixels are downscaled to 4 MP." }, "prompt": { "type": "string", "minLength": 1, "maxLength": 32000, "examples": [ "Put a red knitted scarf on the dog in Image 1 and keep everything else" ], "description": "The edit to make. Refer to the input images as Image 1, Image 2, ... (or <Picture 1>, <Picture 2>, ...) in upload order. An edit prompt works best when it says what to keep, then what to change, then describes the whole target image." }, "width": { "type": "integer", "minimum": 468, "maximum": 7745, "description": "Output image width in pixels. Give width and height together: the area must be 655,360 to 20,000,000 pixels with an aspect ratio between 1:3 and 3:1. Omit both to keep the first image's aspect ratio (limited to 1:3..3:1) at a 2048x2048 area." }, "height": { "type": "integer", "minimum": 468, "maximum": 7745, "description": "Output image height in pixels. Give width and height together: the area must be 655,360 to 20,000,000 pixels with an aspect ratio between 1:3 and 3:1. Omit both to keep the first image's aspect ratio (limited to 1:3..3:1) at a 2048x2048 area." }, "seed": { "type": "integer", "minimum": 0, "maximum": 2147483647, "description": "Random seed for reproducible results." } }, "dependentRequired": { "width": [ "height" ], "height": [ "width" ] } } }}