> ## 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 Sunburst API: Image Generation & Editing

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

## Overview

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

| Capability | Value |
| - | - |
| Model ID | `gpt-image-2.5-sunburst` |
| Modes | `text-to-image`, `image-to-image` |
| Prompt length | 1-32,000 characters |
| Reference images | 1-16 URLs for `image-to-image` |
| Mask editing | Optional `mask_url` 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 `size` (supported ratio or custom `WIDTHxHEIGHT`) |
| Background | `auto`, `transparent`, `opaque` |
| Output format | `png`, `jpeg`, `webp` |
| 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-sunburst` | Submit a generation task |
| `GET` | `/statusTask/gpt-image-2.5-sunburst?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-sunburst" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "text-to-image",
      "prompt": "A cinematic aerial view of a futuristic coastal city at sunrise, warm golden light, detailed architecture, realistic clouds and ocean, no text or watermark",
      "aspect_ratio": "16:9",
      "resolution": "4k",
      "quality": "max"
    }
  }'
```

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 travel poster of mountains, a lake, and a cabin at sunrise, rich natural colors, no text",
    "aspect_ratio": "3:2",
    "resolution": "2k",
    "quality": "high"
  }
}
```

### Image-to-image

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "image-to-image",
    "prompt": "Turn the supplied portrait into a refined editorial fashion photograph. Preserve the person's identity and pose, natural skin texture, beige studio backdrop, soft directional light.",
    "image_urls": [
      "https://your-domain.com/images/portrait-source.jpg"
    ],
    "mask_url": "https://your-domain.com/images/portrait-mask.png",
    "aspect_ratio": "4:5",
    "background": "opaque",
    "output_format": "png",
    "resolution": "2k",
    "quality": "max"
  }
}
```

## 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 Sunburst 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-32,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`. `1:2` and `2:1` require `resolution` to be `2k` or `4k`. Ignored when `size` is supplied.
    </ParamField>

    <ParamField body="size" type="string">
      Optional output size. Use a supported aspect ratio or custom `WIDTHxHEIGHT`, such as `1536x1024`. It takes priority over `aspect_ratio`. Custom `WIDTHxHEIGHT`, `1:2`, and `2:1` require `resolution` to be `2k` or `4k`.
    </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>

    <ParamField body="background" type="string" default="auto">
      Output background. Supported values: `auto`, `transparent`, `opaque`. When using `transparent`, set `output_format` to `png` or `webp`.
    </ParamField>

    <ParamField body="output_format" type="string" default="png">
      Output image format. Supported values: `png`, `jpeg`, `webp`. `jpeg` cannot be used with `background=transparent`.
    </ParamField>

    <ParamField body="mask_url" type="string">
      Optional public HTTP(S) mask image URL. Available only for `image-to-image` and requires `image_urls`.
    </ParamField>
  </Expandable>
</ParamField>

## Poll for results

```bash theme={null}
curl -X GET "https://api.apixo.ai/api/v1/statusTask/gpt-image-2.5-sunburst?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. Text-to-image and image-to-image use the same output-tier price; reference images do not add an extra charge.

| Quality | `1k` | `2k` | `4k` |
| - | -: | -: | -: |
| `low` | `$0.0100` | `$0.0200` | `$0.0300` |
| `medium` | `$0.0240` | `$0.0400` | `$0.0700` |
| `high` | `$0.0900` | `$0.1500` | `$0.2700` |
| `xhigh` | `$0.1600` | `$0.2700` | `$0.4800` |
| `max` | `$0.3600` | `$0.6000` | `$1.0000` |

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)


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