Provider

Free image generation API

An image generation API makes a picture from a text prompt. A small number of providers give image generation free, with daily limits. FreeLLMAPI sends /v1/images/generations requests to the providers that serve image models. When one provider fails, the router tries the next one.

Which providers give free image generation

Free image generation is less common than free chat. We checked each provider on its official page. The table shows what we could confirm.

Checked on provider pages, 20 November 2026
ProviderModelsFree allowance (official)Notes
Cloudflare Workers AIFLUX.1 schnell, FLUX.2 klein, FLUX.2 dev, Leonardo Phoenix and Lucid Origin10,000 neurons each day on the Free and Paid plansFLUX.1 schnell uses 4.80 neurons for each 512x512 tile and 9.60 neurons for each step
NVIDIA (build.nvidia.com)FLUX.1 dev and other hosted modelsTrial service under the NVIDIA API Trial Terms of ServiceFLUX.1 dev is for non-commercial use. NVIDIA does not publish a fixed image quota
Google AI StudioGemini 2.5 Flash ImageNot available on the free tierPaid tier only, so the free pool cannot use it
PollinationsSeveral image modelsNot confirmedFreeLLMAPI has an adapter. The official docs describe paid balance, and we could not confirm a free allowance today

By our calculation, a FLUX.1 schnell image of four 512x512 tiles with 4 steps uses about 58 neurons. That gives about 170 images each day from the free Cloudflare budget. Chat, speech and embedding calls on Workers AI use the same budget.

Step 1: Install FreeLLMAPI and add keys

FreeLLMAPI is open source. It runs on your computer in Docker. Your provider keys stay on your computer.

Install (macOS or Linux)

curl -fsSL https://freellmapi.co/install.sh | bash

Open the dashboard at http://localhost:3001. Add a Cloudflare Workers AI key on the Keys page. The key has the form account_id:token. Then open Models, Image to see the image models and turn them on or off. Copy your unified key from the Keys page.

Step 2: Generate an image

The endpoint uses the OpenAI request format. Only prompt is required. n sets the number of images, from 1 to 4. size takes a value such as 1024x1024.

curl

curl http://localhost:3001/v1/images/generations \
  -H "Authorization: Bearer <unified-key>" \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "prompt": "a red bicycle in front of a blue door, photo", "size": "1024x1024"}' \
  -o image.json

The response is JSON. Each item in data has a b64_json field with the image bytes in base64. The model and provider fields show which model made the image.

Python: generate and save the image

import base64
from openai import OpenAI

client = OpenAI(base_url="http://localhost:3001/v1", api_key="<unified-key>")

resp = client.images.generate(
    model="auto",
    prompt="a red bicycle in front of a blue door, photo",
    size="1024x1024",
    n=1,
)
raw = base64.b64decode(resp.data[0].b64_json)
ext = "png" if raw[:4] == b"\x89PNG" else "jpg"  # providers return PNG or JPEG
with open(f"image.{ext}", "wb") as fh:
    fh.write(raw)
print("Saved image." + ext)

Write prompts that work on FLUX schnell

  • Put the subject first, then the setting, then the style. For example: "a red bicycle, blue door, morning light, photo".
  • Keep the prompt shorter than 2,048 characters. Cloudflare rejects longer prompts on FLUX.1 schnell.
  • Do not ask for long text in the image. Small fast models often spell words wrong.
  • FLUX.1 schnell on Cloudflare accepts only the prompt through this adapter. The size value has no effect on that model.
  • Send one image for each request when you test prompts. Each extra image uses more of the daily budget.

Limits and pitfalls

  • Commercial use: the model license still applies on a free tier. FLUX.1 dev on NVIDIA is for non-commercial use. Read the license of each model before you publish images.
  • Shared budget: the Cloudflare 10,000 neurons are for the account. Large images and more steps use more neurons.
  • Draft small: Cloudflare counts cost in 512x512 tiles. A 1024x1024 image has four tiles, and a 512x512 image has one. On models that accept size, make drafts at 512x512. Make the final image at full size.
  • Base64 only: plan to decode b64_json. Do not expect a hosted image URL.
  • Different output: with model: "auto", two requests can go to different models. Pin a model id when you need the same style each time.
  • Slow responses: image models take several seconds. Set a client timeout of 60 seconds or more.
Video: FreeLLMAPI also has /v1/videos/generations. Video jobs can take minutes and stop after a 5-minute timeout with error 504.

Troubleshooting

ProblemCauseFix
Error 400 prompt is requiredThe body has no promptAdd a prompt string
Error 429 or a budget errorThe daily free budget is usedWait for the daily reset, or add a key from another provider
Error 503No image model is enabledAdd a key and turn on a model on Models, Image
The image file does not openThe saved extension is wrongCheck the first bytes, as in the Python example
The size is not what you asked forThe model ignores sizePin a model that accepts a width and a height
Use every one of these through one key. FreeLLMAPI is an open-source, self-hosted router that puts all these free tiers behind a single OpenAI-compatible endpoint and fails over when one is rate-limited. Browse the catalog or go live.

Frequently asked questions

Is there a free image generation API?

Yes. Cloudflare Workers AI gives 10,000 neurons each day, which you can use for FLUX image models. NVIDIA hosts FLUX models under trial terms. FreeLLMAPI sends requests to these providers through one key.

How many free images can I make each day?

On Cloudflare, a FLUX.1 schnell image of four tiles with 4 steps uses about 58 neurons. That is about 170 images each day, if no other Workers AI model uses the budget.

Is Nano Banana free through the API?

No. Google lists Gemini 2.5 Flash Image as not available on the free tier of the Gemini API. Only the paid tier includes it.

Which image sizes can I request from the free image API?

Send size as width x height, for example 1024x1024. Some models ignore the size. FLUX.1 schnell on Cloudflare uses only the prompt through FreeLLMAPI.

Can I use free AI images commercially?

It depends on the model license and the provider terms. For example, FLUX.1 dev on NVIDIA is for non-commercial use. Read the license of each model.

Sources

All guides · Browse all free models

Keep reading

All posts →
Provider

Free Gemini API

Google AI Studio's permanent free tier — Gemini and Gemma, no credit card.

Provider

Free DeepSeek API

DeepSeek V3, R1 and V4 served free across multiple providers.

Provider

Free Llama API

Meta's Llama models free across 14 providers, behind one key.