# MiniMax H3 Image Highspeed Edit

> MiniMax H3 Image Highspeed Edit transforms and combines up to 16 reference images using text instructions. It supports multi-image composition and custom output sizes up to 20 megapixels, preserving the first image’s aspect ratio by default.


## Overview

- **Endpoint**: `https://fal.run/minimax/h3-image/highspeed/edit`
- **Model ID**: `minimax/h3-image/highspeed/edit`
- **Category**: image-to-image
- **Kind**: inference
**Tags**: image-editing, multi-image, image-composition



## Pricing

Billing is based on actual token usage: **$23 per 10 million input text tokens**, **$30 per 10 million input image tokens**, and **$76 per 10 million output image tokens**. Prompt enhancement is included in reported input text token usage.

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _required_):
  The edit to make. Refer to the input images as Image 1, Image 2, ... in `image_urls` order.
  - Examples: "Put a red knitted scarf on the dog and keep everything else"

- **`image_urls`** (`list<string>`, _required_):
  The images to edit or compose, at most 16, in the order the prompt cites them. Each side must be 128 to 8192 pixels.
  - Array of string
  - Examples: ["https://storage.googleapis.com/falserverless/example_inputs/dog.png"]

- **`image_size`** (`ImageSize | Enum`, _optional_):
  The size of the generated image. Output area must be 655360 to 20000000 pixels, inclusive, with aspect ratio between 1:3 and 3:1, inclusive. `auto` keeps the first image's aspect ratio, limited to 1:3..3:1, within a 2048x2048 area. Default value: `auto`
  - Default: `"auto"`
  - One of: ImageSize | Enum

- **`num_images`** (`integer`, _optional_):
  The number of images to generate, all from one expanded prompt. Default value: `1`
  - Default: `1`
  - Range: `1` to `10`

- **`output_format`** (`OutputFormatEnum`, _optional_):
  The format of the generated image. Default value: `"png"`
  - Default: `"png"`
  - Options: `"jpeg"`, `"png"`, `"webp"`, `"jpg"`

- **`sync_mode`** (`boolean`, _optional_):
  If `True`, the media will be returned as a data URI and the output data won't be available in the request history.
  - Default: `false`



**Required Parameters Example**:

```json
{
  "prompt": "Put a red knitted scarf on the dog and keep everything else",
  "image_urls": [
    "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
  ]
}
```

**Full Example**:

```json
{
  "prompt": "Put a red knitted scarf on the dog and keep everything else",
  "image_urls": [
    "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
  ],
  "image_size": "auto",
  "num_images": 1,
  "output_format": "png"
}
```


### Output Schema

The API returns the following output format:

- **`images`** (`list<ImageFile>`, _required_):
  The generated images.
  - Array of ImageFile

- **`usage`** (`ImageUsage`, _optional_):
  Validated successful-image token usage, including prompt enhancement in input text tokens.

- **`actual_prompt`** (`string`, _optional_):
  The expanded prompt when available; null when expansion was disabled or the partner omitted it.

- **`has_nsfw_concepts`** (`list<boolean>`, _required_):
  Whether each generated image was flagged by the safety checker.
  - Array of boolean

- **`timings`** (`Timings`, _required_):
  Seconds spent in each generation stage.



**Example Response**:

```json
{
  "images": [
    {
      "url": "",
      "content_type": "image/png",
      "file_name": "z9RV14K95DvU.png",
      "file_size": 4404019
    }
  ]
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/minimax/h3-image/highspeed/edit \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "Put a red knitted scarf on the dog and keep everything else",
     "image_urls": [
       "https://storage.googleapis.com/falserverless/example_inputs/dog.png"
     ]
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "minimax/h3-image/highspeed/edit",
    arguments={
        "prompt": "Put a red knitted scarf on the dog and keep everything else",
        "image_urls": ["https://storage.googleapis.com/falserverless/example_inputs/dog.png"]
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("minimax/h3-image/highspeed/edit", {
  input: {
    prompt: "Put a red knitted scarf on the dog and keep everything else",
    image_urls: ["https://storage.googleapis.com/falserverless/example_inputs/dog.png"]
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Deploy your own model

To run your own weights, a fine-tune or a custom pipeline on the GPUs that serve this API, deploy it on fal Serverless. GPUs from H100 (80GB) to B300 (288GB), billed per second; an H100 is $4.50/h list, as low as $2.49/h. Prices, GPU specs and deploy steps: [fal Serverless](https://fal.ai/serverless.md).

## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/minimax/h3-image/highspeed/edit)
- [API Documentation](https://fal.ai/models/minimax/h3-image/highspeed/edit/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=minimax/h3-image/highspeed/edit)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- [Pricing](https://fal.ai/pricing.md): Model API and Serverless GPU prices
- [fal Serverless](https://fal.ai/serverless.md): Deploy your own models: GPU prices, specs and steps
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
