Skip to main content
POST
openai compat edits

Maven

Normal Request Example

Body

multipart/form-data
image
file[]
required

images

Minimum array length: 1
prompt
string
required

prompt

Minimum string length: 1
model
enum<string>
default:gpt-image-2
required

model

Available options:
gpt-image-2
quality
enum<string>
required

quality

Available options:
auto,
low,
medium,
high,
standard
background
enum<string>

background transparency

Available options:
transparent,
opaque,
auto
inputFidelity
enum<string>

Input image fidelity (newly added in gpt-image-2, only effective for editing scenes); Generate can be ignored)

Available options:
high,
low
mark
file

mark

moderation
enum<string>

Audit intensity

Available options:
auto,
low
n
integer<int32>

n

outputCompression
integer<int32>

JPEG/WebP compression level 0-100

outputFormat
enum<string>

Output file format

Available options:
png,
jpeg,
webp
responseFormat
enum<string>
default:b64_json

Response format (compatible with DALL · E; The gpt image series always returns b64_json)

Available options:
url,
b64_json
partialImages
integer<int64>

partialImages

size
enum<string>
default:1024x1024

image size, ① Single side ≤ 3840 px; ② Both width and height are multiples of 16;③ Long side : short side ≤ 3:1; ④ Total pixels ∈ [655,360, 8,294,400]. Requests that do not meet the constraints or are not supported by the channel for custom sizes will be rejected

Available options:
auto,
1024x1024,
1024x1536,
1536x1024,
2048x2048,
2048x1152,
3840x2160,
2160x3840
user
string

user

Response

200 - */*

OK

The response is of type object.