# gpt-image-2.6-sunburst

Source: https://docs.sociaro.com/models/gpt-image-2-6-sunburst/

OpenAI's GPT Image 2.6 Sunburst — image generation for detailed visual work, with higher quality and more consistency between images.

Takes a text prompt and returns an image.

|  |  |
| --- | --- |
| Slug | `gpt-image-2.6-sunburst` |
| Kind | image |
| Vendor | openai |
| Endpoint | `POST /v1/images/generations` |

[View pricing and billing conditions](https://docs.sociaro.com/models/gpt-image-2-6-sunburst/#pricing)

## Example request

cURL

```bash
curl https://api.sociaro.com/v1/images/generations \
  -H "Authorization: Bearer $SOCIARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "gpt-image-2.6-sunburst",
        "prompt": "a paper boat on a rain-soaked street",
        "size": "1024x1024"
      }'

# the image comes back in the response itself, base64 in data[0].b64_json
```

Python

```python
# Requires Python 3 and requests (pip install requests).
import os
import requests

payload = {'model': 'gpt-image-2.6-sunburst',
 'prompt': 'a paper boat on a rain-soaked street',
 'size': '1024x1024'}

response = requests.post(
    'https://api.sociaro.com/v1/images/generations',
    headers={
        'Authorization': 'Bearer ' + os.environ['SOCIARO_API_KEY'],
        'Content-Type': 'application/json',
    },
    json=payload,
    timeout=120,
)
response.raise_for_status()
print(response.text)
```

JavaScript

```javascript
// Run as an .mjs file with Node.js 22 or later.

const payload = {
  "model": "gpt-image-2.6-sunburst",
  "prompt": "a paper boat on a rain-soaked street",
  "size": "1024x1024"
};

const response = await fetch("https://api.sociaro.com/v1/images/generations", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.SOCIARO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());
```

## Parameters

| Field | Type | Required | Default | Values | What it does |
| --- | --- | --- | --- | --- | --- |
| `prompt` | string | yes | — | text | What to generate. |
| `size` | string | no | auto | auto · 1024x1024 · 1536x1024 · 1024x1536, or WxH | A custom WxH takes multiples of 16, an aspect between 1:3 and 3:1, an edge up to 3840 px and 655,360 to 8,294,400 pixels in all. |
| `quality` | string | no | auto | low · medium · high · xhigh · max · auto | Higher quality takes longer and produces more output tokens, which is what the image is billed by. |
| `background` | string | no | auto | transparent · opaque · auto | `transparent` needs an output format with alpha (png or webp). |
| `output_format` | string | no | png | png · jpeg · webp · gif · svg | svg returns one image only (n must be 1). |
| `output_compression` | integer | no | 100 | 0 – 100 | For jpeg and webp. |
| `n` | integer | no | 1 | 1 – 10 | How many images to make; each is billed. |
| `moderation` | string | no | auto | auto · low | `low` applies OpenAI's less restrictive filtering. |
| `user` | string | no | — | text | Your own end-user id, passed to OpenAI for abuse monitoring. |

## Pricing

| Billable unit and options | Rate (USD) |
| --- | --- |
| per 1M input tokens | $6.0 |
| per 1M cached input tokens | $1.5 |
| per 1M input image tokens | $9.6 |
| per 1M output image tokens | $36.0 |

[View this model in the pricing catalogue](https://sociaro.com/pricing?model=gpt-image-2.6-sunburst). Your [billing logs](https://docs.sociaro.com/billing/index.md) show the actual charge for each request.
