Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json

Request payload for GPT Image 2.5 Flare.

Request payload shared by GPT Image 2.5 Sunburst and Flare.

prompt
string
required

Image description, from 1 to 32,000 Unicode characters.

Required string length: 1 - 32000
Example:

"A cinematic mountain landscape at golden hour"

aspect_ratio
enum<string>
default:1:1

Output aspect ratio. Can be set independently of resolution; omitting it uses 1:1.

Available options:
1:1,
3:2,
2:3,
3:4,
4:3,
4:5,
5:4,
9:16,
16:9,
21:9
Example:

"16:9"

resolution
enum<string>
default:1K

Output resolution tier. Can be set independently of aspect_ratio; omitting it uses 1K. Pixel dimensions depend on both parameters: 1:1 + 1K gives 1024x1024, 1:1 + 4K gives 2880x2880, and 16:9 + 4K gives 3840x2160.

Available options:
1K,
2K,
4K
Example:

"4K"

quality
enum<string>
default:low

Output quality level. Defaults to low.

Available options:
low,
medium,
high,
xhigh,
max
Example:

"high"

background
enum<string>
default:auto

Background mode: auto lets the model choose, opaque requests an opaque background, and transparent requests a transparent background with PNG output.

Available options:
auto,
opaque,
transparent
Example:

"transparent"

Response

Task submitted successfully. Poll the URL in data.get_result.url using Query Task Result to retrieve the generated image.

Response object for asynchronous task submission.

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.