gpt-image-2.5-sunburst Image API
Generate images with this model, or supply a reference image when the editing endpoint is available. Model capabilities and current platform limits are described separately.
Endpoint and Authentication
Base URL: https://nusi.si/v1. Generate images with POST /v1/images/generations. Send Authorization: Bearer YOUR_API_KEY and Content-Type: application/json.
Store your key in the server-side NUSI_API_KEY environment variable. Keep it out of public browser code and source repositories.
Generation Parameters
| Parameter | Meaning and Model Range |
|---|---|
model | gpt-image-2.5-sunburst; required |
prompt | Image description; required |
size | auto or WIDTHxHEIGHT; native default: auto |
quality | low / medium / high / xhigh / max / auto; native default: auto |
n | Number of images, integer 1–10; native default: 1 |
background | transparent / opaque / auto; native default: auto |
output_format | png / jpeg / webp; native default: png |
These ranges describe registered model capabilities. Requests are also checked against current sale dimensions, quality, quantity, routes and account access. Not every combination is necessarily available.
Size and Combination Limits
Width and height must be multiples of 16, with neither side exceeding 3840. Total pixels: 655360–8294400; aspect ratio: 1:3–3:1. Transparent backgrounds require png or webp output.
The example explicitly requests 1024x1024, high quality and one image. Native auto defaults are not a platform guarantee. Check current limits and prices in the model directory before calling; actual usage and billing determine the charge.
Request Example
curl --fail-with-body --max-time 300 https://nusi.si/v1/images/generations \
-H "Authorization: Bearer $NUSI_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{
"model": "gpt-image-2.5-sunburst",
"prompt": "A cat sitting by a window",
"size": "1024x1024",
"quality": "high",
"n": 1
}'Read the Result
Read the data array, decode each b64_json value and save the bytes. Do not assume the endpoint returns image URLs or send the unsupported response_format field. The example below shows the shape; the ellipsis is not valid image data.
{"data":[{"b64_json":"…"}]}Reference Images and Editing
The model declares POST /v1/images/edits, which must also be enabled by the current platform route. A model capability alone does not enable an endpoint. Upload image using multipart/form-data with model and prompt. Let the HTTP client set the multipart Content-Type boundary.
The registered reference-image limit is 16; the editing endpoint determines available counts and field shapes. Generation needs no reference image. Fields such as mask and input_fidelity are not confirmed in this model’s platform parameter contract.
Additional Native Options
The gateway preserves native options such as output_compression (JPEG/WebP compression), moderation and partial_images (intermediate streaming images). Preservation alone does not verify model behavior. These options are not listed as confirmed parameters or added to requests by default.
This model declares streaming, while the current image example and transport are non-streaming. Use the non-streaming example here.
Errors and Retries
For authentication errors, check the key and permissions. For unavailable models, check the model ID and availability. For parameter errors, check dimensions, combinations and platform limits. Check balance and billing when funds are insufficient. Retain the HTTP status, error body and request ID when supplied for support.
A timeout or dropped connection does not prove the request was not executed. Check usage and billing before retrying to avoid duplicate generation and charges.