Skip to main content
POST
Generate Images
Create original images using AI models like DALL-E.

Generate Images

POST /images/generations Generate images from text descriptions.

Request Body

string
required
A text description of the desired image(s)
string
The model to use for image generation (e.g., “dall-e-3”, “dall-e-2”)
integer
Number of images to generate (1-10 for dall-e-2, 1 for dall-e-3)
string
Size of the generated images (“256x256”, “512x512”, “1024x1024”, “1792x1024”, “1024x1792”)
string
Quality of the image (“standard” or “hd”)
string
Style of the generated images (“vivid” or “natural”)
string
Format of the generated images (“url” or “b64_json”)

Response

Returns an array of image objects with URLs or base64-encoded images.

Example

Authorizations

Authorization
string
header
required

Enter your API key (starts with 'ek-')

Body

application/json
model
string
required
Example:

"dall-e-3"

prompt
string
required

Text description of the desired image

n
integer
default:1

Number of images to generate

Required range: 1 <= x <= 10
quality
enum<string>
default:standard
Available options:
standard,
hd
size
enum<string>
default:1024x1024
Available options:
256x256,
512x512,
1024x1024,
1792x1024,
1024x1792
response_format
enum<string>
default:url
Available options:
url,
b64_json
public
boolean
default:false

Whether to make the image publicly accessible

Response

200 - application/json

Success

created
integer
required
data
object[]
required