Short answer
Switch the model name in your code from dall-e-2 or dall-e-3 to one of OpenAI's recommended replacements (gpt-image-2, gpt-image-1 or gpt-image-1-mini), then fix the two things that usually break, which are reading the image as base64 data instead of a link and dropping options the new models don't accept. Rerun a small set of your old prompts side by side before you switch everything over.
Follow-up question Do your old prompts still work?
DALL·E 2 and DALL·E 3 no longer answer API calls. OpenAI announced the change to developers on November 14, 2025, and removed both models on May 12, 2026. If an app, a script or an automation tool still asks for dall-e-2 or dall-e-3, it now gets an error instead of a picture.
The fix is a migration: moving your work to a model that is still supported. OpenAI's deprecations page names three replacements for both DALL·E models: gpt-image-2, gpt-image-1, and the smaller gpt-image-1-mini. These belong to OpenAI's GPT Image family. gpt-image-2 is the newest; it also powers ChatGPT Images 2.0, released in April. For most people the work takes an afternoon, as long as you test before you switch.
Step 1: find every place DALL·E is called
Search your code, no-code automations (such as Zapier or Make scenarios) and any plugins for the strings dall-e-2, dall-e-3 and dalle. Make a short list: where each call lives, what it produces (blog headers, product mock-ups, social images) and who depends on it. Also note any use of the variations endpoint, which makes alternative versions of an existing image. OpenAI's image guide ties it to DALL·E 2 rather than the GPT Image models, so that feature has to be replaced with an edit request or a new prompt.
Step 2: choose the replacement model
| Your situation | Reasonable first choice |
|---|---|
| Quality matters most: marketing images, detailed scenes, text inside the image | gpt-image-2 |
| You already tested gpt-image-1 and it works for you | gpt-image-1 |
| Many quick, low-stakes images such as drafts or thumbnails | gpt-image-1-mini |
Two practical notes from OpenAI's guide. First, your organization may need to complete Organization Verification in the developer console before GPT Image models will run. Do it before the day you need them. Second, gpt-image-2 does not currently support transparent backgrounds, so if your workflow made logos or stickers on a transparent background, test gpt-image-1 for those.
Step 3: update the code
Here is a typical DALL·E 3 call in Python and its replacement. The most common break is the last line: DALL·E calls often returned a web link to the image, while the GPT Image models in the Image API return the picture itself as base64, a way of writing binary data as plain text, which you decode and save.
# Before: no longer works after May 12, 2026
result = client.images.generate(model="dall-e-3", prompt=prompt, size="1024x1024", n=1)
image_url = result.data[0].url
# After
import base64
from openai import OpenAI
client = OpenAI()
result = client.images.generate(
model="gpt-image-2",
prompt=prompt,
size="1536x1024", # landscape; 1024x1024 and 1024x1536 also common
quality="medium", # low, medium, high or auto
)
with open("header.png", "wb") as f:
f.write(base64.b64decode(result.data[0].b64_json))
If your app stored image links in a database or passed them to another service, it now needs somewhere to put the file: your own storage, a content management system or a file bucket. Remove any parameter that is not in the current guide's list of output options (size, quality, format, compression and background), and the call should go through. The guide also notes that quality="low" is the fastest setting and suits drafts, and that complex prompts can take up to two minutes, so check any timeout in your code.
Try it: Pick five prompts your DALL·E workflow used most often. Run each one through gpt-image-2 at quality="low", put the old and new images side by side, and mark each pair "keep as is", "needs prompt change" or "needs a different model". That table is your migration plan.
Step 4: check costs and timing before switching everything
Run your side-by-side test on real prompts and note how long each image takes and what it costs on your account's usage page. Don't assume your old per-image budget still applies: larger sizes and higher quality settings take more work to produce, and edit requests with reference images add input to process. Pick the lowest size and quality that look good enough for each use, rather than one setting for all. Outputs above roughly 2560 by 1440 pixels are labeled experimental in OpenAI's guide, so avoid them in a production workflow for now.
Do your old prompts still work?
Mostly yes, and often better. The new models follow detailed instructions closely, so a prompt that described the scene in sentences usually transfers without changes. Three kinds of prompt need attention.
Keyword lists. Prompts written as a pile of tags work, but they leave the model guessing. Rewrite them as a short description of the scene. Here is an illustrative example:
Old: lighthouse, sunset, oil painting, dramatic, 4k, trending
New: An oil painting of a white lighthouse on a rocky point at sunset, warm orange light on the waves, wide landscape view, no text.Text inside the image. If your old workflow added headlines afterward in an editor, try putting them in the prompt instead: OpenAI reports gpt-image-2 renders small text and non-Latin scripts better, though it still lists precise text placement as a limitation. Put the exact words in quotation marks in your prompt and check every letter.
Recurring characters or brand elements. If your workflow relied on a mascot looking the same across images, test that first. OpenAI notes the models can still drift on recurring characters. Keep a reference image and use an edit request, which accepts one or more input images, instead of describing the character from scratch each time.
Sources
- Deprecations — OpenAI, May 19, 2026
- Image generation (API guide) — OpenAI, April 29, 2026
- OpenAI's ChatGPT Images 2.0 thinks before it generates, adding reasoning and web search to image creation — The Decoder, April 21, 2026