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.
Get high-speed free access to flux-2-klein on Cloudflare's global edge network.
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.
Cloudflare Workers AI 为所有免费账户提供每天 10,000 Neurons 的免费额度。这一额度足够支撑每天上百次的文本生成、数十张高质量生图或多段长音频转录。
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.
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"}'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))