Skip to content
APIHiver

Best AI Image Generation APIs (2026): DALL-E 3 Is Gone

DALL-E 3 shut down in May 2026. Compare the best replacements: OpenAI GPT Image, Google Gemini, Flux, Stability AI and Ideogram, with current prices.

10 min readBy Rachana Sanghani
In this post

If you are searching for the DALL-E 3 API, here is the short version: it no longer exists. OpenAI shut down DALL-E 2 and DALL-E 3 on 12 May 2026. Code that still calls dall-e-3 now fails.

The good news is that image generation APIs have moved on, and there are several strong replacements. This guide compares the five worth evaluating today: OpenAI GPT Image, Google Gemini image models, Flux (Black Forest Labs), Stability AI and Ideogram, plus Replicate as a way to try many models with one key.

All prices and limits below come from each provider's own pages, checked on 15 October 2026. Where we could not confirm something, we say so. These prices change often, so confirm before you budget.

What changed in 2026#

  • DALL-E 2 and DALL-E 3: shut down on 12 May 2026.
  • gpt-image-1: shuts down on 23 October 2026. gpt-image-1.5: shuts down on 1 December 2026. OpenAI points both to gpt-image-2.5-sunburst or gpt-image-2.5-flare.
  • Responses changed too. OpenAI's image API now returns the picture as base64 data (b64_json), not a web link.
  • Google's Gemini image models are now a serious option, with clear per-image prices.

If you run image generation in a live app, also read our guide to choosing an image API for production, which covers shutdown risk, rate limits and fallbacks.

What matters when choosing an image generation API#

Prompt adherence: does the model do what you ask, especially with complex scenes?

Photorealism: how convincing do people, products and places look?

Text in images: logos, posters and labels are the hardest thing for image models. OpenAI itself says text rendering is "significantly improved" but can still struggle with precise placement.

Cost per image: varies with size and quality. Quality settings are usually the biggest cost lever.

Commercial rights and data location: what you may do with outputs, and where your data is processed.

Longevity: models get retired quickly now, as DALL-E 3 shows. Keep the model name in one setting so a shutdown is a one-line change.


OpenAI: GPT Image (the DALL-E 3 replacement)#

Best for: general-purpose images, following detailed prompts, apps already using the OpenAI API.

OpenAI's current image models are gpt-image-2 and the gpt-image-2.5 pair: gpt-image-2.5-sunburst for the most precise editing, and gpt-image-2.5-flare for fast, high-quality everyday generation. OpenAI's docs say the 2.5 models need API organization verification.

Two practical changes from the DALL-E days: the quality setting is now low, medium, high or auto (the 2.5 models add xhigh and max), and the image comes back as base64, so you decode it and save the file.

// npm install openai
import fs from "node:fs";
import OpenAI from "openai";
 
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
 
async function generateImage(prompt) {
  const result = await openai.images.generate({
    model: "gpt-image-2.5-flare", // keep this in one setting: models get retired
    prompt,
    size: "1024x1024",
    quality: "medium",
  });
 
  // The API returns base64 data, not a link.
  return Buffer.from(result.data[0].b64_json, "base64");
}
 
const png = await generateImage(
  "A photorealistic image of a red coffee mug on a wooden desk, morning light"
);
fs.writeFileSync("mug.png", png);
import base64
import os
from openai import OpenAI
 
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
 
def generate_image(prompt: str) -> bytes:
    result = client.images.generate(
        model="gpt-image-2.5-flare",  # keep in one setting
        prompt=prompt,
        size="1024x1024",
        quality="medium",
    )
    return base64.b64decode(result.data[0].b64_json)
 
with open("logo.png", "wb") as f:
    f.write(generate_image("Minimalist logo design, blue and white, geometric shapes"))

Pros

    Cons

      Pricing: per million image output tokens, OpenAI lists gpt-image-2 and the gpt-image-2.5 models at $30, and $15 in batch mode. The cheaper gpt-image-1-mini is $8 ($4 in batch). Per-image cost depends on size and quality, so test with OpenAI's calculator.


      Google: Gemini image models#

      Best for: predictable per-image pricing, batch jobs, teams already on Google Cloud.

      Google's Gemini API now includes several image models. Their official pricing page lists plain prices per image, which makes budgeting easy:

      ModelStandard price per imageBatch price per image
      Gemini 3.1 Flash Lite Image$0.0336 (1K)$0.0168 (1K)
      Gemini Nano Banana 2.1$0.0336 (1K), $0.0504 (2K), $0.113 (4K)about half
      Gemini 3.1 Flash Image$0.067 (1K), $0.101 (2K), $0.151 (4K)about half
      Gemini 3 Pro Image$0.134 (1K/2K), $0.24 (4K)$0.067 (1K/2K)

      Google has also been retiring older models. Its page said gemini-2.5-flash-image was due to shut down on 2 October 2026, so start new work on the 3.1 models.

      Pros

        Cons


          Flux (Black Forest Labs)#

          Best for: photorealistic images, regional data control (EU or US), cost-sensitive projects.

          Flux comes from Black Forest Labs, founded by several of the original Stable Diffusion researchers. Despite what older guides say, there is an official first-party API at api.bfl.ai. Its docs describe:

          • A model family including FLUX.2 ([klein], [pro], [max], [flex]) and FLUX.1 models such as Kontext and 1.1 [pro], plus a newer FLUX 3 image model.
          • Credits: 1 credit equals $0.01, and API and playground prices are the same. FLUX.2 models are priced by output size (megapixels), and FLUX 3 Image is priced per image by resolution tier. Third-party guides put smaller FLUX models at about a cent or two per image and premium ones at several cents, but check bfl.ai/pricing for live numbers.
          • Async jobs: you start a job and poll a polling_url until it is ready (or use webhooks).
          • Short-lived results: result links expire after 10 minutes, so download the image straight away and serve it from your own storage.
          • Limits: up to 24 concurrent requests on most endpoints.
          • Regions: a global endpoint plus EU (api.eu.bfl.ai) and US (api.us.bfl.ai) endpoints.

          You can also run Flux through platforms such as Replicate or fal.ai:

          // Using Replicate: npm install replicate
          import Replicate from "replicate";
           
          const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN });
           
          const output = await replicate.run("black-forest-labs/flux-schnell", {
            input: { prompt: "Aerial view of a mountain lake at sunrise, cinematic" },
          });
          // Save the result right away: links from model platforms can expire.

          Pros

            Cons


              Stability AI#

              Best for: custom styles, open-weight flexibility, the Stable Diffusion ecosystem.

              Stability AI makes the Stable Diffusion family, the most widely used open-weight image models. You can run models yourself, use community fine-tunes, and apply techniques such as ControlNet and LoRA that closed APIs do not offer. Their hosted API (platform.stability.ai) gives you the models without running a GPU:

              // Stability AI REST API (check platform.stability.ai for current endpoints)
              async function generateStableImage(prompt) {
                const form = new FormData();
                form.append("prompt", prompt);
                form.append("output_format", "webp");
               
                const res = await fetch("https://api.stability.ai/v2beta/stable-image/generate/core", {
                  method: "POST",
                  headers: { Authorization: `Bearer ${process.env.STABILITY_API_KEY}`, Accept: "image/*" },
                  body: form,
                });
               
                if (!res.ok) throw new Error(`Stability API error: ${res.status}`);
                return Buffer.from(await res.arrayBuffer()); // raw image bytes
              }

              Pros

                Cons

                  Pricing: credit-based, with one credit worth about $0.01. Price guides report the Core model at about 3 credits ($0.03) and Ultra at about 8 credits ($0.08) per image, and new accounts have been given 25 free credits. We could not confirm these on Stability's own page, so check platform.stability.ai before budgeting. (Older guides, including an earlier version of this one, understated Core as about $0.01.)


                  Ideogram#

                  Best for: images with text in them, such as logos, posters and product labels.

                  Ideogram was built around the hardest problem in image generation: readable text inside the picture. Its API uses an Api-Key header, and the current docs show a request path for ideogram-4-5 (/v2/image/generate/ideogram-4-5). See Ideogram's API docs for the exact request format.

                  Things worth knowing from Ideogram's own pages:

                  • No free API tier. Requests are rejected until you add a payment method and prepaid credits. Credits cost 1 cent each, and the number of credits each image uses is listed on their pricing tab.
                  • Default limit of 10 requests in flight, with more available by contacting them.
                  • Links expire, so download images you want to keep.

                  We did not compare text quality head to head. Since every model, including OpenAI's, can still struggle with text placement, test your own wording before choosing.


                  Replicate: try many models with one key#

                  Best for: experimenting across many models without separate accounts.

                  Replicate hosts many open-source models behind one API, including Flux and Stable Diffusion variants. One REPLICATE_API_TOKEN gives you access to all of them, and you pay for what you use. Prices differ by model and change, so check the page of the model you want. It is a good way to compare models before you commit to one provider.


                  Side-by-side comparison#

                  OpenAI GPT ImageGoogle Gemini imageFlux (BFL)Stability AIIdeogram
                  Best forDetailed prompts, editingClear pricing, batchPhotorealism, EU/US regionsCustom styles, open weightsText in images
                  Pricing stylePer token (by quality and size)Per imageCredits, per megapixel/tierCreditsPrepaid credits
                  Half-price batchYesYesNot confirmedNot confirmedNot confirmed
                  Free API tierNoNoNo25 starter credits reportedNo
                  Fine-tuningNoNoNot offered on the hosted APIYes (open weights)No
                  Image deliveryBase64 in the responseCheck docsLink that expires in 10 minutesRaw image bytesLink that expires
                  Documented limitBy account tierBy account tier24 concurrentBy account tier10 in flight

                  Which one should you pick?#

                  Replacing DALL-E 3 with minimal changes: OpenAI GPT Image. Switch the model to gpt-image-2.5-flare (or gpt-image-2), update the quality values, and read the base64 response. If you used dall-e-3, those three changes are most of the migration.

                  You want the easiest price forecasting: Google Gemini image models. Plain per-image prices and half-price batch mode.

                  You need photorealism or EU/US data control: Flux via the Black Forest Labs API. Remember to download results within 10 minutes.

                  You need custom styles or open weights: Stability AI, or open-weight models via Replicate.

                  You need text inside the image: try Ideogram, and test your exact wording against the others.

                  Not sure yet: Replicate. One key, many models, pay per use.

                  Whatever you pick, test 20 of your own prompts on two providers before deciding, and keep a second provider ready as a backup.

                  Try APIs on the APIHiver marketplace

                  Discover free and paid APIs for travel, finance, AI, weather, maps and more. Test each endpoint in your browser and use one key for all of them.

                  Share this post

                  Frequently asked questions

                  Is the DALL-E 3 API still available?
                  No. OpenAI's deprecation page lists dall-e-2 and dall-e-3 as shut down on 12 May 2026. OpenAI recommends its GPT Image models instead. If your code still calls dall-e-3, those requests now fail, so switch the model name and read the image from the new response format.
                  What replaced DALL-E 3?
                  OpenAI's GPT Image family. Its current models are gpt-image-2 and the gpt-image-2.5 pair (sunburst for precise editing, flare for fast everyday images). Older gpt-image-1 shuts down on 23 October 2026 and gpt-image-1.5 on 1 December 2026, so build on a current model.
                  Which AI image generation API has the best quality?
                  It depends on what you generate, and rankings change with every release. OpenAI's GPT Image models are a common default for following detailed prompts, FLUX is popular for photorealism, and Google's Gemini image models are a strong, clearly priced option. The reliable way to choose is to run 20 of your own prompts on two providers and compare.
                  How much does the OpenAI image generation API cost?
                  OpenAI now bills image output by tokens, not a flat price per image. Its pricing page lists gpt-image-2 and the gpt-image-2.5 models at $30 per million image output tokens, with half price in batch mode. What that means per image depends on the size and quality you ask for, so use OpenAI's calculator for your exact case.
                  Can I use AI-generated images commercially?
                  Usually yes, but the terms differ by provider and by model, and some models with open weights carry their own licence. Read the terms for the exact API and model you use. If you are a larger company, ask the provider for written confirmation about indemnity (who pays if someone sues over an output) and do not assume it is included.
                  Is there a free AI image generation API?
                  Not a production-grade one. Stability AI has said new accounts get 25 free credits, Ideogram requires a payment method and prepaid credits before API requests work, and OpenAI and Google bill per use. Expect to pay a few cents per image at most for a real workload.
                  What is the difference between DALL-E and Stable Diffusion?
                  DALL-E was OpenAI's closed, hosted image model, and it has been retired. Stable Diffusion is an open-weight family from Stability AI that you can run yourself, fine-tune, or use through their hosted API. If you want full control or custom styles, that open-weight route is the main difference; if you want the simplest hosted API, OpenAI's GPT Image is the closest replacement.
                  What is Flux and who makes it?
                  Flux is a family of image models from Black Forest Labs, a company founded by several of the original Stable Diffusion researchers. You can use it through Black Forest Labs' own API (api.bfl.ai, with EU and US endpoints) or through platforms such as Replicate and fal.ai.