Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer YOUR_API_KEY. Manage keys in API Keys.

Body

application/json
model
string
required
Allowed value: "gpt-image-2.5-flare"
prompt
string
required

Image generation or edit prompt.

Required string length: 1 - 32000
images
object[]

Reference images. Omit or pass an empty array for text-to-image.

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

Output resolution tier.

Available options:
1K,
2K,
4K
aspect_ratio
enum<string>

For PNG edits, omit to match the first reference.

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

Output count.

Required range: 1 <= x <= 4
quality
enum<string>
default:medium

Quality tier.

Available options:
low,
medium,
high,
xhigh,
max
background
enum<string>

Background preference.

Available options:
auto,
opaque,
transparent
extra_params
object

Response

Task accepted.

task_id
string
required

Task ID to poll.

model
string
required

Echoes the supplied model ID.

created_at
string<date-time>
required

Task creation time (UTC).

request_id
string
required

Request ID.