
The DALL-E 3 API lets you generate images programmatically — build image generation into any application.
response = client.images.generate(
model="dall-e-3",
prompt="A futuristic city at night with flying cars, cinematic lighting",
size="1792x1024", # 1024x1024, 1024x1792, or 1792x1024
quality="hd", # standard or hd
n=1 # DALL-E 3 only supports n=1
)
image_url = response.data[0].urlDALL-E 3 automatically rewrites your prompt for better results. Access it via response.data[0].revised_prompt to see what it actually generated.
Reference:
TaskLoco™ — The Sticky Note GOAT