DALL-E 3¶
Overview¶
DALL·E 3 is OpenAI’s previous-generation text-to-image model. OpenAI’s own API guidance presents it as a step up from DALL·E 2 for prompt adherence and larger resolutions, while also noting that the GPT Image family is now the recommended path for new work. Within this portal it fits the role of a well-known legacy image generator that remains useful when you need a simple, familiar payload shape and predictable per-image pricing.
API base URL¶
Example payload¶
{
"model": "dall-e-3",
"prompt": "A cinematic sunset over mountains with detailed cloud lighting",
"size": "1024x1024",
"quality": "hd",
"style": "vivid",
"n": 1,
"response_format": "url"
}
Our Current Pricing¶
DALL·E 3 is also billed from a fixed request-time table, but quality matters in addition to size. The repo uses the following implemented map.
1024x1024: standard 0.04 USD, hd 0.08 USD
1024x1792: standard 0.08 USD, hd 0.12 USD
1792x1024: standard 0.08 USD, hd 0.12 USD
The formula in code is conceptually:
When the model is known but the size is missing or unsupported, the code falls back to the 1024x1024 row. When the model itself is not recognized, the defensive fallback is 0.04 USD.
The cost should be calculated from the request payload, not from the provider response. Persist size, quality, and n, resolve the correct row once, and store the result together with the generation identifier. That gives you deterministic billing even if the provider response has no usage object.