# MiniMax H3 Image Highspeed

## Quick example

Submit one image request, save the returned `id`, and poll until the task is `completed` or `failed`. This API uses asynchronous tasks and URL outputs.

```bash
curl https://api.seedrouter.ai/v1/images/generations \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"minimax-h3-image-highspeed","prompt":"An amber bottle on pale limestone in soft morning light","area":"1K","aspect_ratio":"3:2"}'
```

```python
import os
import requests
response = requests.post(
    "https://api.seedrouter.ai/v1/images/generations",
    headers={"Authorization": f"Bearer {os.environ['SEEDROUTER_API_KEY']}"},
    json={"model": "minimax-h3-image-highspeed", "prompt": "An amber bottle on pale limestone in soft morning light", "area": "1K", "aspect_ratio": "3:2"},
    timeout=60,
)
response.raise_for_status()
task = response.json()
print(task["id"])
```

```javascript
const response = await fetch('https://api.seedrouter.ai/v1/images/generations', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.SEEDROUTER_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ model: 'minimax-h3-image-highspeed', prompt: 'An amber bottle on pale limestone in soft morning light', area: '1K', aspect_ratio: '3:2' }),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const task = await response.json();
console.log(task.id);
```

```php
<?php
$ch = curl_init('https://api.seedrouter.ai/v1/images/generations');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('SEEDROUTER_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode(['model' => 'minimax-h3-image-highspeed', 'prompt' => 'An amber bottle on pale limestone in soft morning light', 'area' => '1K', 'aspect_ratio' => '3:2']),
]);
$response = curl_exec($ch);
if ($response === false) throw new RuntimeException('Submission could not be confirmed');
echo $response;
curl_close($ch);
```

## Endpoint and headers

`POST https://api.seedrouter.ai/v1/images/generations`

| Header        | Value                 |
| ------------- | --------------------- |
| Authorization | `Bearer YOUR_API_KEY` |
| Content-Type  | `application/json`    |

Keep the key on your server. An HTTP success acknowledges a task; it does not mean that its image is ready.

## Parameters

There are **13 accepted fields**. Only `model` and `prompt` are required. Omit optional fields to use defaults; no field accepts `null`. The Playground provides the fixed model and ten editable inputs. URL response format and non-streaming task delivery are fixed.

| Field                     | Type         | Default  | Constraint                                                            |
| ------------------------- | ------------ | -------- | --------------------------------------------------------------------- |
| `model`                   | string       | Required | `minimax-h3-image-highspeed`                                          |
| `prompt`                  | string       | Required | 1–32000 Unicode characters after trimming                             |
| `images`                  | object array | Omitted  | 1–16 ordered objects, each containing `image_url`                     |
| `disable_prompt_enhanced` | boolean      | `false`  | Generation only; see dependencies below                               |
| `n`                       | integer      | `1`      | 1–10                                                                  |
| `size`                    | string       | `auto`   | `auto` or `WIDTHxHEIGHT`; lowercase x                                 |
| `aspect_ratio`            | string       | `auto`   | `auto` or `X:Y`; X and Y integers 1–300; ratio 1:3–3:1                |
| `area`                    | string       | `4K`     | `1K`, `2K`, `4K`; approximate target areas 1024², 2048², 4096² pixels |
| `output_format`           | string       | `jpeg`   | `jpeg`, `jpg` alias, `png`                                            |
| `output_compression`      | integer      | `95`     | 0–100; JPEG quality; ignored for PNG                                  |
| `aigc_watermark`          | boolean      | `false`  | Add an AI-generated-content watermark                                 |
| `response_format`         | string       | `url`    | Only `url`                                                            |
| `stream`                  | boolean      | `false`  | Only `false`; poll the task ID                                        |

## Size and prompt dependencies

Explicit `size` must contain positive integer dimensions with an area between 655360 and 20000000 pixels, inclusive. Width divided by height must be between 1/3 and 3. For example, `2048x1152` is valid. When using explicit dimensions, &#x2A;*omit both `aspect_ratio` and `area`**, even if their value would be `auto`.

With omitted or `auto` size, use `aspect_ratio` and `area` together. Area is a target size; inspect the delivered file for exact dimensions. It is not a fixed single-image price.

Setting `disable_prompt_enhanced: true` requires an explicit pixel size or a fixed aspect ratio. With enhancement disabled, the model reads approximately the first 4096 prompt tokens. The 32000-character submission limit still applies. Editing always enhances prompts, so `true` is rejected when `images` is present.

No mask, seed, style, quality, negative prompt, background, or separate resolution field is accepted. Unknown parameters return an error before submission. Streaming, base64 images and WebP output are not offered by this API.

## Reference images

Use publicly accessible HTTP(S) URLs without embedded credentials. Each image must be JPEG, PNG, WebP, HEIC or HEIF; at most 64 MiB; 128–8192 pixels on each side; and a long-to-short-side ratio at most 4. Keep the JSON body at or below 64 MiB. Image bytes are sent by URL, not inside the JSON body.

Assign a clear purpose to each reference and describe what should remain unchanged. The array order identifies `<Picture 1>`, `<Picture 2>` and so on.

```json
{
  "model": "minimax-h3-image-highspeed",
  "prompt": "Use <Picture 1> as the product and <Picture 2> as the setting. Preserve the product's shape and label. Match the setting's light and perspective.",
  "images": [
    {"image_url": "https://example.com/product.jpg"},
    {"image_url": "https://example.com/setting.jpg"}
  ],
  "aspect_ratio": "3:2",
  "area": "2K",
  "n": 1,
  "output_format": "png"
}
```

Replace the illustrative URLs with your own accessible image files.

## Billing

Billing has three token categories: text input, image input and image output. Multiply actual usage in each category by its live rate. Output count, image dimensions and reference images affect usage; resolution names do not define a fixed bill. Failed requests are not charged. See [live pricing](https://seedrouter.ai/models/minimax-h3-image-highspeed#pricing).

## Task response and polling

An accepted request returns an asynchronous task:

```json
{"id":"task_example","model":"minimax-h3-image-highspeed","status":"processing"}
```

```bash
curl https://api.seedrouter.ai/v1/tasks/task_example \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY"
```

A completed response contains image URLs in `output.data`. Each delivered image includes its `size` and can include `revised_prompt` (the enhanced description). `output.created` is the creation time in Unix seconds, and `output.output_format` identifies the delivered format. `output.usage` exposes text-input, image-input and image-output token counts and the delivered `generated_images` count. Example URLs and IDs below are illustrative:

```json
{
  "id": "task_example",
  "model": "minimax-h3-image-highspeed",
  "status": "completed",
  "output": {"data": [{"url": "https://file.deepytb.com/generated/example.jpg"}]}
}
```

Poll every 10–20 seconds. A client timeout is not a failed task: retain its ID and continue polling instead of submitting a duplicate request. Public responses do not contain account balances or costs.

## Errors

HTTP errors use `{"error":{"code":integer,"message":string}}`. A failed task has `status: "failed"` and an error. Correct invalid parameters before a new submission. See the [shared error directory](https://seedrouter.ai/docs/errors) and [task lifecycle](https://seedrouter.ai/docs/api/tasks).

## Related pages

* [MiniMax H3 Image Highspeed Playground and pricing](https://seedrouter.ai/models/minimax-h3-image-highspeed)
* [MiniMax H3 Image](https://seedrouter.ai/models/minimax-h3-image)
