Request Body
string
required
The model to use for image generation (e.g.,
dall-e-3, dall-e-2, stable-diffusion-xl)string
required
A text description of the desired image. Maximum length varies by model.
integer
default:"1"
The number of images to generate. Must be between 1 and 10.
string
default:"1024x1024"
The size of the generated images. Supported sizes:
256x256512x5121024x10241536x1024(landscape)1024x1536(portrait)2048x20484096x4096auto
string
default:"url"
The format of the generated images. Either
url or b64_json.string
default:"standard"
The quality of the image. Either
standard or hd.string
default:"vivid"
The style of the generated images (DALL-E 3 only). Either
vivid or natural.Response
integer
Unix timestamp of when the images were created.
array
Array of generated images.
Examples
Basic Image Generation
HD Quality with Natural Style
Base64 Response
Response Example
Tips for Better Results
Be specific and detailed
Be specific and detailed
More descriptive prompts typically produce better results. Include details about style, lighting, composition, and mood.
Specify art style
Specify art style
Include art style references like “oil painting”, “digital art”, “photograph”, “watercolor”, etc.
Use quality modifiers
Use quality modifiers
Add terms like “high quality”, “4k”, “detailed”, “professional” to improve output quality.
Consider aspect ratio
Consider aspect ratio
Use landscape (
1536x1024) for wide scenes and portrait (1024x1536) for tall subjects.