Free FLUX.2 [klein] API on Cloudflare Workers AI

Get high-speed free access to flux-2-klein on Cloudflare's global edge network.

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

About the Model

Why choose FLUX.2 [klein]?

If you need cinematic quality AI image generation in seconds, FLUX.2 [klein] is the current industrial standard. It maintains rich detail while significantly reducing inference overhead.

How to Access for Free (via Cloudflare Workers AI)

Cloudflare 免费政策

Cloudflare Workers AI 为所有免费账户提供每天 10,000 Neurons 的免费额度。这一额度足够支撑每天上百次的文本生成、数十张高质量生图或多段长音频转录。

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-2-klein-9b \
  -H "Authorization: Bearer $CF_API_TOKEN" \
  -d '{"prompt":"a cozy cabin in a snowy forest, warm light"}'
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-2-klein-9b",
    headers={"Authorization": f"Bearer {token}"},
    json={"prompt": "a cozy cabin in a snowy forest, warm light"},
)
image_b64 = resp.json()["result"]["image"]
with open("output.png", "wb") as f:
    f.write(base64.b64decode(image_b64))
Free FLUX.2 [klein] API on Cloudflare Workers AI - Free API, Quota & Code | Free AI API