Free audit
Best of

Image generation APIs

An image generation API takes a prompt, often with a reference image, and returns a picture. Most bill per image or per megapixel, so size, quality setting and model set the price, from under a cent to about 60 cents for a 4K image. OpenAI, Google, Black Forest Labs, Stability AI and Recraft sell their own models. fal, Replicate, Together and DeepInfra host many labs' models behind one key, sometimes the same model at a different price, so compare both. Then run your own prompts: text in images, edits and style control differ between models far more than price does. 9 tools, in the order they appear in the directory. This is not a ranking.

Grouped by job: AI Agent Infrastructure

Together AI

Frameworks & Dev Tools

Serverless API for open models such as gpt-oss, GLM and Kimi, OpenAI-compatible and billed per token, with batch, provisioned throughput, dedicated endpoints, fine-tuning and GPU clusters when you outgrow shared capacity. Image generation models too, such as FLUX.2, GPT Image 2 and Nano Banana Pro, priced per image.

inference-apiopen-modelsapi

DeepInfra

Frameworks & Dev Tools

OpenAI-compatible API for open models such as Llama, DeepSeek and Qwen, billed per token with Standard, Priority and Flex tiers. Also open text-to-speech models such as Kokoro, billed per character, open embedding models such as Qwen3-Embedding and bge-m3, FLUX image generation models billed per image, and dedicated GPUs for your own LLMs billed by the minute.

inference-apiopen-modelsapi

OpenAI Image Generation

Frameworks & Dev Tools

OpenAI's image generation API: gpt-image-2, the gpt-image-2.5 Sunburst and Flare models, gpt-image-1.5 and gpt-image-1-mini make and edit images from a prompt and reference images, through the Image API or as a tool in the Responses API. Billed per token on your OpenAI key, with batch at half price.

image-generationapi

Gemini Image (Nano Banana)

Frameworks & Dev Tools

Google's image generation models on the Gemini API: Nano Banana 2 (Gemini 3.1 Flash Image), Nano Banana 2 Lite and Nano Banana Pro (Gemini 3 Pro Image) generate and edit images, with Nano Banana 2 and Pro going up to 4K. Billed per output token, batch at half price. No free tier for the image models.

image-generationapi

Black Forest Labs FLUX API

Frameworks & Dev Tools

Black Forest Labs' own API for its FLUX image generation and editing models: FLUX 3 Image and Klein, FLUX.2 [pro], [max], [flex] and [klein], and FLUX.1 Kontext for edits. Priced per image or per megapixel, the same in the API and the Playground. Some FLUX weights are open, under non-commercial or self-hosting licenses.

image-generationapi

Stability AI API

Frameworks & Dev Tools

Stability AI's developer platform for image generation and editing: Stable Image Ultra and Core, Stable Diffusion 3.5 and SDXL, plus edit and upscale tools, billed in credits at $0.01 each with 25 free credits to start. Stable Diffusion 3.5 weights are free under the Community License for businesses under $1M in annual revenue.

image-generationapi

Recraft API

Frameworks & Dev Tools

Recraft's image generation API for raster and vector images: V4.1, Pro, Flash and Vector models plus V4 styles, with raster edits, vectorization and background removal on the same API. Priced per image from prepaid API units that don't expire.

image-generationapi

fal

Frameworks & Dev Tools

Hosted image generation models from many labs behind one API, including FLUX, Nano Banana, Seedream and Z Image, billed per image or per megapixel from prepaid credits, with no charge for server errors or queue time. Serverless GPUs for your own models too.

image-generationapi

Replicate

Frameworks & Dev Tools

Run image generation and other models from one API: public models such as FLUX, Ideogram and Recraft are billed per output image or by the second of hardware time, and you can deploy your own models with the open-source Cog.

image-generationapi
At a glance

What it is, which models, what an image costs.

Straight from each vendor's own pages. Plans move often, so the check date is below.

ToolWhat it isModelsPrice per imageOpen weights
Together AIImage models on the same Together key as its LLMs.FLUX.2 [pro], [dev], [flex] and [max], FLUX.1 Kontext, GPT Image 2, Nano Banana Pro, Ideogram, Qwen Image, Seedream and more.FLUX.2 [dev] $0.0154, FLUX.2 [pro] $0.03, GPT Image 2 $0.053, Nano Banana Pro $0.134, at the lowest resolution.Some of the models. Together is not.
DeepInfraFLUX models on DeepInfra's API, priced per image.FLUX-2-dev, FLUX-2-pro, FLUX-2-max, FLUX-2-klein 9B and 4B, FLUX-1-dev, FLUX-1-schnell, FLUX-1.1-pro.At 1024×1024: FLUX-2-dev $0.01, FLUX-2-klein-4b $0.014, FLUX-1.1-pro $0.04, FLUX-2-max $0.07. The open models scale with size and steps.Some of the models. DeepInfra is not.
OpenAI Image GenerationOpenAI's image models, through the Image API or as a tool in the Responses API, on your OpenAI key.gpt-image-2, gpt-image-2.5-sunburst, gpt-image-2.5-flare, gpt-image-1.5, gpt-image-1-mini.gpt-image-2 at 1024×1024: low $0.006, medium $0.053, high $0.211. gpt-image-1-mini low $0.005. Billed per token, $30 per 1M image output tokens on gpt-image-2 and 2.5. Batch half price.No.
Gemini Image (Nano Banana)Google's Nano Banana image models on the Gemini API. Imagen is shut down there.Nano Banana 2 (Gemini 3.1 Flash Image), Nano Banana 2 Lite, gemini-nano-banana-2.1, Nano Banana Pro (Gemini 3 Pro Image), and Gemini 2.5 Flash Image until March 15, 2027.Nano Banana 2 about $0.067 at 1K, $0.151 at 4K. Pro $0.134 at 1K or 2K, $0.24 at 4K. Lite and 2.1 about $0.034 at 1K. 2.5 Flash Image $0.039. Batch half price. No free tier.No.
Black Forest Labs FLUX APIBlack Forest Labs' own API for FLUX, at the same prices as its Playground.FLUX 3 Image and Klein, FLUX.2 [pro], [max], [flex] and [klein] 9B and 4B, FLUX.1 Kontext [pro] and [max], FLUX1.1 [pro] and Ultra.FLUX 3 Image $0.048 at 1K, $0.607 at 4K. FLUX 3 Klein $0.009 at 1K. FLUX.2 [pro] $0.03 for the first megapixel, $0.015 for each one after. Kontext [pro] $0.04.Some. FLUX.2 [dev] is non-commercial; Klein is licensed through self-hosting plans.
Stability AI APIStability AI's developer platform: generate, edit and upscale, billed in credits.Stable Image Ultra, Stable Image Core, Stable Diffusion 3.5 Large, Large Turbo, Medium and Flash, SDXL.Credits at $0.01: Ultra 8, SD3.5 Large 6.5, Core 3, SD3.5 Flash 2.5, SDXL from 0.9. 25 free credits to start.Yes, the SD 3.5 suite and SDXL Turbo, free under the Community License below $1M annual revenue.
Recraft APIRaster and vector image generation, with edits, vectorizing and background removal on the same API.V4.1, V4.1 Pro, V4.1 Flash, V4.1 Vector, V4.1 Pro Vector, V4 Styles.V4.1 $0.035, Pro $0.21, Flash $0.007, Vector $0.08. Raster edits $0.04, vectorizing and background removal $0.01. Prepaid units don't expire.No.
falHosted image models from many labs behind one API, plus serverless GPUs for your own.FLUX 3 Image, FLUX 2 and FLUX 2 Flash, FLUX.1, Nano Banana, Nano Banana 2 and Pro, Seedream 4.5, Z Image Turbo and more.Nano Banana 2 $0.08, Seedream 4.5 $0.04. FLUX 3 Image $0.048 and FLUX 2 Flash $0.005 per megapixel. No charge for server errors or queue time.Some of the models. fal is not.
ReplicateRun public models from one API, or deploy your own with Cog.FLUX1.1 [pro], FLUX [dev] and [schnell], Ideogram v3, Recraft V3, and thousands of community models.FLUX1.1 [pro] $0.04, FLUX [dev] $0.025, FLUX [schnell] $3 per 1,000, Ideogram v3 Quality $0.09, Recraft V3 $0.04. Other models by the second of GPU time.Some of the models. Replicate is not.

Checked 2026-11-02. Sources: OpenAI pricing, OpenAI image generation guide, Gemini API pricing, Gemini image generation docs, Black Forest Labs pricing, Stability AI pricing, Stability AI license, Recraft API pricing, fal pricing, Replicate pricing, Together AI pricing, DeepInfra pricing.

Which one

Pick it if.

  • OpenAI Image GenerationYou already call OpenAI and want generation and edits on the same key, from $0.006 an image at low quality.
  • Gemini Image (Nano Banana)You build on Google, or want to edit images in a conversation with Nano Banana, up to 4K.
  • Black Forest Labs FLUX APIYou want FLUX from the lab that makes it, with the newest models first and the same price as the Playground.
  • Stability AI APIYou may later run the model yourself, and the Community License covers a business your size.
  • Recraft APIYou need vector output such as icons and logos, or background removal and vectorizing on the same API.
  • falYou want to switch between many labs' models on one bill, and pay nothing for failed requests.
  • ReplicateYou want public models and your own Cog-packaged models on one API.
  • Together AIYou run open LLMs on Together already and want images on the same bill.
  • DeepInfraPrice per image matters most and FLUX is enough.
The Daily AI Brief

The 2 biggest AI stories, every morning.

One short email: the two stories that matter, and why.

You're in.

The Daily AI Brief will land in your inbox soon. If you don't see it, check Promotions or Spam and move it to your main inbox.

Free. We only use your email to send the brief. Privacy policy

Newsletter

Weekly AI tools and jobs, free.

New AI and developer tools worth a look, plus hand-picked openings from Digidle Jobs. One email a week. No spam.

Free audit · 4 quick steps

What do you need most?

Step 1 of 4 · Your business

What kind of business is it?

Score my website first

Free audit

Let's look at your business.

Six quick questions. We review your Google profile, reviews, website and reply speed, then send you the audit by email.

Your audit arrives within 24 hours. Privacy policy