Image Given a prompt and/or input image, the model will generate a new image. Related guide: Image Generation Create images based on the prompt.
Request
Header Params
Authorization
string
optional
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
prompt
string
required
The text description of the desired image. Maximum length is 1000 characters.
model
string
optional
The model used for image generation.
n
integer
optional
The number of images to generate. Must be between 1 and 10.
quality
string
optional
The quality of the generated image. hd creates images with finer details and higher consistency. This parameter is only supported by dall-e-3.
response_format
string
optional
The format of the returned generated image. Must be one of url or b64_json.
style
string
optional
The style of the generated image. For dall-e-2, must be one of 256x256, 512x512, or 1024x1024. For dall-e-3, must be one of 1024x1024, 1792x1024, or 1024x1792.
user
string
optional
The style of the generated image. Must be one of vivid or natural. vivid makes the model lean towards generating hyper-realistic and dramatic images. natural makes the model generate more natural and less hyper-realistic images. This parameter is only supported by dall-e-3.
size
string
optional
The size of the generated image. Must be one of 256x256, 512x512, or 1024x1024.