Skip to main content
POST
Generate image with GPT Image 2.5 Sunburst

Authorizations

Authorization
string
header
required

API key as a bearer token: Authorization: Bearer bpx_live_xxx

Body

application/json
prompt
string
required

Text description of the image to generate.

aspect_ratio
enum<string>
default:1:1

Output aspect ratio.

Available options:
1:1,
4:3,
3:4,
5:4,
4:5,
16:9,
9:16,
3:2,
2:3,
21:9,
9:21,
2:1,
1:2
num_images
integer
default:1

Number of images to generate.

Required range: 1 <= x <= 4
output_format
enum<string>
default:png

Output image format.

Available options:
png,
jpeg
quality
enum<string>
default:high

Rendering quality. Per image at 1K: low 30, medium 40, high 80, xhigh 130, max 250 credits (scaled by resolution).

Available options:
low,
medium,
high,
xhigh,
max
reference_images
string[]

Optional reference images (up to 9) for image editing and composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. The first reference is free; each additional one adds 5 credits per generated image.

Maximum array length: 9
resolution
enum<string>
default:1K

Output resolution tier. 2K bills 2× and 4K 3× the 1K price of the chosen quality.

Available options:
1K,
2K,
4K

Response

Job accepted.

id
string

Opaque job id — use it to poll status.

Example:

"img_a1b2c3d4e5f6"

message
string
model
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

Available options:
pending,
starting,
processing,
completing,
succeeded,
failed,
timeout