Skip to main content
POST
Generate images

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

Model ID or configured alias.

Minimum string length: 1
prompt
string
required

Prompt for image generation.

Minimum string length: 1
size
string
Pattern: ^(auto|[1-9][0-9]*x[1-9][0-9]*)$
seed
output_format
enum<string>
Available options:
jpeg,
png
safety_tolerance
response_format
enum<string>
default:url

Output format.

Available options:
url,
b64_json
images
(string | object)[]
Required array length: 1 - 4 elements
Minimum string length: 1
n
integer
default:1

Response

200 - application/json

Successful response

created
integer
required
data
object[]
required
Minimum array length: 1
model
string
size
string
output_format
string
quality
string
background
string
usage
object