h3image
H3 Image Guide / MiniMax H3 Image API

MiniMax H3 Image API

How to call the MiniMax-H3-Image API: /v1/images/generations and /v1/images/edits, curl, requests and OpenAI SDK examples, sizes, errors, and token pricing.

The official API exposes MiniMax-H3-Image through two synchronous, OpenAI-style endpoints. Both models, MiniMax-H3-Image and MiniMax-H3-Image-Highspeed, take the same parameters and limits.

ModeEndpointInput
Text-to-imagePOST /v1/images/generationsprompt
Image editPOST /v1/images/editsprompt + 1 to 16 reference images
Prompt enhancement onlyPOST /v1/h3_image_context_irprompt (MiniMax-H3-Image only)

Base URL: https://api.minimax.io (global) or https://api.minimax.cn (mainland China). Authenticate with Authorization: Bearer <API key>; keys are created in the MiniMax platform console.

Two things that cost money if you miss them. The server can take up to 600 seconds, so set your client timeout to at least 600 s. The endpoints are not idempotent: a timed-out or retried request still generates and bills. With the OpenAI SDK, set max_retries=0.

Text-to-image with curl

Request body taken from the official API reference example.

curl --request POST \
  --url https://api.minimax.io/v1/images/generations \
  --header "Authorization: Bearer $MINIMAX_API_KEY" \
  --header 'Content-Type: application/json' \
  --max-time 600 \
  --data '{
    "model": "MiniMax-H3-Image",
    "prompt": "An orange cat lying on a windowsill basking in the sun, warm afternoon light, film texture",
    "size": "2720x1536",
    "n": 1,
    "response_format": "url"
  }'

Text-to-image with Python (requests)

import os
import requests

url = "https://api.minimax.io/v1/images/generations"
api_key = os.environ.get("MINIMAX_API_KEY")
headers = {"Authorization": f"Bearer {api_key}"}

payload = {
    "model": "MiniMax-H3-Image",
    "prompt": "An orange cat lying on a windowsill basking in the sun, warm afternoon light, film texture",
    "size": "2720x1536",
    "n": 1,
    "response_format": "url",
}

response = requests.post(url, headers=headers, json=payload, timeout=600)
response.raise_for_status()

result = response.json()
ext = result["output_format"]

# Download the images and store them yourself
for i, item in enumerate(result["data"]):
    if "error" in item:
        print(f"Image {i} failed: {item['error']['message']}")
        continue
    with open(f"output-{i}.{ext}", "wb") as f:
        f.write(requests.get(item["url"]).content)

Text-to-image with the OpenAI SDK

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.minimax.io/v1",
    api_key=os.environ.get("MINIMAX_API_KEY"),
    timeout=600,
    max_retries=0,  # not idempotent: disable automatic retries
)

result = client.images.generate(
    model="MiniMax-H3-Image",
    prompt="An orange cat lying on a windowsill basking in the sun, warm afternoon light, film texture",
    size="2720x1536",
    response_format="url",
)

for i, item in enumerate(result.data):
    print(i, item.url)  # url is None for images that failed

Image edit (multiple references)

Reference images go in images[].image_url as a public URL, an uploaded mm_file://{file_id}, or a data:image/...;base64, URI. Their order is the picture number the prompt refers to. Edits always run prompt enhancement.

curl --request POST \
  --url https://api.minimax.io/v1/images/edits \
  --header "Authorization: Bearer $MINIMAX_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "MiniMax-H3-Image",
  "prompt": "Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged",
  "images": [
    {"image_url": "https://example.com/cat.jpg"},
    {"image_url": "https://example.com/dog.png"}
  ],
  "size": "auto",
  "response_format": "url"
}'
result = client.images.edit(
    model="MiniMax-H3-Image",
    image=[open("cat.jpg", "rb"), open("dog.png", "rb")],
    prompt="Replace the cat in image 1 with the Shiba Inu in image 2, keep the background unchanged",
    size="auto",
    response_format="url",
)

Reference image limits: JPG, JPEG, PNG, WEBP, HEIC or HEIF; each file ≤ 64 MiB; width and height 128–8192 px; long/short side ≤ 4:1; 1 to 16 images; whole request body ≤ 64 MiB. Masks are not supported.

Key parameters

FieldValuesNotes
modelMiniMax-H3-Image, MiniMax-H3-Image-HighspeedRequired
promptUp to 32,000 charactersWith enhancement off, only about the first 4,096 tokens take effect
n1–10 (default 1)Only successful images are charged
sizeauto or WIDTHxHEIGHTArea 655,360–20,000,000 px, aspect 1:3 to 3:1; never rounded
aspect_ratio + areaX:Y; 1K/2K/4K (default 4K)Only when size is auto
disable_prompt_enhancedfalse (default)Text-to-image only. If true, you must give a size or a fixed aspect ratio
output_formatjpeg (default), png, webpoutput_compression 0–100, default 95
response_formaturl (default), b64_jsonURLs are not guaranteed to stay up; store images yourself
streamfalse (default)SSE, one event per finished image; URL output only

Common sizes: 2K 16:9 is 2720x1536, 4K 1:1 is 4096x4096, 4K 16:9 is 5472x3072, 4K 3:1 is 7104x2368.

Errors worth handling

Pricing

Billing is per token, counting successful images only. Prices below are from MiniMax's pricing page, read on 2026-11-11.

ModelInput text / M tokensInput image / M tokensOutput image / M tokens
MiniMax-H3-Image (Standard)$2.30$1.50$3.80
MiniMax-H3-Image-Highspeed$2.30$3.00$7.60
H3-Image-Context-IR (prompt enhancement)$2.30——

MiniMax's example cost per image (Standard vs Highspeed)

TaskModel1K2K4K (16 MP)
Text-to-imageStandard$0.02179$0.02333$0.06879
$0.03439 until Nov 17
Text-to-imageHighspeed$0.03529$0.03622$0.13001
$0.06501 until Nov 17
Edit, 1 referenceStandard$0.02654$0.02658$0.07312
$0.03656 until Nov 17
Edit, 1 referenceHighspeed$0.04525$0.04576$0.13673
$0.06837 until Nov 17
Edit, 3 referencesStandard$0.03563$0.04177$0.07914
$0.03957 until Nov 17
Edit, 3 referencesHighspeed$0.06037$0.06069$0.15407
$0.07703 until Nov 17

MiniMax notes these are rounded reference examples, not fixed per-image prices; some 1K/2K amounts were adjusted for presentation.

Launch discount ends November 17, 2026, 16:00 UTC (November 18, 00:00 Beijing time). Until then (the end time is exclusive) MiniMax takes 50% off the total request cost for both models when the delivered image has at least 16,600,000 pixels (width × height), per its pricing page. Separately, MiniMax Code offers 10 free generations at any resolution until November 17, 23:59 (UTC+8), then 4K at half the usual credits, per @MiniMax_Code. That is a product-credit offer, not the API discount.

Cost calculator

–

Uses MiniMax's example costs; real bills follow token usage. The 4K offer is applied automatically until 2026-11-17 16:00 UTC.

Where to try it

Prices checked on 2026-11-11 from each provider's page and can change. These are not affiliate links; we earn nothing from them. Runware and WaveSpeed are third parties, not MiniMax. Check the license territory and hosting rules for your use.

China platform (CNY), per MiniMax's announcement

MiniMax's WeChat launch article lists reference costs per image on the China platform (api.minimax.cn):

Task / outputStandardHighspeed
Text-to-image 1K¥0.1430¥0.2319
Text-to-image 2K¥0.1531¥0.2380
Text-to-image 4K (16 MP)¥0.4522 (promo ¥0.2261)¥0.8550 (promo ¥0.4275)
Edit 1K, 1 / 3 references¥0.1744 / ¥0.2346¥0.2978 / ¥0.3982
Edit 2K, 1 / 3 references¥0.1747 / ¥0.2746¥0.3011 / ¥0.4003
Edit 4K, 1 reference¥0.4809 (promo ¥0.2404)¥0.8998 (promo ¥0.4499)
Edit 4K, 3 references¥0.5211 (promo ¥0.2605)¥1.0146 (promo ¥0.5073)

Speed: MiniMax's published latency

MiniMax's launch article includes a chart of median (P50) generation time in seconds. These are MiniMax's figures and have not been independently verified.

Text-to-imageH3-Image StandardH3-Image Highspeed
1K (1024×1024)10.6 s7.7 s
2K (2048×2048)10.5 s7.6 s
4K (4096×4096)16.0 s10.3 s
Image editStandard (1 ref / 3 refs)Highspeed (1 ref / 3 refs)
1K14.2 s / 17.3 s10.0 s / 12.0 s
2K13.7 s / 15.8 s10.0 s / 11.2 s
4K18.2 s / 21.4 s12.5 s / 14.4 s

The same chart lists other models (Nano Banana 2.1, GPT-image 2.5/2.6, Seedream 5 Pro) for comparison; see the original article.

Start building with MiniMax H3 Image

Call the official API in minutes, or run the open weights on your own GPU with ComfyUI.