Skip to main content
POST

Authorizations

Authorization
string
header
required

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

Body

application/json

Request payload for standard GPT Image Edit models.

Request payload for standard GPT Image Edit models.

prompt
string
required

Description of the desired edits, supports up to 32,000 characters

Required string length: 1 - 32000
Example:

"Add a watercolor effect to this image"

images
string[]
required

Input image URL(s) to edit. Direct HTTPS URLs as string array. Supports up to 16 images for GPT Image models

Required array length: 1 - 16 elements

Direct image URL (https only)

Example:
size
enum<string>
default:1024x1024

Output image size. Preset resolutions only

Available options:
1024x1024,
1536x1024,
1024x1536
Example:

"1024x1024"

quality
enum<string>
default:low

Output quality level. 'low': fast draft (default), 'medium': balanced, 'high': best quality

Available options:
low,
medium,
high
Example:

"high"

background
enum<string>
default:auto

Background transparency. 'transparent': transparent background (requires png or webp format), 'opaque': solid background, 'auto': model decides

Available options:
transparent,
opaque,
auto
Example:

"transparent"

input_fidelity
enum<string>

Control fidelity to original input image. 'high': preserve original details, 'low': more creative freedom

Available options:
high,
low
Example:

"high"

mask
string

Optional mask URL. Must be PNG with alpha channel; dimensions must match the input image exactly. Transparent areas are edited, opaque areas locked, semi-transparent areas blend with the original.

Example:

"https://example.com/mask.png"

Response

Task submitted successfully

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.