Skip to main content
POST
Generate image

Authorizations

Authorization
string
header
required

Bearer authentication using API key

Body

application/json

Request payload

Request format for image generation models

images
string[]
required

Array of input images, which can be data URL or image URL

Required array length: 1 - 16 elements
model
enum<string>
required

Model name to use for the request

Available options:
openai/gpt-image-2-edit
prompt
string
required

Text prompt for generation

size
enum<string>
required

Output size. Choose a preset, or set to "custom" to specify an arbitrary size; the width and height fields only take effect when size is "custom".

Available options:
1024x1024,
512x512,
768x1024,
576x1024,
1024x768,
1024x576,
auto,
custom
height
integer

Height of the output. Only takes effect when size is "custom".

mask
string

Mask image for inpainting, it can be data URL or image URL

moderation
enum<string>

Content moderation strategy

Available options:
auto,
low
n
integer
default:1

Number of outputs to generate

Required range: 1 <= x <= 10
output_format
enum<string>

Output format for the 3D model

Available options:
jpg,
png
quality
enum<string>

Quality option

Available options:
low,
medium,
high
width
integer

Width of the output. Only takes effect when size is "custom".

Response

200 - application/json

Successful response

Standard async task creation response

code
string
required

Status code returned by the service

Example:

"success"

data
object
required

Response payload containing task details

message
string
required

Additional information about the request result