Skip to main content
Creates an image given a text prompt. Supports multiple image generation models including DALL-E, Stable Diffusion, and others.

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:
  • 256x256
  • 512x512
  • 1024x1024
  • 1536x1024 (landscape)
  • 1024x1536 (portrait)
  • 2048x2048
  • 4096x4096
  • auto
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

More descriptive prompts typically produce better results. Include details about style, lighting, composition, and mood.
Include art style references like “oil painting”, “digital art”, “photograph”, “watercolor”, etc.
Add terms like “high quality”, “4k”, “detailed”, “professional” to improve output quality.
Use landscape (1536x1024) for wide scenes and portrait (1024x1536) for tall subjects.