Create image edit
Last updated November 23, 2026
Edit and fuse 1–16 reference images synchronously with minimax/minimax-h3-image via /v1/images/edits.
Edit, restyle, or fuse 1–16 reference images synchronously with minimax/minimax-h3-image.
This endpoint accepts two request encodings:
application/json(native MiniMax format, shown in the parameter table below): Passimages: [{ "image_url": "..." }]with public HTTPS image URLs or base64 data URLs.multipart/form-data(OpenAI SDK compatible): Upload local binary files underimageorimage[]and pass remaining parameters as text form fields.
Streaming output and mask-based inpainting (mask) are not supported on this model.
https://gateway.amux.ai/v1/images/editsAuthorization
headerAuthorizationstringRequiredBearer <your Amux AI key> Amux AI API key.
Request
application/jsonmodelstringRequiredPlatform model ID. Append :provider to pin a specific provider.
promptstringRequiredEditing instructions (up to 32,000 characters).
imagesarray<object>RequiredRequired list of 1–16 reference images. Each item is an object with image_url, accepting a public HTTPS image URL or a base64 data URL (data:image/jpeg;base64,..., png, webp).
Limits: total encoded reference images must not exceed 60 MiB (within upstream's 64 MiB request cap), otherwise 400 is returned. To upload binary files directly, send multipart/form-data with image or image[] file parts instead.
›imagesarray<object>
image_urlstringRequiredPublic HTTPS URL or base64 data URL (data:image/...;base64,...) of the reference image.
nintegerDefault 1Number of images to generate (1–10, default 1).
sizestringExact pixel dimensions or "auto" ("WIDTHxHEIGHT", 655,360–20,000,000 pixels, aspect ratio 1:3–3:1). Cannot be combined with aspect_ratio, area, or image_size.
aspect_ratiostringOutput aspect ratio: "auto" or "X:Y" with integers 1–300 and ratio 1:3–3:1. Cannot be combined with explicit pixel size.
area"1K" | "2K" | "4K"Default "4K"Resolution area tier (native MiniMax field): 1K, 2K, or 4K (default). Equivalent to image_size.
image_size"1K" | "2K" | "4K"Default "4K"Cross-model alias for area (1K / 2K / 4K, default 4K). Takes precedence over area if both are sent.
output_format"jpeg" | "jpg" | "png" | "webp"Default "jpeg"Output image format: jpeg (default), png, or webp.
response_format"url" | "b64_json"Default "url"Delivery format: url (default) or b64_json (≤ 20,000,000 total pixels for PNG, ≤ 80,000,000 for JPEG/WebP).
aigc_watermarkbooleanDefault falseAdd an AIGC watermark to generated images (native MiniMax field, default false).
watermarkbooleanDefault falseCross-model alias for aigc_watermark (default false).
Response
200responseImage edit succeeded; returns the same response schema as the generation endpoint.
400responseInvalid request parameters (e.g., missing or too many reference images, payload limit exceeded, conflicting dimension parameters, prompt enhancement disabled, or stream: true).
402responseInsufficient workspace balance to cover the pre-authorization hold.
503responseService temporarily unavailable or concurrent queue full.
Reference image requirements
Reference images are required in both JSON and multipart modes and are subject to the following limits (exceeding any limit returns 400):
| Constraint | application/json (images) | multipart/form-data (image / image[]) |
|---|---|---|
| Count | 1 – 16 images | 1 – 16 images |
| Format | Public https:// URL or base64 data URL (data:image/jpeg;base64,... / png / webp) | Binary image files |
| Size limit | Total encoded reference images ≤ 60 MiB (within upstream's 64 MiB request cap) | ≤ 25 MiB per file; ≤ 60 MiB total encoded |
Public HTTPS URLs are validated for public reachability (private/reserved addresses are rejected) and fetched directly by upstream without counting against the request payload limit, making them ideal for high-resolution multi-image edits.
Prompt enhancement requirement
MiniMax's image editing endpoint always applies prompt enhancement. Passing disable_prompt_enhanced: true or prompt_extend: false on an edit request is rejected with HTTP 400.
Dimensions, output format, and aliases
Dimension and format rules match Create image:
- Accepts either exact pixel
size(655,360–20,000,000 pixels, aspect ratio 1:3–3:1) oraspect_ratio+area/image_size(1K/2K/4K, default4K); the two forms cannot be combined. - Supports
output_format(jpegdefault /png/webp),response_format(urldefault /b64_json), andaigc_watermark/watermark(defaultfalse).
Token metering and billing
Image edits settle across three token categories:
- Input text tokens: Editing instructions plus prompt-enhanced expansion tokens.
- Input image tokens: Visual tokens billed for the submitted reference images (reserved at an upper bound per reference image on acceptance and settled against actual upstream usage upon completion).
- Output image tokens: Approximately
width × height ÷ 1024per succeeded output image at 2K / 4K, with a ~4,096-token floor per image at 1K (comparable to 2K).
Asynchronous editing
4K multi-image edits can take up to 600 seconds and are non-idempotent. For production workloads, submit the same JSON or multipart/form-data payload to POST /v1/tasks.
Errors
Error responses follow the OpenAI error schema. See Errors and retries for type values and retry semantics.
curl https://gateway.amux.ai/v1/images/edits \
-H "Authorization: Bearer $AMUX_API_KEY" \
-d '{
"model": "minimax/minimax-h3-image",
"prompt": "Replace the background with a warm sunset beach while keeping the subject unchanged",
"images": [
{
"image_url": "https://example.com/reference.jpg"
}
],
"area": "2K"
}'{
"created": 1795334400,
"size": "2720x1536",
"output_format": "jpeg",
"data": [
{
"revised_prompt": "Cinematic wide shot of a snowy pine forest at golden hour, warm sunbeams filtering through mist, ultra-detailed photography.",
"url": "https://cdn.amux.ai/gen/20261123/task_01M8H3IMG00000000000000001-0.jpg"
}
],
"usage": {
"input_tokens": 3500,
"output_tokens": 4080,
"total_tokens": 7580
},
"amux": {
"task_id": "task_01M8H3IMG00000000000000001",
"generation_id": "gen_01M8H3IMG00000000000000001",
"provider": "minimax",
"cost_nano": "23554000",
"images": [
{
"index": 0,
"url": "https://cdn.amux.ai/gen/20261123/task_01M8H3IMG00000000000000001-0.jpg"
}
]
}
}