Skip to main content
POST
Picture editing

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
images
object[]
required

Required. List of source images to be edited. The maximum number of GPT Image models is 16; each item must provide one of file_id or image_url. If uploading files directly, use the multipart field image[] (or images defined by your gateway).

Required array length: 1 - 16 elements
prompt
string
required

Required. Text description of how you wish to edit or expand the image.

Minimum string length: 1
model
enum<string>
required

Required. Mockup for picture editing. dall-e-3 does not support image editing.

Available options:
gpt-image-2.5-sunburst,
gpt-image-2.5-sunburst-2026-09-08,
gpt-image-2.5-flare,
gpt-image-2.5-flare-2026-09-08,
gpt-image-2,
gpt-image-2-2026-04-21,
gpt-image-1.5,
gpt-image-1,
gpt-image-1-mini,
chatgpt-image-latest,
dall-e-2
background
enum<string> | null

Output background, only supported by GPT Image model. When transparent, output_format must be png or webp.

Available options:
transparent,
opaque,
auto,
null
input_fidelity
enum<string> | null

The degree of consistency with the original input image, only supported GPT Image models apply.

Available options:
high,
low,
null
mask
object

Mask used for local redrawing. Choose one of file_id and image_url.

moderation
enum<string> | null

Content moderation level, only supported by the GPT Image model.

Available options:
low,
auto,
null
n
integer | null

The number of edited images to generate.

Required range: 1 <= x <= 10
output_compression
integer | null

Compression ratio (0–100) for jpeg or webp output, supported only by GPT Image model.

Required range: 0 <= x <= 100
output_format
enum<string> | null

Output image format, only supported by GPT Image model.

Available options:
png,
jpeg,
webp,
null
partial_images
integer | null

The number of intermediate graphs generated in the streaming response.

Required range: 0 <= x <= 3
quality
enum<string> | null

Output quality. GPT Image supports low/medium/high/auto; GPT Image 2.5 additionally supports xhigh/max.

Available options:
low,
medium,
high,
xhigh,
max,
auto,
null
size
enum<string> | null

Image size. GPT Image 2/2.5 supports WIDTHxHEIGHT: width and height are multiples of 16, ratio 1:3~3:1, up to 3840x2160; other GPT Images use auto, 1024x1024, 1536x1024 or 1024x1536; supported by dall-e-2 256x256, 512x512, 1024x1024; dall-e-3 supports 1024x1024, 1792x1024, 1024x1792.

Available options:
auto,
1024x1024,
1536x1024,
1024x1536,
null
stream
boolean | null

Whether to return intermediate and final results as an SSE event stream.

user
string

A unique identifier for the end user, used for abuse monitoring and detection.

response_format
enum<string>
default:b64_json

dall-e-2 is available as url or b64_json. GPT Image model fixedly returns Base64.

Available options:
b64_json,
url

Response

200 - application/json
created
integer
required

The Unix timestamp in seconds when the edit result was created.

data
object[]
required

Edited image list.

background
enum<string>

The actual output context used.

Available options:
transparent,
opaque
output_format
enum<string>

Actual output format.

Available options:
png,
webp,
jpeg
quality
enum<string>

Output quality for actual use.

Available options:
low,
medium,
high,
auto
size
string

The actual generated image size.

usage
object

The token usage of the GPT Image model.