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.
| Mode | Endpoint | Input |
|---|---|---|
| Text-to-image | POST /v1/images/generations | prompt |
| Image edit | POST /v1/images/edits | prompt + 1 to 16 reference images |
| Prompt enhancement only | POST /v1/h3_image_context_ir | prompt (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.
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
| Field | Values | Notes |
|---|---|---|
model | MiniMax-H3-Image, MiniMax-H3-Image-Highspeed | Required |
prompt | Up to 32,000 characters | With enhancement off, only about the first 4,096 tokens take effect |
n | 1–10 (default 1) | Only successful images are charged |
size | auto or WIDTHxHEIGHT | Area 655,360–20,000,000 px, aspect 1:3 to 3:1; never rounded |
aspect_ratio + area | X:Y; 1K/2K/4K (default 4K) | Only when size is auto |
disable_prompt_enhanced | false (default) | Text-to-image only. If true, you must give a size or a fixed aspect ratio |
output_format | jpeg (default), png, webp | output_compression 0–100, default 95 |
response_format | url (default), b64_json | URLs are not guaranteed to stay up; store images yourself |
stream | false (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
- HTTP 200 can still contain failed items. Check
data[].erroron every image. 1026: the enhanced prompt failed the content safety check.1027: the output image failed it.- 402 with
1008: insufficient balance. 429 with1002: images-per-minute limit, where each request counts asnimages.
Pricing
Billing is per token, counting successful images only. Prices below are from MiniMax's pricing page, read on 2026-11-11.
| Model | Input text / M tokens | Input image / M tokens | Output 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)
| Task | Model | 1K | 2K | 4K (16 MP) |
|---|---|---|---|---|
| Text-to-image | Standard | $0.02179 | $0.02333 | $0.06879 $0.03439 until Nov 17 |
| Text-to-image | Highspeed | $0.03529 | $0.03622 | $0.13001 $0.06501 until Nov 17 |
| Edit, 1 reference | Standard | $0.02654 | $0.02658 | $0.07312 $0.03656 until Nov 17 |
| Edit, 1 reference | Highspeed | $0.04525 | $0.04576 | $0.13673 $0.06837 until Nov 17 |
| Edit, 3 references | Standard | $0.03563 | $0.04177 | $0.07914 $0.03957 until Nov 17 |
| Edit, 3 references | Highspeed | $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.
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 / output | Standard | Highspeed |
|---|---|---|
| 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-image | H3-Image Standard | H3-Image Highspeed |
|---|---|---|
| 1K (1024×1024) | 10.6 s | 7.7 s |
| 2K (2048×2048) | 10.5 s | 7.6 s |
| 4K (4096×4096) | 16.0 s | 10.3 s |
| Image edit | Standard (1 ref / 3 refs) | Highspeed (1 ref / 3 refs) |
|---|---|---|
| 1K | 14.2 s / 17.3 s | 10.0 s / 12.0 s |
| 2K | 13.7 s / 15.8 s | 10.0 s / 11.2 s |
| 4K | 18.2 s / 21.4 s | 12.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.