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

# GPT Image 2.5 Flare API: Image Generation & Editing

> Generate and edit images with the GPT Image 2.5 Flare API through APIXO

## Overview

GPT Image 2.5 Flare is an asynchronous image generation API for text-to-image and reference-guided image editing.

<Note>
  Current implementation notice: GPT Image 2.5 Flare currently provides the GPT Image 2 capability baseline. Its public model ID, accepted parameters, and prices are listed on this page.
</Note>

| Capability       | Value                                                                                         |
| ---------------- | --------------------------------------------------------------------------------------------- |
| Model ID         | `gpt-image-2.5-flare`                                                                         |
| Modes            | `text-to-image`, `image-to-image`                                                             |
| Prompt length    | 1-20,000 characters                                                                           |
| Reference images | 1-16 URLs for `image-to-image`                                                                |
| Aspect ratios    | `auto`, `1:1`, `1:2`, `2:1`, `2:3`, `3:2`, `4:3`, `3:4`, `4:5`, `5:4`, `16:9`, `9:16`, `21:9` |
| Output control   | `aspect_ratio` or custom `WIDTHxHEIGHT` `size`                                                |
| Resolution tiers | `1k`, `2k`, `4k`                                                                              |
| Quality tiers    | `low`, `medium`, `high`, `xhigh`, `max`                                                       |

## Endpoint and authentication

Base URL:

```text theme={null}
https://api.apixo.ai/api/v1
```

| Method | Endpoint                                          | Purpose                               |
| ------ | ------------------------------------------------- | ------------------------------------- |
| `POST` | `/generateTask/gpt-image-2.5-flare`               | Submit a generation task              |
| `GET`  | `/statusTask/gpt-image-2.5-flare?taskId={taskId}` | Poll task status and retrieve results |

```http theme={null}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Quickstart

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/gpt-image-2.5-flare" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-image",
      "prompt": "A premium minimalist perfume bottle on dark green marble, soft studio lighting, luxury commercial photography, no text",
      "aspect_ratio": "1:1",
      "resolution": "1k",
      "quality": "medium"
    }
  }'
```

The accepted response includes `data.taskId`. Save it and poll until `state` becomes `success` or `failed`.

## Request body

### Text-to-image

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "text-to-image",
    "prompt": "A cinematic aerial view of a coastal city at sunrise, warm golden light, realistic clouds and ocean, no text",
    "aspect_ratio": "16:9",
    "resolution": "2k",
    "quality": "high"
  }
}
```

### Image-to-image

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "image-to-image",
    "prompt": "Transform the supplied product photo into a clean premium e-commerce hero image with a white studio background. Preserve the product shape and logo.",
    "image_urls": [
      "https://your-domain.com/images/product-source.png"
    ],
    "size": "1536x1024",
    "resolution": "2k",
    "quality": "xhigh"
  }
}
```

## Parameters

<ParamField body="request_type" type="string" required default="async">
  Result delivery mode. Use `async` for polling with `statusTask`, or `callback` for webhook delivery.
</ParamField>

<ParamField body="callback_url" type="string">
  Required when `request_type` is `callback`. It must be a public HTTPS URL that can receive the final task payload. See [Webhooks](/docs/api-reference/webhooks).
</ParamField>

<ParamField body="input" type="object" required>
  GPT Image 2.5 Flare input parameters.

  <Expandable title="properties">
    <ParamField body="mode" type="string" required>
      Generation mode. Supported values: `text-to-image`, `image-to-image`.
    </ParamField>

    <ParamField body="prompt" type="string" required>
      Text prompt describing the requested image or edit. Supports 1-20,000 characters.
    </ParamField>

    <ParamField body="image_urls" type="string[]">
      Publicly accessible reference image URLs. Required for `image-to-image`; supports 1-16 URLs.
    </ParamField>

    <ParamField body="aspect_ratio" type="string" default="auto">
      Output aspect ratio. Supported values: `auto`, `1:1`, `1:2`, `2:1`, `2:3`, `3:2`, `4:3`, `3:4`, `4:5`, `5:4`, `16:9`, `9:16`, `21:9`. Ignored when `size` is supplied.
    </ParamField>

    <ParamField body="size" type="string">
      Optional custom output size in `WIDTHxHEIGHT` format, such as `1536x1024`. Takes priority over `aspect_ratio`.
    </ParamField>

    <ParamField body="resolution" type="string" default="1k">
      Output resolution tier. Supported values: `1k`, `2k`, `4k`.
    </ParamField>

    <ParamField body="quality" type="string" default="medium">
      Quality and billing tier. Supported values: `low`, `medium`, `high`, `xhigh`, `max`. Each tier has its own listed price.
    </ParamField>
  </Expandable>
</ParamField>

## Poll for results

```bash theme={null}
curl -X GET "https://api.apixo.ai/api/v1/statusTask/gpt-image-2.5-flare?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

When successful, `data.resultJson` is a JSON string containing `resultUrls`:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/xxx.png\"]}",
    "createTime": 1767965610929,
    "completeTime": 1767965652317,
    "costTime": 41388
  }
}
```

For failed tasks, `state` is `failed` and the response includes `failCode` and `failMsg`.

## Billing

Billing is per successfully generated image. Prices below are in USD and retain four decimal places.

| Quality  |      `1k` |      `2k` |      `4k` |
| -------- | --------: | --------: | --------: |
| `low`    | `$0.0360` | `$0.0480` | `$0.0660` |
| `medium` | `$0.0509` | `$0.0538` | `$0.0970` |
| `high`   | `$0.2026` | `$0.2132` | `$0.3850` |
| `xhigh`  | `$0.3039` | `$0.3197` | `$0.5775` |
| `max`    | `$0.3647` | `$0.3837` | `$0.6930` |

For the live price catalog, see [Pricing](https://apixo.ai/pricing).

## Latency and polling

Generation time depends on prompt complexity, reference images, selected resolution, and current queue load. Start polling after 30-60 seconds, then poll every 10 seconds. For production workloads, prefer callback mode.

## Related links

* [Image Models](/docs/models/image)
* [Generation API Overview](/docs/models)
* [Generate Task](/docs/api-reference/generate-task)
* [Status Task](/docs/api-reference/status-task)
* [Webhooks](/docs/api-reference/webhooks)
* [Pricing](/docs/pricing)
