Skip to main content
POST
gpt-image-2

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
required
Available options:
gpt-image-2
prompt
string

Length must be between 1 and 32000.

Required string length: 1 - 32000
images
string<url>[]

Up to 10 reference images.

Required array length: 1 - 10 elements
quality
enum<string>
default:medium

Must be one of: high, low, medium. Defaults to medium.

Available options:
high,
low,
medium
size
enum<string>
default:auto

Must be one of: 1024x1024, 1024x1536, 1536x1024, 2048x1152, 2048x2048, 2160x3840, 3840x2160, auto. Defaults to auto.

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

Response

Task accepted and queued for generation.

code
integer
Example:

0

data
object
msg
string
Example:

"success"

request_id
string<uuid>
Example:

"250b66dd-e1fb-4bb6-b5f6-c668efadc35d"