Create task
Last updated November 23, 2026
Submit asynchronous minimax/minimax-h3-image tasks via /v1/tasks for both image generation and image editing.
Submit an asynchronous minimax/minimax-h3-image task to /v1/tasks. Returns a task id immediately while generation executes in the background—recommended for 4K or batch workloads to avoid long HTTP connection timeouts.
This endpoint unifies image generation and image editing: omit reference images for text-to-image, or include reference images for image editing using the same parameter set. The parameter table below shows application/json (using images: [{ "image_url": "..." }] with public HTTPS URLs or base64 data URLs); you may also upload local files via multipart/form-data (image / image[]), though the two input forms cannot be combined in the same request.
https://gateway.amux.ai/v1/tasksAuthorization
headerAuthorizationstringRequiredBearer <your Amux AI key> Amux AI API key.
Request
application/jsonmodelstringRequiredPlatform model ID. Append :provider to pin a specific provider.
promptstringRequiredText-to-image prompt or image editing instructions (up to 32,000 characters).
imagesarray<object>Optional reference images (1–16 items). Omit for text-to-image; include for image editing. Each item takes a public HTTPS URL or base64 data URL. Alternatively, upload files via multipart/form-data (image / image[]), but do not combine both.
›imagesarray<object>
image_urlstringRequiredPublic HTTPS URL or base64 data URL of the reference image.
nintegerDefault 1Number of images to generate (1–10, default 1).
sizestringExact pixel dimensions or "auto" (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.
area"1K" | "2K" | "4K"Default "4K"Resolution area tier (1K / 2K / 4K, default 4K); equivalent to image_size.
image_size"1K" | "2K" | "4K"Default "4K"Cross-model alias for area (1K / 2K / 4K, default 4K).
output_format"jpeg" | "jpg" | "png" | "webp"Default "jpeg"Output image format: jpeg (default), png, or webp.
disable_prompt_enhancedbooleanDefault falseDisable prompt enhancement (text-to-image only, default false). Passing true on an edit task returns 400; on text-to-image it requires an explicit size or fixed aspect_ratio.
prompt_extendbooleanDefault trueCross-model alias for prompt enhancement (disabling is supported for text-to-image only, default true).
aigc_watermarkbooleanDefault falseAdd an AIGC watermark to generated images (default false).
watermarkbooleanDefault falseCross-model alias for aigc_watermark (default false).
webhook_urlstringPublic HTTPS webhook callback URL invoked when the task reaches a terminal state; validated at submission.
Response
200responseTask already reached a terminal state within Prefer: wait or matched an Idempotency-Key replay.
202responseTask accepted and pre-authorization hold placed. Retrieve results using id.
400responseInvalid request parameters (including unsupported stream or partial_images).
402responseInsufficient workspace balance to cover the pre-authorization hold.
503responseConcurrent task queue full; retry after the Retry-After interval.
Retrieving results
| Method | How to call | Best for |
|---|---|---|
| Polling | GET /v1/tasks/{id} | Simple integration; poll every 3–5 seconds |
| Webhook callback | Pass webhook_url on submission | Event-driven server workflows without open connections |
| Synchronous wait | Send header Prefer: wait=60 | Wait inline within a single request window (returns 202 if still running) |
For full task lifecycle details, webhook signature verification, and Idempotency-Key replay semantics, see Create task.
Comparison with synchronous endpoints
| Aspect | /v1/images/generations & /v1/images/edits | /v1/tasks |
|---|---|---|
| Generation & editing | Two separate endpoints | Single unified endpoint based on presence of reference images |
| Delivery mode | Synchronous blocking wait (up to 600s for 4K) | Async task ID + webhook callback + optional Prefer: wait |
| Idempotency | No Idempotency-Key support | Supports Idempotency-Key to avoid duplicate charges on client retries |
Key parameter constraints
- Default resolution: Defaults to
4Kwhen neithersizenorarea/image_sizeis set; explicitly specifyarea: "1K"or"2K"for previews. - Mutually exclusive dimensions: Explicit pixel
size(655,360–20,000,000 pixels, aspect ratio 1:3–3:1) cannot be combined withaspect_ratio,area, orimage_size. - Prompt enhancement: Text-to-image tasks may pass
disable_prompt_enhanced: true(orprompt_extend: false) when paired with an explicitsizeor fixedaspect_ratio; edit tasks reject disabling prompt enhancement with400. - No streaming: Neither
/v1/tasksnor this model supportsstreamorpartial_images.
Errors
Error responses follow the OpenAI error schema. See Errors and retries for type values and retry semantics.
curl https://gateway.amux.ai/v1/tasks \
-H "Authorization: Bearer $AMUX_API_KEY" \
-d '{
"model": "minimax/minimax-h3-image",
"prompt": "A cinematic wide shot of a snowy pine forest at golden hour, warm sunbeams filtering through mist",
"aspect_ratio": "16:9",
"area": "2K",
"webhook_url": "https://hooks.example.com/amux"
}'{
"id": "task_01M8H3IMG00000000000000001",
"status": "queued",
"model": "minimax/minimax-h3-image",
"created_at": "2026-11-23T08:00:00Z",
"output": {
"images": [
{
"index": 0,
"url": "https://cdn.amux.ai/gen/20261123/task_01M8H3IMG00000000000000001-0.jpg"
}
],
"videos": [
{}
]
},
"usage": {
"input_tokens": 3500,
"output_tokens": 4080,
"total_tokens": 7580
},
"cost": "0.023554",
"notes": [
"dropped seed: MiniMax H3 Image does not support seed"
],
"error": {
"message": "<string>",
"code": "<string>"
}
}