Free FLUX.1 [schnell] API on Cloudflare

Free FLUX.1 [schnell] image API via Cloudflare Workers AI — high-quality text-to-image in 1-8 steps within 10,000 free Neurons/day.

Updated 6/9/2026Provider trust 99/1002 code examples

About the Model

Why use FLUX.1 [schnell]?

FLUX.1 [schnell] is Black Forest Labs' speed-distilled text-to-image model that produces high-quality images in just 1-8 diffusion steps — ideal for fast previews and interactive generation.

Capabilities

Excellent prompt adherence and detail for a distilled model — a great default for free, fast image generation.

Why it's free

Covered by Cloudflare Workers AI's 10,000 free Neurons per day via the /ai/run endpoint. Returns a Base64-encoded image.

How to Access for Free (via Cloudflare Workers AI)

Free access on Cloudflare Workers AI

Generate images with FLUX.1 [schnell] through Cloudflare's global edge using the unified /ai/run REST endpoint. Every Cloudflare account includes 10,000 Neurons per day for free. The response is a Base64-encoded image in result.image.

Authentication (BYOK)

Use your own Cloudflare Account ID and an API token with Workers AI access via Authorization: Bearer <token>.

Try it in your browser

Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.

Pick a model, paste your own free key, and run. Your key is sent once to call the provider and never stored on our servers.

Code Examples

curl
curl https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/ai/run/@cf/black-forest-labs/flux-1-schnell \
  -H "Authorization: Bearer $CF_API_TOKEN" \
  -d '{"prompt":"a serene mountain lake at sunrise, photorealistic"}'
python
import os, base64, requests

account = os.environ["CF_ACCOUNT_ID"]
token = os.environ["CF_API_TOKEN"]

resp = requests.post(
    f"https://api.cloudflare.com/client/v4/accounts/{account}/ai/run/@cf/black-forest-labs/flux-1-schnell",
    headers={"Authorization": f"Bearer {token}"},
    json={"prompt": "a serene mountain lake at sunrise, photorealistic"},
)
image_b64 = resp.json()["result"]["image"]
with open("output.png", "wb") as f:
    f.write(base64.b64decode(image_b64))