# GPT Image 2.6 Sunburst · API guide

Use Sunburst for detailed compositions and precise visual instructions. Use the NewRouters model ID `gpt-image-2.6-sunburst`.

[Text to image](/docs/models/gpt-image-2.6-sunburst/generations) · [Reference image edits](/docs/models/gpt-image-2.6-sunburst/edits)

Generations support JPEG, PNG, WebP and animated GIF. Use automatic sizing for GIF generation. The live sample returned nine frames at 200 ms per frame. Custom timing and frame counts are unverified.

```bash
curl "https://newrouters.com/v1/tasks" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "gpt-image-2.6-sunburst",
  "input": {
    "prompt": "A blue ceramic cup on white with soft side lighting and a detailed glaze.",
    "size": "auto",
    "quality": "low",
    "output_format": "jpeg"
  }
}'
```

Save the task ID and poll `GET /v1/tasks/{id}` with the same key. On success, download the file from `result.assets`.

## Token pricing

The default rate and price group 24 charge for actual usage at 60% of OpenAI standard pricing. Other groups use their account price card.

| Per million tokens | OpenAI (USD) | NewRouters (credits) |
|---|---:|---:|
| Text input | 5 | 300 |
| Cached text input | 1.25 | 75 |
| Image input | 8 | 480 |
| Cached image input | 2 | 120 |
| Image output | 30 | 1800 |

[Model page, sample output and playground](/model/openai/gpt-image-2.6-sunburst)

<!-- official-reference:start -->
[OpenAI · GPT Image 2.6 Sunburst](https://developers.openai.com/api/docs/models/gpt-image-2.6-sunburst) · [OpenAI Images API](https://developers.openai.com/api/docs/guides/image-generation)
<!-- official-reference:end -->

## Request examples in other languages

### JavaScript

```javascript
const apiBaseUrl = "https://newrouters.com";
const apiKey = process.env.API_KEY;
if (!apiKey) throw new Error("Set API_KEY in your server environment");

const response = await fetch(apiBaseUrl + "/v1/tasks", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer " + apiKey
  },
  body: JSON.stringify({
  "model": "gpt-image-2.6-sunburst",
  "input": {
    "prompt": "A blue ceramic cup on white with soft side lighting and a detailed glaze.",
    "size": "auto",
    "quality": "low",
    "output_format": "jpeg",
    "resolution": "2k"
  }
})
});

const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result);
```

### Python

```python
import json
import os
from urllib.request import Request, urlopen

api_base_url = "https://newrouters.com"
api_key = os.environ["API_KEY"]
body = json.loads("{\"model\":\"gpt-image-2.6-sunburst\",\"input\":{\"prompt\":\"A blue ceramic cup on white with soft side lighting and a detailed glaze.\",\"size\":\"auto\",\"quality\":\"low\",\"output_format\":\"jpeg\",\"resolution\":\"2k\"}}")

request = Request(
    api_base_url + "/v1/tasks",
    data=json.dumps(body).encode("utf-8"),
    headers={
    "Content-Type": "application/json",
    "Authorization": "Bearer " + api_key
    },
    method="POST",
)
with urlopen(request) as response:
    print(json.load(response))
```

## Response fields (illustrative values)

### HTTP 202

```json
{
  "id": "TASK_ID",
  "status": "pending",
  "model": "gpt-image-2.6-sunburst",
  "result": null,
  "error": null
}
```

### HTTP 200

```json
{
  "id": "TASK_ID",
  "status": "succeeded",
  "model": "gpt-image-2.6-sunburst",
  "result": {
    "assets": [
      "https://example.com/output.png"
    ]
  },
  "error": null
}
```


