# OpenAI GPT Image 2.5 Sunburst Specification

OpenAI GPT Image 2.5 Sunburst is the precision-focused, high-fidelity model in the GPT Image 2.5 family. It is engineered for complex scenes, micro-textures, intricate architectural renderings, macro photography, and professional image editing with extreme detail retention.

---

## 1. Quick Overview

* **Model Slug:** `gpt-image-2.5-sunburst` (or `gpt-image-2-5-sunburst`)
* **Endpoint:** `POST https://api.amandevelops.com/v1/gpt-image-2.5-sunburst/`
* **Category:** High-Precision Text-to-Image & Image-to-Image (Edit)
* **Automatic Mode Switching:** Operates in Text-to-Image mode when `image_input` is empty, or automatically switches to Edit mode when reference images are provided.
* **Output Formats:** PNG (`png`), JPEG (`jpeg`), or WebP (`webp`)
* **Resolution Tiers:** `1k`, `2k`, `4k`
* **Quality Tiers:** `low`, `medium` (default), `high`, `xhigh`, `max`
* **Status Polling:** Pure-database polling at `GET /v1/tasks/{task_id}`
* **Webhooks:** Optional signed webhook callbacks upon job completion

---

## 2. API Request Specification

* **HTTP Method:** `POST`
* **Path:** `/v1/gpt-image-2.5-sunburst/`
* **Headers:**
  ```http
  Authorization: Bearer <YOUR_API_KEY>
  Content-Type: application/json
  ```

### Example 1: Text-to-Image Generation

```json
{
  "prompt": "Macro shot of a luxury chronograph watch face, intricate golden gears, sapphire crystal glass with subtle reflections, 8k photorealistic",
  "aspect_ratio": "1:1",
  "resolution": "1k",
  "quality": "medium",
  "output_format": "png",
  "webhook_url": "https://your-domain.com/api/webhooks/image-completed"
}
```

### Example 2: Image-to-Image / Edit Mode

When `image_input` contains one or more reference images, the model automatically operates in Edit mode:

```json
{
  "prompt": "Change the background to a dramatic twilight city skyline while preserving the watch details in the foreground",
  "image_input": [
    "https://your-domain.com/assets/sample-watch.jpg"
  ],
  "aspect_ratio": "1:1",
  "resolution": "1k",
  "quality": "medium",
  "output_format": "png"
}
```

---

## 3. Parameter Reference

| Parameter | Type | Required? | Default | Description |
|---|---|---|---|---|
| `prompt` | `string` | **Required** | — | Detailed natural language instruction or edit description (up to 20,000 characters). |
| `aspect_ratio` | `string` | Optional | `"auto"` | Target canvas proportion: `"1:1"`, `"1:2"`, `"2:1"`, `"1:3"`, `"3:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`, `"9:21"`, `"21:9"`, or `"auto"`. |
| `resolution` | `string` | Optional | `"1k"` | Output resolution: `"1k"`, `"2k"`, or `"4k"`. |
| `quality` | `string` | Optional | `"medium"` | Rendering fidelity tier: `"low"` (fast draft), `"medium"` (balanced default), `"high"`, `"xhigh"`, or `"max"` (highest fidelity). |
| `output_format` | `string` | Optional | `"png"` | Target file format: `"png"`, `"jpeg"`, or `"webp"`. |
| `image_input` | `array` | Optional | `[]` | Array of public HTTP/HTTPS image URLs or base64 Data URIs to edit or use as reference (Max 14 images). Adding images switches the request to Edit mode. |
| `webhook_url` | `string` | Optional | `null` | Your webhook URL to receive an automated HTTP POST notification when generation completes. |

---

## 4. Pricing & Wallet Economics

Requests to `gpt-image-2.5-sunburst` are billed dynamically from your prepaid wallet balance based on the selected resolution, quality tier, and the number of reference images:

$$\text{Total Cost} = \text{Base Price}(\text{resolution}, \text{quality}) + (\text{Input Images} \times \$0.0150)$$

### Base Rate Matrix (Text-to-Image)

| Resolution | `low` | `medium` (Default) | `high` | `xhigh` | `max` |
|---|---|---|---|---|---|
| **1k** | $0.0100 | **$0.0240** | $0.0900 | $0.1600 | $0.3600 |
| **2k** | $0.0200 | **$0.0400** | $0.1500 | $0.2700 | $0.6000 |
| **4k** | $0.0300 | **$0.0700** | $0.2700 | $0.4800 | $1.0000 |

### Input Image Surcharge
* Each reference image provided in `image_input` adds **+$0.0150 USD** to the base rate.
* **Examples:**
  * 1k, medium (default) text-to-image: **$0.0240 USD**
  * 1k, medium with 1 reference image (edit): **$0.0390 USD**
  * 2k, high with 2 reference images: $\$0.1500 + (2 \times \$0.0150) = \mathbf{\$0.1800\text{ USD}}$
  * 4k, max with 10 reference images: $\$1.0000 + (10 \times \$0.0150) = \mathbf{\$1.1500\text{ USD}}$

> [!TIP]
> **Automated Failure Refund:**
> If an inference task encounters a timeout or upstream failure, reserved funds are automatically refunded back to your wallet balance immediately.

---

## 5. Integration Code Examples

### cURL
```bash
curl -X POST https://api.amandevelops.com/v1/gpt-image-2.5-sunburst/ \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "An intricate stained glass window depicting an celestial galaxy, vibrant colors, sunlight streaming through",
    "aspect_ratio": "16:9",
    "resolution": "1k",
    "quality": "medium"
  }'
```

### Python
```python
import requests

url = "https://api.amandevelops.com/v1/gpt-image-2.5-sunburst/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "prompt": "Macro close-up of a dewdrop on a vibrant green monstera leaf, refraction of light, photorealistic",
    "aspect_ratio": "1:1",
    "resolution": "2k",
    "quality": "high"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())
```

### JavaScript (Node.js)
```javascript
const response = await fetch("https://api.amandevelops.com/v1/gpt-image-2.5-sunburst/", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "prompt": "Modern architectural villa in the Swiss Alps, glass walls, warm interior lighting, snow-covered pines",
    "aspect_ratio": "16:9",
    "resolution": "1k",
    "quality": "medium"
  })
});

const data = await response.json();
console.log("Task Queued:", data);
```