DALL·E 3

This documentation is valid for the following list of our models:

  • dall-e-3

Model Overview

This model represents a significant leap forward in AI-driven image creation, capable of generating images from text inputs. This model processes prompts with enhanced neural network architectures, resulting in images that are not only relevant but also rich in detail and diversity. DALL·E 3's deep learning techniques analyze and understand complex descriptions, allowing for the generation of visuals across a wide range of styles and subjects.

You can also view a detailed comparison of this model on our main website.

Setup your API Key

If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.

API Schema

post
Authorizations
Body
modelundefined · enumRequiredPossible values:
promptstring · max: 4000Required

The text prompt describing the content, style, or composition of the image to be generated.

nnumber · enumOptional

The number of images to generate.

Default: 1Possible values:
qualitystring · enumOptional

The quality of the image that will be generated.

Default: standardPossible values:
sizestring · enumOptional

The size of the generated image.

Default: 1024x1024Possible values:
stylestring · enumOptional

The style of the generated images.

Default: vividPossible values:
response_formatstring · enumOptional

The format in which the generated images are returned.

Default: urlPossible values:
Responses
201Success
post
POST /v1/images/generations HTTP/1.1
Host: api.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/json
Accept: */*
Content-Length: 122

{
  "model": "dall-e-3",
  "prompt": "text",
  "n": 1,
  "quality": "standard",
  "size": "1024x1024",
  "style": "vivid",
  "response_format": "url"
}
201Success

No content

Quick Example

Let's generate an image using a simple prompt.

import requests


def main():
    response = requests.post(
        "https://api.aimlapi.com/v1/images/generations",
        headers={
            # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
            "Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
            "Content-Type": "application/json",
        },
        json={
            "prompt": "A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses.",
            "model": "dall-e-3",
            "quality": "hd"
        }
    )

    response.raise_for_status()
    data = response.json()

    print("Generation:", data)


if __name__ == "__main__":
    main()

Note that the model applies automatic prompt enhancement, and this behavior cannot be disabled. The enhanced prompt is also returned in the response (see the revised_prompt parameter in the response).

Response
Generation: {'created': 1748502329, 'data': [{'revised_prompt': 'Visualize a T-Rex dinosaur enjoying a leisurely day at a sunny beach. The T-Rex is comfortably lounging on a sunbed and wearing stylish shades, clearly enjoying the warm weather and peaceful setting. The ocean waves gently lap up against the shoreline in the background.', 'url': 'https://oaidalleapiprodscus.blob.core.windows.net/private/org-Eo1U9k4AbSJPoV7seW2PDq2d/user-oGBnQp1igcXKlzRsuv3QKfH3/img-4BSO0AAOQo7DPgFCzpzLOibU.png?st=2025-05-29T06%3A05%3A29Z&se=2025-05-29T08%3A05%3A29Z&sp=r&sv=2024-08-04&sr=b&rscd=inline&rsct=image/png&skoid=cc612491-d948-4d2e-9821-2683df3719f5&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-05-29T06%3A07%3A56Z&ske=2025-05-30T06%3A07%3A56Z&sks=b&skv=2024-08-04&sig=9J/kIJjZXlDp9feazuudjCHIeR5jrw%2BjrFwOXwPMrfc%3D'}]}
"A T-Rex relaxing on a beach, lying on a sun lounger and wearing sunglasses."

Last updated

Was this helpful?