> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelhunter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Image to Image

> Edit images with MiniMax H3 Image Edit using 1–16 reference images, at 1K, 2K or 4K or a custom width and height.

## Models

| Model | Reference images | Resolutions | Prompt length |
| - | - | - | - |
| `minimax-h3/image-edit` | 1–16 | 1K, 2K, 4K, or custom `width` × `height` | 5000 |

> [!NOTE]
>
> This endpoint only accepts `minimax-h3/image-edit`. Any other `model` returns a `400` "Invalid route" error.

## Body Parameters

**model** `string` *required*

Model to use: `minimax-h3/image-edit`.

**input** `object` *required*

Input parameters for the generation.

**properties**

**prompt** `string` *required*

Description of the edit to apply. Maximum length: 5000 characters.

**image\_urls** `string[]` *required*

Reference image URLs (public HTTP(S)), 1 to 16 images. Every reference image is billed (see Pricing).

**resolution** `string` (default: 2K)

Output resolution preset: `1K`, `2K` or `4K`. Cannot be combined with `width` / `height`.

**aspect\_ratio** `string`

Output aspect ratio: `auto`, `1:1`, `5:4`, `4:3`, `3:2`, `16:9`, `21:9`, `4:5`, `3:4`, `2:3`, `9:16`.
Cannot be combined with `width` / `height`.

**width** `integer`

Custom output width in pixels, `1`–`8192`. Must be set together with `height`, and replaces
`resolution` and `aspect_ratio` (sending either of them with `width` / `height` is rejected).

Constraints on the custom size:

* `width` × `height` between 655,360 and 20,000,000 pixels.
* `width` : `height` between 1:3 and 3:1.

**height** `integer`

Custom output height in pixels, `1`–`8192`. Must be set together with `width`. See `width` for constraints.

**seed** `integer`

Random seed for reproducibility. Range: `0` to `2147483647`.

**expand\_prompt** `boolean`

Whether to automatically expand and enrich the prompt before generation.

**output\_format** `string`

Output image format: `png` or `jpeg`.

**webhookUrl** `string`

URL to receive a webhook when the task completes.

**metadata** `object`

Custom key-value metadata to attach to the task.

## Pricing

Each request is billed for the output image plus every reference image:

| Item | Price |
| - | -: |
| Output, `1K` or `2K` (custom size up to 4,500,000 pixels) | \$0.02179/image |
| Output, `4K` (custom size above 4,500,000 pixels, up to 20,000,000) | \$0.06879/image |
| Reference image in `image_urls` (including the first) | \$0.0065/image |

With `width` / `height`, the output tier is chosen from `width` × `height`; otherwise from `resolution` (default `2K`).

For example, a `2K` edit with 3 reference images costs \$0.02179 + 3 × \$0.0065 = \$0.04129.
Failed tasks are refunded.

Prices are in USD and current as of November 23, 2026.

## Example

```bash theme={null}
curl -X POST https://api.modelhunter.ai/api/v1/minimax/image-to-image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-h3/image-edit",
    "input": {
      "prompt": "Put the person from the first image into the living room from the second image",
      "image_urls": [
        "https://cdn.example.com/person.png",
        "https://cdn.example.com/living-room.jpg"
      ],
      "resolution": "2K",
      "aspect_ratio": "16:9",
      "output_format": "jpeg"
    },
    "metadata": {
      "project": "composite"
    }
  }'
```

```json 202 theme={null}
{
  "success": true,
  "data": {
    "id": "task_abc123",
    "status": "pending",
    "type": "image-to-image",
    "provider": "minimax",
    "model": "minimax-h3/image-edit",
    "created_at": "2026-11-23T10:00:00Z",
    "estimated_seconds": 60
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "input.image_urls is required"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.