GPT Image 2.5 Sunburst
openai/gpt-image-2.5-sunburstGenerate or edit images with text and optional reference images.
- token
- Price: $5.00Price: $1.25Price: $8.00Price: $2.00Price: $0Price: $30.00
- OpenAI
- 11 min
Overview
Generate images, or provide images for editing and composition. All qualities use native token billing, with separate text, image and cached input rates. Poll the run until COMPLETED; acceptance alone does not indicate completion. Streaming previews and the Responses API are not exposed by this run endpoint. The complete request is limited to 32 MiB and the aggregate encoded result to 27 MiB, including base64 and JSON overhead. Large batches or PNG outputs can exceed the result limit; prefer fewer images or JPEG/WebP compression. If an accepted task exceeds the result limit, its ID is retained for manual recovery, with no automatic resubmission or restart polling.
Decode run.output.data[].b64_json after COMPLETED. Usage reports text/image input, cached input and image output token counts.
Input
These go in the input object of the run request.
| Field | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Describe the image or the requested edit. Maximum: 32000 |
| images | array | No | For editing, 1–16 objects containing image_url (HTTP(S) or image data URL) or b64. Each remote image is at most 50 MiB; inline images and masks together must fit the 32 MiB complete request limit. |
| mask | object | No | Optional editing mask with image_url or b64. Must be PNG with alpha and match the first input image dimensions. |
| n | integer | No | Number of output images. Default: 1Minimum: 1 Maximum: 10 |
| size | string | No | auto or WIDTHxHEIGHT; sides multiples of 16, longest at most 3840, ratio at most 3:1 and 655360–8294400 pixels. Sizes above 2560x1440 are experimental. Default: "auto" |
| quality | string | No | Rendering quality; higher settings can consume more output tokens. Allowed: low, medium, high, xhigh, max, auto Default: "auto" |
| output_format | string | No | Generated image encoding. Allowed: png, jpeg, webp Default: "png" |
| output_compression | integer | No | JPEG/WebP compression only. Minimum: 0 Maximum: 100 |
| moderation | string | No | Content moderation setting. Allowed: auto, low Default: "auto" |
| background | string | No | Editing background; transparent is unsupported. Allowed: auto, opaque |
| input_fidelity | string | No | Editing fidelity is fixed at high. Allowed: high |
| response_format | string | No | Only base64 output is supported. Allowed: b64_json |
Requests up to 34 MB.
Example
Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.
# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
-H "authorization: Bearer $AGENTSKY_API_KEY" \
-H "content-type: application/json" \
-H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
-d '{"provider":"openai","endpoint":"gpt-image-2.5-sunburst","input":{"prompt":"A blue ceramic bowl on a white table","size":"1024x1024","quality":"low","output_format":"jpeg"}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.Pricing
Prices per million tokens, using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.
| Meter | USD per million tokens |
|---|---|
| Text input | Price: $5.00 |
| Cached text input | Price: $1.25 |
| Image input | Price: $8.00 |
| Cached image input | Price: $2.00 |
| Text output | Price: $0 |
| Image output | Price: $30.00 |
