Endpoint
Request
Headers
string
required
Must be
application/jsonstring
required
The AI provider to use (e.g.,
openai, stability-ai)string
required
Your API key for the specified provider
Body Parameters
string
required
A text description of the desired image(s). Maximum length varies by model.
string
The model to use for image generation (e.g.,
dall-e-3, dall-e-2)integer
default:1
Number of images to generate (1-10 for DALL-E 2, only 1 for DALL-E 3)
string
Size of the generated images
- DALL-E 3:
1024x1024,1024x1792,1792x1024 - DALL-E 2:
256x256,512x512,1024x1024
string
default:"standard"
Quality of the image:
standard or hd (DALL-E 3 only)string
default:"vivid"
Style of the generated images:
vivid or natural (DALL-E 3 only)string
default:"url"
Format of the response:
url or b64_jsonstring
Unique identifier for the end-user
Response
integer
Unix timestamp of when the image was created
array
Examples
Basic Image Generation
Response
Python SDK
JavaScript SDK
Generate Multiple Images (DALL-E 2)
Download and Save Image
Base64 Response Format
HD Quality with Natural Style
Landscape Orientation
Portrait Orientation
Prompt Engineering Tips
- Be Specific: Include details about subject, style, lighting, and composition
- Mention Style: Specify artistic styles (e.g., “oil painting”, “3D render”, “photograph”)
- Describe Details: Include colors, textures, and atmosphere
- Set the Scene: Describe the environment and context
Example Prompts
Rate Limits
Rate limits vary by provider and tier:- DALL-E 3: Typically 5-50 images per minute depending on tier
- DALL-E 2: Higher throughput, up to 50 images per minute