Skip to main content
POST

Output format

For GIF, set frame_count and frame_duration_ms in extra_params:
  • frame_count defaults to 9. 768x768 supports 2–12 frames; other sizes support 2–16.
  • frame_duration_ms defaults to 200. Set 20–2000 ms in 10 ms increments.
PNG edits without aspect_ratio are billed initially by the first reference image. A higher output tier may cost more. Set resolution and a fixed ratio to lock the tier. After submission, poll the task. See pricing.

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.6-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

PNG and SVG only.

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:high

Quality tier.

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

PNG only.

Available options:
auto,
opaque,
transparent
extra_params
object
output_format
enum<string>
default:png
Available options:
png,
gif,
svg

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.