API
API
MiniMax H3 Image API
ImageGenerate and edit images with the MiniMax H3 Image API. Create one image per request in 1K, 2K or 4K, or use up to 16 reference images to guide an edit or composition.
Body
application/jsonmodelstringrequiredminimax-h3-imageinput.promptstringrequiredDescribe the image to create or the changes to make. For editing, identify what to change and which details to preserve. Leading and trailing whitespace is trimmed.
input.imagesstring[]optionalOptional list of up to 16 publicly accessible HTTPS image URLs. Add references for editing or combining images; omit this field for text-to-image generation.
Send URL strings, not files or base64 data. image_urls is accepted as an alias; use only one of the two fields.
Maximum URLs: 16.
Example: ["https://example.com/product.png"]
input.aspect_ratiostringoptionalOutput image width-to-height ratio. Defaults to auto; choose a listed ratio to set the composition explicitly.
Default: auto
input.resolutionstringoptionalOutput resolution: 1k, 2k or 4k. Defaults to 2k. Values are case-insensitive and normalized before billing and generation.
Default: 2k
Request examples
Omit images to generate from text, or add publicly accessible HTTPS image URLs to edit with references. Replace the example.com URLs before sending the request. Each request creates one image. Save data.task_id and poll POST /api/v1/check until the status is completed or failed.
POST /api/v1/createcurl -X POST https://nanobanana.io/api/v1/create \
-H "Authorization: Bearer sk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "minimax-h3-image",
"input": {
"prompt": "A cinematic product photo of a futuristic banana-shaped camera",
"aspect_ratio": "1:1",
"resolution": "2k"
}
}'POST /api/v1/create · HTTP 201{
"data": {
"task_id": "task_example",
"model": "minimax-h3-image",
"status": "processing",
"credits": 10
}
}Poll this endpoint using the returned task ID until the task is completed or failed. We recommend polling every 5 seconds to check the latest task status.
POST /api/v1/check{
"task_id": "task_example"
}Response
Task status returned by POST /api/v1/check. The IDs, URLs, and timestamps below are illustrative.
idstringrequiredTask identifier in data.id, matching the task_id used in the check request.
statusstringrequiredfailed_reasonstringoptionalOnly returned when status is failed, to explain the failure. This field is omitted for completed and processing.
Completed · completed
The download URLs are in data.data.results.
POST /api/v1/check · HTTP 200{
"data": {
"id": "task_example",
"created_at": 1791244800,
"model": "minimax-h3-image",
"status": "completed",
"data": {
"results": [
"https://example.com/generated.png"
],
"processing_time": 18
}
}
}Other statuses
For processing or failed, data.data is null. This example shows failed: only failed includes failed_reason. Continue polling for processing; stop polling for failed.
POST /api/v1/check · HTTP 200{
"data": {
"id": "task_example",
"created_at": 1791244800,
"model": "minimax-h3-image",
"status": "failed",
"data": null,
"failed_reason": "Generation failed."
}
}Credit usage
Credits consumed for a request generating one image.
| Resolution | 1K | 2K | 4K |
|---|---|---|---|
| Single image | 10 | 10 | 30 |
Optional parameters omitted: 10 credits
Set the listed input parameters explicitly to use the corresponding rate. Requests generating multiple images may consume more credits.
The credits field returned by POST /api/v1/create shows the amount charged for the task.
