MiniMax H3 Image API

ReachAPI offers two MiniMax H3 Image models. Both support text-to-image generation and image editing with 1–16 reference images.

Model code (model)Description
minimax-h3-imageMiniMax H3 Image
minimax-h3-image-highspeedSame parameters and limits as minimax-h3-image; faster generation, higher image token price

1. Choose an Interface

Base URL: https://direct.reachapi.ai

  • Synchronous generation: POST /v1/images/generations — text-to-image; follows the MiniMax protocol; 1–10 images per request
  • Synchronous editing: POST /v1/images/edits — image editing with 1–16 reference images
  • Asynchronous task: POST /v1/images/create — submit a task, then GET /v1/tasks/{task_id} to query it or wait for a callback; one image per task

Use the synchronous API to keep MiniMax's request and response shape: switch the base URL, key and model code to ReachAPI's. Use the asynchronous API for the unified model + input task protocol, polling, callbacks, and URL-based reference images.

Both interfaces use the same model codes and authentication:

Authorization: Bearer YOUR_REACH_API_KEY
Content-Type: application/json

2. Synchronous API

The request body and response follow the MiniMax text-to-image and image editing protocols. ReachAPI replaces model with the matching MiniMax model and forwards the other parameters unchanged. Invalid parameters return MiniMax's 400 response as-is.

Generate an image

curl "https://direct.reachapi.ai/v1/images/generations" \
  -H "Authorization: Bearer YOUR_REACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-h3-image",
    "prompt": "An orange cat lying on a sunlit windowsill, soft natural light",
    "aspect_ratio": "16:9",
    "area": "2K",
    "n": 1
  }'

Edit an image

JSON form. For multipart, upload files with -F 'image[][email protected]' instead of images.

curl "https://direct.reachapi.ai/v1/images/edits" \
  -H "Authorization: Bearer YOUR_REACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-h3-image-highspeed",
    "prompt": "Put the mug from image 2 on the desk in image 1",
    "images": [
      {"image_url": "https://cdn.example.com/desk.png"},
      {"image_url": "https://cdn.example.com/mug.png"}
    ],
    "area": "1K",
    "aspect_ratio": "3:2"
  }'

Common parameters

ParameterDescription
modelRequired. A model code from the table above
promptRequired. Up to 32,000 characters
sizewidth x height, such as 2720x1536. Cannot be combined with aspect_ratio or area
aspect_ratio + areaAspect ratio (such as 16:9, from 1:3 to 3:1) and size tier (1K, 2K or 4K); either can be sent alone
nNumber of images, 1–10; default 1
output_formatjpeg (default), png or webp
response_formaturl (default) or b64_json
disable_prompt_enhancedTurns off prompt enhancement for text-to-image; editing always has it on
output_compression0–100; applies to jpeg and webp only
imagesRequired for JSON editing: [{"image_url": "https://..."}], 1–16 images
image / image[]File fields for multipart editing, 1–16 files

Synchronous behavior

  • Without a size, images are generated at 4K — that is, when size, aspect_ratio and area are all omitted. 4K produces more output tokens and costs more; pass area: "1K" or size explicitly when you do not need it.
  • stream=true is accepted, but ReachAPI does not provide SSE: the response is still one ordinary JSON body, and streaming is never enabled upstream.
  • When several images are requested, some may be blocked by content safety checks. If at least one succeeds the response is 200 and each failed image appears in data[] as an error object; only successful images are billed. If all fail, an error response is returned.
  • A request can take up to 600 seconds. Set your client timeout to at least 600 seconds and turn off automatic retries. After a timeout or a dropped connection the image may still be generated and billed, and a retry generates and bills again (set max_retries=0 in the OpenAI SDK).

Success response (excerpt, same as MiniMax):

{
  "created": 1792308678,
  "data": [
    {
      "url": "https://example.com/h3-image/output-0.jpg",
      "size": "2720x1536",
      "revised_prompt": "..."
    },
    {
      "error": {
        "code": "1027",
        "message": "output image failed content safety check"
      }
    }
  ],
  "output_format": "jpeg",
  "usage": {
    "generated_images": 1,
    "total_tokens": 7254,
    "input_tokens": 3174,
    "output_tokens": 4080,
    "input_tokens_details": { "text_tokens": 3174, "image_tokens": 0 },
    "output_tokens_details": { "image_tokens": 4080 }
  },
  "request_id": "021792308678142a2c883cf675b9804d"
}

3. Asynchronous Task API

The asynchronous endpoint uses a nested { "model": "...", "input": { ... } } request and returns a task ID immediately. Generation runs in the background and the result is written to the task.

curl -X POST "https://direct.reachapi.ai/v1/images/create" \
  -H "Authorization: Bearer YOUR_REACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-h3-image",
    "callback_url": "https://example.com/callback",
    "input": {
      "prompt": "An orange cat lying on a sunlit windowsill, soft natural light",
      "resolution": "2K",
      "aspect_ratio": "16:9",
      "output_format": "png"
    }
  }'

With reference images:

{
  "model": "minimax-h3-image-highspeed",
  "input": {
    "prompt": "Put the mug from image 2 on the desk in image 1",
    "image_urls": [
      "https://cdn.example.com/desk.png",
      "https://cdn.example.com/mug.png"
    ],
    "size": "2720x1536"
  }
}

Top-level parameters

FieldTypeRequiredDescription
modelstringYesminimax-h3-image or minimax-h3-image-highspeed
callback_urlstringNoHTTPS callback for the terminal status; see Callback
inputobjectYesImage generation or editing parameters

input parameters

FieldTypeRequiredDescription
promptstringYesPrompt; cannot be blank
resolutionstringNo1K, 2K or 4K (case-insensitive); pairs with aspect_ratio
aspect_ratiostringNoWidth:height between 1:3 and 3:1, such as 16:9; pairs with resolution
sizestringNowidth x height, such as 2720x1536; cannot be combined with resolution or aspect_ratio
image_urlsarray of stringNoReference images; up to 16 http or https links
image_base64sarray of stringNoBase64 list of local reference images; mutually exclusive with image_urls; up to 5; plain base64 or data:image/...;base64,...
output_formatstringNojpeg (default), png or webp

Asynchronous rules

  • With no size, the default is 1K at 1:1 (the synchronous API defaults to 4K). With only resolution the ratio is 1:1; with only aspect_ratio the size tier is 1K.
  • One task produces one image; use the synchronous API to get several. Other fields such as n, quality, background and moderation are not supported and return 400 at submission.
  • For local images you can send image_base64s: ReachAPI first converts them to temporary links and then treats them as reference images. For large or many images, upload them first with the File Upload API and put the returned links in image_urls.
  • Reference image links are handed to MiniMax unchanged — ReachAPI does not download or re-host them — so they must be publicly reachable direct links (no login state, no private-network addresses). Format and size limits follow the MiniMax image editing protocol. Without reference images the task is text-to-image; with them it is image editing.
  • Missing fields, wrong types or counts, and mutually exclusive fields return 400 at submission and no task is created. Values that only MiniMax can judge (for example an invalid aspect_ratio or output_format, or a size out of range) create the task first; when MiniMax rejects it the task becomes failed, msg gives the reason, and the reserved credits are released.

Submit and query

Submit response:

{
  "code": 200,
  "msg": "",
  "status": "queued",
  "task_id": "task_xxx",
  "data": []
}

Query with GET /v1/tasks/{task_id}:

curl "https://direct.reachapi.ai/v1/tasks/task_xxx" \
  -H "Authorization: Bearer YOUR_REACH_API_KEY"
StatusDescription
queuedAccepted and waiting to run
generatingGeneration in progress
successGeneration completed
failedGeneration failed

Success response:

{
  "code": 200,
  "msg": "",
  "status": "success",
  "task_id": "task_xxx",
  "data": [
    {
      "url": "https://example.com/h3-image/output-0.jpg",
      "size": "2720x1536",
      "revised_prompt": "..."
    }
  ],
  "usage": {
    "generated_images": 1,
    "total_tokens": 7254,
    "input_tokens": 3174,
    "output_tokens": 4080,
    "input_tokens_details": { "text_tokens": 3174, "image_tokens": 0 },
    "output_tokens_details": { "image_tokens": 4080 }
  },
  "cost": {
    "spend": 0.022805
  }
}

When a task fails, status is failed, msg gives the reason, cost.spend is 0, and the reserved credits are released. When the service is temporarily unavailable, msg is always The model service is temporarily unavailable. Please try again later. and you can resubmit later:

{
  "code": 503,
  "msg": "The model service is temporarily unavailable. Please try again later.",
  "status": "failed",
  "task_id": "task_xxx",
  "data": [],
  "error_code": "RJ_UPSTREAM_ERROR",
  "cost": { "spend": 0 }
}

Callback rules (callback_url limits, retries, body format) are the same as for other asynchronous image tasks; see Callback.

Image links returned by the synchronous and asynchronous APIs are MiniMax links; ReachAPI does not re-host them. Links are valid for 24 hours. Download the images and save them to your own storage within that time.

5. Pricing

Billing follows the three token counts in the usage that MiniMax returns, at the official MiniMax price with no markup:

Model codeText inputImage inputImage output
minimax-h3-image$2.30 / 1M tokens$1.50 / 1M tokens$3.80 / 1M tokens
minimax-h3-image-highspeed$2.30 / 1M tokens$3.00 / 1M tokens$7.60 / 1M tokens
  • Text input includes the tokens used by prompt enhancement; image input is the reference images; image output is the generated images.
  • Only successful images are billed: a partial success is billed for the successful images only, and a request where every image fails is not billed.
  • Asynchronous tasks reserve credits at submission, settle on the actual usage after success, and release the reservation on failure.
  • cost.spend in a task query response is in US dollars.

6. Errors

  • Errors decided by MiniMax — invalid parameters, content safety blocks, rate limits — are returned by the synchronous API with MiniMax's status code and error body unchanged; the asynchronous API gives the reason in the task msg.
  • Server errors and temporary unavailability are not passed through in detail. The synchronous API returns a 5xx with the fixed message The model service is temporarily unavailable. Please try again later.; try again later.

7. Availability

Both models are listed and appear in GET /v1/models. Access remains subject to your API key and group permissions.

On this page