> ## 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 and transform images with GPT Image 2.6 (Flare, Sunburst, Economy) and GPT Image 2.5 using 1–16 input images.

## Models

| Model | Family | Resolutions | Input images | Prompt length | Billing |
| - | - | - | - | - | - |
| `gpt-image-2-6/flare-image-to-image` | GPT Image 2.6 Flare (fast) | 1K, 2K, 4K | 1–16, plus optional mask | 32000 | Per token |
| `gpt-image-2-6/sunburst-image-to-image` | GPT Image 2.6 Sunburst (highest quality) | 1K, 2K, 4K | 1–16, plus optional mask | 32000 | Per token |
| `gpt-image-2-6/economy-image-to-image` | GPT Image 2.6 Economy | 1K | 1–16 | 20000 | Flat per image |
| `gpt-image-2-5-flare-image-to-image` | GPT Image 2.5 | 1K, 2K, 4K | 1–16 | 20000 | Per image |
| `gpt-image-2-5-sunburst-image-to-image` | GPT Image 2.5 | 1K, 2K, 4K | 1–16 | 20000 | Per image |

GPT Image 2.6 Flare is the fast variant, GPT Image 2.6 Sunburst is the highest-quality variant, and
GPT Image 2.6 Economy is a flat-price 1K variant.

> [!NOTE]
>
> This endpoint only accepts the models listed above. Text-to-image models (for example
> `gpt-image-2-6/flare-text-to-image`) must be sent to
> [`/gpt-image/text-to-image`](https://docs.modelhunter.ai/api-reference/gpt-image/text-to-image). Any other `model` returns a `400` "Invalid route" error.

## Field Applicability

| Field | 2.6 Flare / Sunburst | 2.6 Economy | 2.5 |
| - | :-: | :-: | :-: |
| `prompt` | Required, ≤ 32000 | Required, ≤ 20000 | Required, ≤ 20000 |
| `input_urls` | Required, 1–16 | Required, 1–16 | Required, 1–16 |
| `mask_url` | ✓ | — | — |
| `aspect_ratio` | ✓ (default `auto`) | ✓ | ✓ |
| `resolution` | ✓ (default `1K`) | — | ✓ (default `1K`) |
| `quality` | `low` / `medium` / `high` / `xhigh` / `max` / `auto` | — | — |
| `background` | ✓ | ✓ | ✓ |
| `output_format` | `png` / `jpeg` / `webp` | `png` | — |
| `output_compression` | ✓ (`jpeg` / `webp` only) | — | — |
| `complexity` | ✓ | — | — |
| `moderation` | ✓ | — | — |

Fields not listed for a model are rejected with a `VALIDATION_ERROR`.

## Body Parameters

**model** `string` *required*

Model to use:

* `gpt-image-2-6/flare-image-to-image`
* `gpt-image-2-6/sunburst-image-to-image`
* `gpt-image-2-6/economy-image-to-image`
* `gpt-image-2-5-flare-image-to-image`
* `gpt-image-2-5-sunburst-image-to-image`

**input** `object` *required*

Input parameters for the generation.

**properties**

**prompt** `string` *required*

Description of the edit or the image to generate. Maximum length: 32000 characters for GPT Image 2.6 Flare / Sunburst;
20000 characters for GPT Image 2.6 Economy and 2.5.

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

Input image URLs (public HTTP(S)), 1 to 16 images.

**mask\_url** `string`

**2.6 Flare / Sunburst only.** Optional mask image URL (public HTTP(S)) marking the area to edit.
Billed as one additional input image.

**aspect\_ratio** `string`

Output aspect ratio.

* **2.6 Flare / Sunburst** (default `auto`): `auto`, `1:1`, `3:2`, `2:3`, `4:3`, `3:4`,
  `5:4`, `4:5`, `16:9`, `9:16`, `2:1`, `1:2`, `3:1`, `1:3`, `21:9`, `9:21`.
* **GPT Image 2.5**: `auto`, `1:1`, `3:2`, `2:3`, `4:3`, `3:4`, `16:9`, `9:16`, `21:9`, `27:16`, `16:27`, `9:8`, `8:9`.
* **2.6 Economy**: `auto`, `1:1`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`, `4:3`.

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

**2.6 Flare / Sunburst and 2.5 only.** Output resolution: `1K`, `2K` or `4K`. Affects the price.

**quality** `string`

Rendering quality.

* **2.6 Flare / Sunburst**: `low`, `medium`, `high`, `xhigh`, `max` or `auto`. Default `medium`.

**background** `string`

**All models.** Background: `transparent`, `opaque` or `auto`.
A `transparent` background requires `output_format` `png` or `webp`.

**output\_format** `string` (default: png)

**2.6 models only.** Output image format.

* **2.6 Flare / Sunburst**: `png`, `jpeg` or `webp`.
* **2.6 Economy**: `png` only.

**output\_compression** `integer`

**2.6 Flare / Sunburst only.** Compression level from `0` to `100`. Only allowed with `output_format` `jpeg` or `webp`.

**complexity** `string`

**2.6 Flare / Sunburst only.** Scene complexity hint: `low`, `medium` or `high`.

**moderation** `string`

**2.6 Flare / Sunburst only.** Content moderation level: `auto` or `low`.

**webhookUrl** `string`

URL to receive a webhook when the task completes.

**metadata** `object`

Custom key-value metadata to attach to the task.

## Pricing

Per-image models (input images are included):

| Model | 1K | 2K | 4K |
| - | -: | -: | -: |
| GPT Image 2.6 Economy | \$0.0527/image | — | — |
| GPT Image 2.5 (Flare / Sunburst) | \$0.0527/image | \$0.107/image | \$0.1779/image |

GPT Image 2.6 Flare and Sunburst are billed per token:

| Token type | Price |
| - | -: |
| Image output | \$30 / 1M tokens |
| Image input | \$8 / 1M tokens |
| Text input | \$5 / 1M tokens |

Because token usage is only known after generation, GPT Image 2.6 Flare / Sunburst requests are pre-deducted
at submit based on the resolution, the number of input images and the prompt:

* Output: 4,000 image output tokens at `1K` (\$0.12), 8,000 at `2K` (\$0.24), 12,000 at `4K` (\$0.36).
* Input images: 6,000 image input tokens (\$0.048) for each image in `input_urls` and for `mask_url`.
* Prompt: about one text input token per 3 characters, plus 64 tokens.

For example, a `2K` request with 2 input images and a short prompt pre-deducts about \$0.24 + 2 × \$0.048 = \$0.336.

Completed tasks are settled from actual token usage and the unused part of the pre-deduction is refunded.
The final charge never exceeds the pre-deduction. 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/gpt-image/image-to-image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2-6/sunburst-image-to-image",
    "input": {
      "prompt": "Replace the background with a sunlit studio and keep the product unchanged",
      "input_urls": ["https://cdn.example.com/product.png"],
      "mask_url": "https://cdn.example.com/product-mask.png",
      "resolution": "2K",
      "quality": "high",
      "background": "opaque",
      "output_format": "png"
    },
    "metadata": {
      "project": "catalog"
    }
  }'
```

```json 202 theme={null}
{
  "success": true,
  "data": {
    "id": "task_abc123",
    "status": "pending",
    "type": "image-to-image",
    "provider": "gpt-image",
    "model": "gpt-image-2-6/sunburst-image-to-image",
    "created_at": "2026-11-23T10:00:00Z",
    "estimated_seconds": 120
  }
}
```

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


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