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

# GPT Image 2.5 Ext

> Generate 1K–4K images per delivered image with gpt-image-2.5-ext.

`gpt-image-2.5-ext` is the canonical GPT Image 2.5 Ext route. It bills **per delivered image**, not by tokens. Flare is the default. Send `version: "sunburst"` for Sunburst on this model ID, or use [`gpt-image-2.5-ext-sunburst`](/api-manual/image/gpt-image-2-5-ext-sunburst).

| Property    | Value                                                     |
| ----------- | --------------------------------------------------------- |
| Model ID    | `gpt-image-2.5-ext`                                       |
| Versions    | `flare` (default) or `sunburst`                           |
| Resolutions | `1K`, `2K`, `4K` (default `1K`)                           |
| Size        | `auto` (default) or a supported ratio                     |
| Count       | integer `n` from 1 to 4 (default `1`)                     |
| References  | optional, up to 16 public URLs or PNG/JPEG/WebP Data URLs |
| Response    | `data[].url` when the request waits successfully          |

| Resolution | Price per delivered image |
| ---------- | ------------------------: |
| `1K`       |   \$0.0085 (0.85 credits) |
| `2K`       |     \$0.014 (1.4 credits) |
| `4K`       |     \$0.021 (2.1 credits) |

**100 FreeModel credits = \$1**. Flare and Sunburst use the same prices. Reference images have no surcharge. Ext does not accept `quality`, transparency, or custom pixel sizes such as `1024x1024`.

<ParamField body="model" type="string" required>
  Set to `gpt-image-2.5-ext`.
</ParamField>

<ParamField body="prompt" type="string" required>
  Describe the subject, composition, lighting, and style. The prompt must be a non-empty string of at most 100,000 characters.
</ParamField>

<ParamField body="version" type="string" default="flare">
  Use `flare` or `sunburst`.
</ParamField>

<ParamField body="resolution" type="string" default="1K">
  Use `1K`, `2K`, or `4K`. This selects the billed output tier.
</ParamField>

<ParamField body="size" type="string" default="auto">
  Use `auto`, `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `5:4`, `4:5`, or `21:9`.
</ParamField>

<ParamField body="n" type="integer" default="1">
  Request 1 to 4 images. The gateway reserves `n` times the resolution price, then settles the actual returned count.
</ParamField>

<ParamField body="image_urls" type="string[]">
  Up to 16 publicly reachable `http` or `https` image URLs, or `data:image/png`, `data:image/jpeg`, or `data:image/webp` Data URLs. Loopback, private, and credentialed URLs are rejected. The whole JSON body is still limited by the gateway request-size cap (default 10 MiB).
</ParamField>

## Request

A normal request waits for a terminal result (default 180 seconds). On success it returns image URLs. If generation is still running, the response is HTTP `202` with a gateway task object. Poll [`GET /v1/tasks/{id}`](/api-reference/task-status) with the same API key. Do not treat that object as an upstream Apimart payload.

```bash theme={null}
curl https://api.freemodel.app/v1/images/generations \
  -H "Authorization: Bearer $FREEMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.5-ext",
    "prompt": "Preserve the product and replace the background with warm linen",
    "resolution": "4K",
    "size": "16:9",
    "n": 2,
    "image_urls": ["https://example.com/product.png"]
  }'
```

```json theme={null}
{
  "created": 1784045139,
  "data": [
    { "url": "https://cdn.example.com/image-1.png" },
    { "url": "https://cdn.example.com/image-2.png" }
  ]
}
```

## Run asynchronously

Send `Prefer: respond-async` to receive HTTP `202` immediately. Include `Idempotency-Key` (1–200 characters) if you need the gateway to replay the same client submission. Read `Location` or `x-gateway-task-id`, then poll [`GET /v1/tasks/{id}`](/api-reference/task-status).

```bash theme={null}
curl https://api.freemodel.app/v1/images/generations \
  -H "Authorization: Bearer $FREEMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Prefer: respond-async" \
  -H "Idempotency-Key: lantern-4k-001" \
  -d '{
    "model": "gpt-image-2.5-ext",
    "version": "sunburst",
    "prompt": "An indigo paper lantern on linen, editorial lighting",
    "resolution": "1K",
    "size": "auto",
    "n": 1
  }'
```

<Note>
  The gateway reserves the requested `n` and resolution up front. A successful task charges the delivered image count against that immutable price version. Explicit failure or cancellation releases the reservation. Missing, empty, oversized, or invalid results keep the reservation for reconciliation. Repeated status polls do not charge twice.
</Note>

<Card title="Open the model playground" icon="wand-magic-sparkles" href="https://freemodel.app/models/gpt-image-2-5-ext">
  Run the same route from the FreeModel model page.
</Card>
