Skip to content
Halaman ini belum tersedia dalam bahasa Anda, jadi ditampilkan dalam bahasa Inggris.

MiniMax-H3-Image-Highspeed Image Generation

Uses the minimax-h3-image-highspeed model for faster generation, with parameters identical to the standard version

Semua dokumentasi
POST/v1/images/generations
  • Asynchronous processing returns a task_id for status queries
  • Supports text-to-image and image editing with up to 16 reference images
  • Generates up to 10 images per request, with built-in prompt enhancement (can be disabled)
  • Supports 1K / 2K / 4K tiers with aspect ratios, or exact pixel dimensions (up to 20 megapixels)

Contoh permintaan

curl --request POST \
  --url https://api.apisea.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "minimax-h3-image-highspeed",
    "prompt": "A seaside cafe at dusk, photorealistic, warm tones",
    "size": "16:9",
    "resolution": "2K",
    "n": 1
  }'

Authentication

Authorizationstringrequired

All endpoints use Bearer Token authentication. Get your key from the API Key page.

text
Authorization: Bearer YOUR_API_KEY

Model overview

ModelFeaturesRecommended use
minimax-h3-image-highspeedHigh-speed version with faster generation; image input / output unit prices are 2 times those of the standard versionLatency-sensitive scenarios and interactive generation
minimax-h3-imageStandard version with a lower unit priceBatch generation. See MiniMax-H3-Image

MiniMax H3 Image excels at photorealistic photography, posters, product images, and images with text. By default, it automatically expands your prompt into a detailed scene description before generating the image. The expanded text is available in revised_prompt in the query result. To generate strictly from your original text, see Disable prompt enhancement.

Warning

If resolution is omitted, output defaults to 4K (about 16 megapixels), which costs about 3.6 times as much as 1K / 2K. If you don't need 4K, pass "resolution": "2K" explicitly.

Request parameters

modelstringrequired

Image generation model name. Must be minimax-h3-image-highspeed.

nsfw_checkbooleandefault: false

Whether to run content moderation before submitting the image task.

  • true: use omni-moderation-latest to review prompts and input images
  • false or omitted: do not send a moderation request, adding no moderation cost or latency (default)
promptstringrequired

Text description for image generation or editing.

The prompt supports Chinese and English. After trimming leading and trailing whitespace, it must be 1 – 32,000 characters long.

image_urlsstring[]

Array of reference images, up to 16. Passing this field automatically switches to editing mode.

Each item can be a publicly accessible http(s):// direct link or inline Base64 in data:image/png;base64,... format (the platform converts it to a link before sending it to the model).

See Reference image requirements.

sizestringdefault: auto

Aspect ratio or exact pixel dimensions of the output image.

Supported values:

  • auto: the model chooses composition and aspect ratio based on the prompt
  • Aspect ratio: X:Y format, where X and Y are integers from 1 to 300 and the ratio is between 1:3 and 3:1 (inclusive), such as 1:1, 4:3, 16:9, 9:16, 3:1
  • Exact pixels: WIDTHxHEIGHT, such as 2048x1152 (X, ×, and * are also accepted as separators)

See Size rules.

resolutionstringdefault: 4K

Resolution tier. Combined with the aspect ratio, it determines the actual output pixels.

  • 1K: about 1 megapixel
  • 2K: about 4.2 megapixels
  • 4K (default): about 16 megapixels

Lowercase values are also accepted.

Warning

When size uses exact pixels, you cannot pass resolution; otherwise the request returns 400.

nintegerdefault: 1

Number of images to generate, from 1 to 10.

prompt_optimizerbooleandefault: true

Whether to automatically expand the prompt.

Setting it to false only works for text-to-image and requires an explicit size. See Disable prompt enhancement.

output_formatstringdefault: jpeg

Output file format.

  • jpeg (default; jpg is also accepted)
  • png
  • webp
output_compressionintegerdefault: 95

Compression quality, from 0 to 100. Has no effect on png.

watermarkbooleandefault: false

Whether to add a visible AI-generated watermark to the image. Does not affect the implicit marker in the image metadata.

Note

The following parameters are not supported and are ignored if passed: quality, style, seed, negative_prompt, background, mask_url.

Results are always returned as URLs. Passing response_format: "b64_json" returns 400.

Size rules

What you wantWhat to pass
Default (4K, model-chosen aspect ratio)Omit size parameters
Tier + aspect ratiosize: "16:9", resolution: "2K"
Control only the tier, let the model choose the ratioresolution: "1K" (omit size or pass auto)
Exact pixel controlsize: "2048x1152" (do not also pass resolution)

Tier + aspect ratio

The tier determines the total area, and the aspect ratio determines the shape:

TierTarget areaMeasured output example
1KAbout 1024×1024 (about 1 megapixel)Model-chosen ratio → 1184×880
2KAbout 2048×2048 (about 4.2 megapixels)1:1 → 2048×2048
4K (default)About 4096×4096 (about 16 megapixels)Model-chosen ratio → 3552×4736

The model rounds the actual output pixels based on the ratio and tier; refer to the returned result. For exact dimensions, use the pixel format.

Exact pixels

When using size: "WIDTHxHEIGHT", the following constraints apply:

ConstraintValue
Total pixels (width × height)655,360 – 20,000,000
Aspect ratio1:3 – 3:1
With resolutionCannot be passed together
  • ✅ 1024x1024, 2048x1152, 1536x1536, 4000x5000
  • ❌ 512x512 (area too small), 4000x1000 (ratio exceeds 3:1), 5000x5000 (exceeds 20 megapixels)

Reference image requirements

ItemRequirement
CountUp to 16 images
FormatJPG / JPEG / PNG / WebP / HEIC / HEIF (GIF not supported)
File sizeUp to 64 MB per image
DimensionsEach side 128 – 8192 pixels; long side ÷ short side ≤ 4

Warning

When using URLs, make sure the links are publicly accessible. If a link cannot be reached, the task fails during generation (status is failed, and the charge is fully refunded).

Prompt enhancement is always on in editing mode and cannot be disabled.

Disable prompt enhancement

By default, the model expands the prompt before generating the image. To generate strictly from your original text, pass "prompt_optimizer": false, provided that:

  • It is used only for text-to-image; requests with image_urls return 400
  • An explicit size is specified: size must be an aspect ratio (such as 1:1) or pixels (such as 1024x1024), not auto or omitted

When disabled, the model reads only about the first 4096 tokens of the prompt.

Response

codeinteger

Response status code; 200 when submission succeeds.

dataarray

Submission response data.

Array item

statusstring

Initially submitted.

task_idstring

Unique task ID used to query task status and generation results.

Submission response

A successful submission immediately returns an asynchronous task ID:

json
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KXXXXXXXXXXXXXXX"
    }
  ]
}

Query task results

Call the task status endpoint with the task_id from the submission response:

bash
curl --request GET \
  --url https://api.apisea.ai/v1/tasks/task_01KXXXXXXXXXXXXXXX \
  --header 'Authorization: Bearer <token>'

The high-speed version generates faster than the standard version (in testing, the standard version takes about 10 – 20 seconds for a single 1K / 2K image and about 20 seconds for 4K). Poll every 3 – 5 seconds until the status becomes completed or failed. A single task can run for up to 600 seconds; set your client polling timeout to 10 minutes.

Successful task

json
{
  "code": 200,
  "data": {
    "id": "task_01KXXXXXXXXXXXXXXX",
    "status": "completed",
    "progress": 100,
    "created": 1794450409,
    "completed": 1794450428,
    "actual_time": 19,
    "estimated_time": 60,
    "cost": 0.0493,
    "result": {
      "images": [
        {
          "url": [
            "https://cdn.example.com/f/image/example_0.jpeg",
            "https://cdn.example.com/f/image/example_1.jpeg"
          ],
          "expires_at": 1794536828,
          "revised_prompt": "The image is a realistic, close-up still life photograph of ...",
          "revised_prompts": [
            "The image is a realistic ...",
            "The image is a professional ..."
          ]
        }
      ]
    }
  }
}

Image URLs are in data.result.images[0].url[], with all n images in this single array. Download and store them before expires_at. If the task fails, status is failed, the reason is in error.message, and the charge is automatically refunded in full.

Usage examples

Text to image (default 4K)

json
{
  "model": "minimax-h3-image-highspeed",
  "prompt": "A cozy coffee shop by the sea at sunset, photorealistic, warm tones"
}

Text to image (1K + aspect ratio, 4 images)

json
{
  "model": "minimax-h3-image-highspeed",
  "prompt": "Minimalist headphone product shot, white background, soft shadows",
  "size": "1:1",
  "resolution": "1K",
  "n": 4
}

Exact pixels + PNG

json
{
  "model": "minimax-h3-image-highspeed",
  "prompt": "City night poster, neon lights, cyberpunk style, title text NIGHT CITY",
  "size": "2048x1152",
  "output_format": "png"
}

Reference image editing

json
{
  "model": "minimax-h3-image-highspeed",
  "prompt": "Dress the person in the first image in the jacket from the second image, keeping the background unchanged",
  "image_urls": [
    "https://example.com/person.jpg",
    "https://example.com/jacket.png"
  ],
  "resolution": "2K"
}

Disable prompt enhancement

json
{
  "model": "minimax-h3-image-highspeed",
  "prompt": "a red apple on a wooden table, top view",
  "size": "1:1",
  "resolution": "1K",
  "prompt_optimizer": false
}

Respons

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KXXXXXXXXXXXXXXX"
    }
  ]
}

Menemukan masalah dalam dokumentasi ini? Email support@apisea.ai.