Skip to content

About

The most comprehensive directory of free & affordable AI image generation APIs

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

🎨 AI Image Generation API Directory

Version Providers Free

The most comprehensive directory of free & affordable AI image generation APIs

Table of Contents

💡 Why This Exists

Finding free or affordable AI image generation APIs shouldn’t be hard. Most lists are out of date within weeks and never tell you whether an endpoint is actually working.

This directory is auto-scanned – a CI job hits every endpoint on a schedule, records response times, and updates this README so you always know which APIs are live right now.

🚀 Quick Start (Python)

Most providers expose an OpenAI-compatible /v1/images/generations endpoint, so you can use the official OpenAI SDK with a custom base_url.

from openai import OpenAI

# Example: HuggingFace Inference API (free, token recommended)
client = OpenAI(
    base_url="https://api-inference.huggingface.co/v1/",
    api_key="hf_YOUR_TOKEN",  # or set HUGGINGFACE_API_KEY env var
)

response = client.images.generate(
    model="black-forest-labs/FLUX.1-schnell",
    prompt="A futuristic cityscape at sunset, cyberpunk style",
    size="1024x1024",
    n=1,
)

image_url = response.data[0].url
print("Generated:", image_url)

📡 Quick Start (cURL)

# Pollinations – completely free, no key needed
curl -s 'https://image.pollinations.ai/prompt/A%20red%20panda%20wearing%20a%20top%20hat' -o panda.jpg

# HuggingFace Inference API
curl -X POST "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell" \
  -H "Authorization: Bearer $HUGGINGFACE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs": "A magical forest with glowing mushrooms"}' \
  -o forest.png

🗂️ Provider Overview

Provider Tier Free Limits
HuggingFace Inference Tier 1 – Truly Free ~300 req/hr
Cloudflare Workers AI Tier 1 – Truly Free 10K images/day
Pollinations.ai Tier 1 – Truly Free Unlimited (best-effort)
Google Gemini (Imagen) Tier 1 – Truly Free 50 images/day (free tier)
Together AI Tier 1 – Truly Free $5 free credits
Clipdrop / Stability Tier 1 – Truly Free Limited free tier
Prodia Tier 1 – Truly Free 100 free/day
Dezgo Tier 1 – Truly Free Free tier available
StarryAI API Tier 1 – Truly Free 5 images/day
Craiyon Tier 1 – Truly Free Free (slow, watermarked)
Segmind Tier 1 – Truly Free 100 free credits
AirBrush API Tier 1 – Truly Free 50 free credits
Leonardo.ai Tier 2 – Generous Free Tier 150 tokens/day (~30 images)
Ideogram Tier 2 – Generous Free Tier 10 images/day (free plan)
Limewire Tier 2 – Generous Free Tier 10 credits/day
RunPod Serverless Tier 2 – Generous Free Tier $0.50 free credits
OpenAI (DALL-E) Tier 3 – Free Credits on Signup $5 credits
Stability AI Tier 3 – Free Credits on Signup 25 free credits
Fireworks AI Tier 3 – Free Credits on Signup $1 free credits
Replicate Tier 3 – Free Credits on Signup Free tier
DeepInfra Tier 3 – Free Credits on Signup $5 free credits
Novita AI Tier 3 – Free Credits on Signup Free credits
fal.ai Tier 3 – Free Credits on Signup $10 free credits
BFL (Black Forest Labs) Tier 3 – Free Credits on Signup Free beta
SiliconFlow Tier 3 – Free Credits on Signup Free credits
Hyperbolic Tier 3 – Free Credits on Signup $10 free credits
Midjourney Tier 4 – Freemium $10/mo basic plan
Adobe Firefly Tier 4 – Freemium 25 credits/mo free
NightCafe Tier 4 – Freemium 5 free credits/day
Getimg.ai Tier 5 – Pay-per-Use —
Monster API Tier 5 – Pay-per-Use —
Dreamstudio Tier 5 – Pay-per-Use —
OpenRouter Routers / Aggregators —
Eden AI Routers / Aggregators —
AI/ML API Routers / Aggregators —
Automatic1111 (WebUI) Local / Self-Hosted Unlimited
ComfyUI Local / Self-Hosted Unlimited
Fooocus Local / Self-Hosted Unlimited
SD.Next Local / Self-Hosted Unlimited
InvokeAI Local / Self-Hosted Unlimited
Stable Diffusion.cpp Local / Self-Hosted Unlimited

🎯 Tier 1 – Truly Free

Provider Endpoint Free Limits Models Capabilities
HuggingFace Inference https://router.huggingface.co/v1/images/generations ~300 req/hr FLUX.1-dev, SDXL, SD 3.5 txt2img, img2img
Cloudflare Workers AI https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/@cf/stabilityai/stable-diffusion-xl-base-1.0 10K images/day SDXL Lightning, Dreamshaper txt2img
Pollinations.ai https://image.pollinations.ai/prompt/{prompt} Unlimited (best-effort) FLUX, SDXL txt2img
Google Gemini (Imagen) https://generativelanguage.googleapis.com/v1beta/models/imagen-3.0-generate-002:predict 50 images/day (free tier) Imagen 3 txt2img
Together AI https://api.together.xyz/v1/images/generations $5 free credits FLUX.1-schnell-Free, SDXL, SD 3.5 txt2img
Clipdrop / Stability https://clipdrop-api.co/text-to-image/v1 Limited free tier Stable Diffusion txt2img, img2img, upscale
Prodia https://api.prodia.com/v1/sd/generate 100 free/day SD 1.5, SDXL, FLUX txt2img, img2img
Dezgo https://api.dezgo.com/text2image Free tier available SDXL, SD 3 txt2img, img2img, inpaint, upscale
StarryAI API https://api.starryai.com/creations/ 5 images/day StarryAI txt2img
Craiyon https://api.craiyon.com/v3 Free (slow, watermarked) Craiyon v3 txt2img
Segmind https://api.segmind.com/v1/sdxl1.0-txt2img 100 free credits SDXL, FLUX, Realistic Vision txt2img, img2img
AirBrush API https://api.airbrush.ai/v1/text-to-image 50 free credits Stable Diffusion, SDXL txt2img, img2img

🎯 Tier 2 – Generous Free Tier

Provider Endpoint Free Limits Models Capabilities
Leonardo.ai https://cloud.leonardo.ai/api/rest/v1/generations 150 tokens/day (~30 images) Phoenix, Kino XL txt2img, img2img, upscale
Ideogram https://api.ideogram.ai/generate 10 images/day (free plan) Ideogram 2.0 txt2img
Limewire https://api.limewire.com/api/image/generation 10 credits/day FLUX Pro, DALL-E 3 txt2img
RunPod Serverless https://api.runpod.ai/v2/{endpoint_id}/runsync $0.50 free credits — txt2img, img2img

🎯 Tier 3 – Free Credits on Signup

Provider Endpoint Free Limits Models Capabilities
OpenAI (DALL-E) https://api.openai.com/v1/images/generations $5 credits DALL-E 3, DALL-E 2, GPT-Image txt2img, img2img, inpaint
Stability AI https://api.stability.ai/v2beta/stable-image/generate/core 25 free credits Stable Diffusion 3.5, SDXL, Ultra txt2img, img2img, inpaint, upscale
Fireworks AI https://api.fireworks.ai/inference/v1/images/generations $1 free credits FLUX, Playground v3 txt2img
Replicate https://api.replicate.com/v1/predictions Free tier FLUX, SDXL txt2img, img2img, inpaint, upscale
DeepInfra https://api.deepinfra.com/v1/openai/images/generations $5 free credits FLUX.1, SDXL Turbo txt2img
Novita AI https://api.novita.ai/v3/async/txt2img Free credits SDXL, SD 1.5, FLUX txt2img, img2img, inpaint, upscale
fal.ai https://fal.run/fal-ai/flux/dev $10 free credits FLUX, SDXL, ControlNet txt2img, img2img, inpaint, upscale
BFL (Black Forest Labs) https://api.bfl.ml/v1/flux-pro-1.1 Free beta FLUX Pro, FLUX.1 txt2img
SiliconFlow https://api.siliconflow.cn/v1/images/generations Free credits FLUX, Kolors, SDXL txt2img
Hyperbolic https://api.hyperbolic.xyz/v1/image/generation $10 free credits SDXL, FLUX txt2img

🎯 Tier 4 – Freemium

Provider Endpoint Free Limits Models Capabilities
Midjourney (Discord-based) $10/mo basic plan Midjourney v6.1 txt2img, img2img, upscale
Adobe Firefly https://firefly-api.adobe.io/v3/images/generate 25 credits/mo free Firefly 3 txt2img, img2img, inpaint
NightCafe https://api.nightcafe.studio/creations 5 free credits/day SDXL, DALL-E 3, Stable Diffusion txt2img

🎯 Tier 5 – Pay-per-Use

Provider Endpoint Free Limits Models Capabilities
Getimg.ai https://api.getimg.ai/v1/stable-diffusion-xl/text-to-image — SDXL, FLUX, Stable Cascade txt2img, img2img, inpaint, upscale
Monster API https://api.monsterapi.ai/v1/generate/sdxl-base — SDXL, SD 1.5 txt2img, img2img
Dreamstudio https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/text-to-image — SDXL, SD 1.5 txt2img, img2img, inpaint, upscale

🎯 Routers / Aggregators

Provider Endpoint Free Limits Models Capabilities
OpenRouter https://openrouter.ai/api/v1/images/generations — — txt2img
Eden AI https://api.edenai.run/v2/image/generation — — txt2img
AI/ML API https://api.aimlapi.com/images/generations — — txt2img

🎯 Local / Self-Hosted

Provider Endpoint Free Limits Models Capabilities
Automatic1111 (WebUI) http://localhost:7860/sdapi/v1/txt2img Unlimited — txt2img, img2img, inpaint, upscale
ComfyUI http://localhost:8188/api/prompt Unlimited — txt2img, img2img, inpaint, upscale
Fooocus http://localhost:7865/v1/generation/text-to-image Unlimited — txt2img, img2img, inpaint, upscale
SD.Next http://localhost:7860/sdapi/v1/txt2img Unlimited — txt2img, img2img, inpaint, upscale
InvokeAI http://localhost:9090/api/v1/images/ Unlimited — txt2img, img2img, inpaint, upscale
Stable Diffusion.cpp http://localhost:8080/txt2img Unlimited — txt2img

🚦 Status Legend

Symbol Status Meaning
✅ working Endpoint returned a valid image
🟡 reachable Endpoint responded but image was not verified
🔑 auth_missing API key required but not configured
🔴 auth_failed API key was rejected by the provider
💳 needs_credits Account has no remaining credits
⏳ rate_limited Too many requests – try again later
⏱️ timeout Request timed out
❌ error Endpoint returned an error
💤 offline Endpoint is unreachable
⏭️ skipped Provider was not scanned
❓ unknown Status could not be determined

📁 Project Structure

ai_image_generation/
├── __version__.py          # Version string
├── main.py                 # CLI entry point (12 subcommands)
├── providers.py            # Provider dataclass + 41-provider registry
├── scanner.py              # Async endpoint health scanner (with retries)
├── pricing.py              # Static per-image pricing table
├── model_listing.py        # Live model fetcher via /v1/models
├── discovery.py            # Candidate-host prober for new providers
├── proxy.py                # OpenAI-compatible local proxy with fallback
├── config.py               # YAML + .env configuration loader
├── config.yaml             # Default configuration
├── report_generator.py     # This file – README generator
├── requirements.txt        # Python dependencies
├── .env.example            # API key template
├── data/                   # Scan results & caches
└── tests/                  # Pytest smoke + unit tests

⚙️ Setup

1. Install dependencies

pip install -r requirements.txt

2. Configure API keys

cp .env.example .env
# Edit .env and add keys for the providers you want to test.
# Providers marked “no key” (e.g. Pollinations) work without any setup.

3. (Optional) Customise settings

Edit config.yaml to change scan concurrency, timeouts, discovery strategies, and more. Environment variables override YAML values – see config.py for the full mapping.

💻 CLI Reference

All commands run via python main.py <subcommand>.

Command Description
python main.py scan Scan all providers and report status + latency
python main.py scan --tier free --report Scan one tier and regenerate this README
python main.py list --format json List providers as table / JSON / CSV
python main.py report Regenerate this README from latest data
python main.py discover Probe candidate hosts for unregistered providers
python main.py benchmark --tier free Rank providers by generation latency
python main.py models --tier free Fetch live /v1/models lists
python main.py export --format csv --output providers.csv Export provider data
python main.py costs --sort price --images-per-month 1000 Compare per-image pricing
python main.py compare "a red panda" --providers Pollinations.ai Run a prompt across providers
python main.py generate "a red panda" --output panda.png One-shot cascade generation
python main.py proxy --port 8000 Start local OpenAI-compatible proxy w/ fallback
python main.py version Print the directory version

🔗 Sister Project – LLM APIs

Looking for text / chat / completion APIs instead? Check out the companion directory:

AI LLM API Directory – The same idea, but for Large Language Model endpoints (GPT, Claude, Llama, Mixtral, and more).

📜 License

This project is licensed under the MIT License – see the LICENSE file for details.

🙏 Credits

Built and maintained by TaylorAmarelTech.

Last generated: 2026-05-22

About

The most comprehensive directory of free & affordable AI image generation APIs

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages