MiniMax H3 Image Edit API

Edit and combine up to 16 reference images in 4K.

PlaygroundAPI
Pricing
~22.26s
POST /v2/minimax-h3-image-edit · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3import segmind
 4
 5# Async (v2): submit to the queue and block until COMPLETED.
 6# run() returns the final result dict (600s deadline, 1.0s poll by default).
 7result = segmind.run(
 8    "minimax-h3-image-edit",
 9    reference_images=["https://segmind-resources.s3.amazonaws.com/input/minimax-h3-image-edit-elephant-683ded41.jpg", "https://segmind-resources.s3.amazonaws.com/input/minimax-h3-image-edit-giraffe-1dac0d32.jpg"],
10    prompt="Picture 1 is a mustard hand-knitted plush elephant; Picture 2 is a wooden pull-along giraffe. Seat the knitted elephant from Picture 1 upright on the back of the wooden giraffe from Picture 2, on a pale birch nursery shelf with a window of diffused daylight to the left. Keep the elephant's chunky knit stitches, its red felt heart and black bead eyes exactly as in Picture 1, and keep the giraffe's painted brown spots, red pull-string and black wheels exactly as in Picture 2.",
11    speed="standard",
12    num_images=1,
13    area="4K",
14    aspect_ratio="4:3",
15)
16print(result["status"])                      # COMPLETED
17print(result.get("output"))                  # model output (e.g. media URL)
18print(result["metrics"]["inference_time"])   # server compute seconds
19
20# --- Or submit + poll manually (track request_id, control the cadence) ---
21from segmind import SegmindClient, InferenceFailed, InferenceTimeout
22
23client = SegmindClient()                      # reads SEGMIND_API_KEY
24payload = {
25    "reference_images": ["https://segmind-resources.s3.amazonaws.com/input/minimax-h3-image-edit-elephant-683ded41.jpg", "https://segmind-resources.s3.amazonaws.com/input/minimax-h3-image-edit-giraffe-1dac0d32.jpg"],
26    "prompt": "Picture 1 is a mustard hand-knitted plush elephant; Picture 2 is a wooden pull-along giraffe. Seat the knitted elephant from Picture 1 upright on the back of the wooden giraffe from Picture 2, on a pale birch nursery shelf with a window of diffused daylight to the left. Keep the elephant's chunky knit stitches, its red felt heart and black bead eyes exactly as in Picture 1, and keep the giraffe's painted brown spots, red pull-string and black wheels exactly as in Picture 2.",
27    "speed": "standard",
28    "num_images": 1,
29    "area": "4K",
30    "aspect_ratio": "4:3",
31}
32job = client.submit_async("minimax-h3-image-edit", **payload)
33print(job.request_id)                         # available immediately
34try:
35    result = job.wait(timeout=600, interval=1.0)
36except InferenceTimeout as e:
37    print("still running:", e.request_id)
38except InferenceFailed as e:
39    print("failed:", e.detail)

API Endpoint

POSThttps://api.segmind.com/v1/minimax-h3-image-edit

Parameters

promptrequired
string

What to change and what must stay the same, up to 32,000 characters; refer to inputs as Picture 1, Picture 2. State both the edit and what to preserve.

Default: "Picture 1 is a mustard hand-knitted plush elephant; Picture 2 is a wooden pull-along giraffe. Seat the knitted elephant from Picture 1 upright on the back of the wooden giraffe from Picture 2, on a pale birch nursery shelf with a window of diffused daylight to the left. Keep the elephant's chunky knit stitches, its red felt heart and black bead eyes exactly as in Picture 1, and keep the giraffe's painted brown spots, red pull-string and black wheels exactly as in Picture 2."
reference_imagesrequired
string[]

1 to 16 images (JPG, PNG, WEBP or HEIC) to edit or combine; name each as Picture 1, Picture 2 in the prompt, in upload order. Use clean, well-lit shots of every subject.

Default: ["https://segmind-resources.s3.amazonaws.com/input/minimax-h3-image-edit-elephant-683ded41.jpg","https://segmind-resources.s3.amazonaws.com/input/minimax-h3-image-edit-giraffe-1dac0d32.jpg"]
areaoptional
string

Output detail: about 1, 4 or 16 megapixels (1K, 2K or 4K). 4K for print-grade detail, 2K for faster iterations.

Default: "4K"
Allowed values :
"1K""2K""4K"
aspect_ratiooptional
string

Output shape; auto infers it from the prompt and references. Set a ratio such as 4:3 or 16:9 for predictable framing.

Default: "auto"
Allowed values (12 total):
"auto""1:1""4:3""3:4""3:2""2:3""16:9""9:16""21:9""9:21"+2 more
num_imagesoptional
integer

Number of images per request, 1 to 10. Use 1 for a final edit, more to compare variations.

Default: 1Range: 1 - 10
output_compressionoptional
integer

JPEG or WEBP quality, 0 to 100 (ignored for png). 90 to 95 keeps detail at a smaller size.

Default: 95Range: 0 - 100
output_formatoptional
string

Image file format. jpeg for photographs, png for lossless, webp for small files.

Default: "jpeg"
Allowed values :
"jpeg""png""webp"
sizeoptional
string

Optional exact WIDTHxHEIGHT instead of area and aspect ratio (655,360 to 20,000,000 px, ratio 1:3 to 3:1).

speedoptional
string

standard is the base model; highspeed returns faster. Use standard for the best quality, highspeed when turnaround matters more.

Default: "standard"
Allowed values :
"standard""highspeed"

Response Type

Returns: Image

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/minimax-h3-image-edit

    Submit — returns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Poll — until COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Result — final response body

Status states

QUEUED— Accepted, waiting for a worker
PROCESSING— Running on a worker
COMPLETED— Done — result body is ready
FAILED— Errored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out