Request Body
The model to use for image generation (e.g.,
dall-e-3, dall-e-2, stable-diffusion-xl)A text description of the desired image. Maximum length varies by model.
The number of images to generate. Must be between 1 and 10.
The size of the generated images. Supported sizes:
256x256512x5121024x10241536x1024(landscape)1024x1536(portrait)2048x20484096x4096auto
The format of the generated images. Either
url or b64_json.The quality of the image. Either
standard or hd.The style of the generated images (DALL-E 3 only). Either
vivid or natural.Response
Unix timestamp of when the images were created.
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.