Skip to main content
POST
Generate image

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required

Image model ID.

Example:

"gpt-image-2"

prompt
string
required

Text instruction for the image.

size
string

Requested output size. Support depends on the selected model.

Example:

"1024x1024"

n
enum<integer>
default:1

Number of images to generate. Only 1 is supported.

Available options:
1

Response

Generated image response

data
object[]
required
Required array length: 1 element
usage
object