Why Cloudflare Workers AI?
Serverless GPU inference: Llama, Qwen Coder, Flux, Stable Diffusion, Whisper — same REST endpoint, global edge, daily free neurons.
Free Basis
10,000 Neurons/day per free account — no credit card, GitHub login supported. Enough for hundreds of text generations or dozens of images per day. Pay only beyond free tier.
Step-by-Step
Step 1: Sign up at https://dash.cloudflare.com — Sign up with GitHub supported. Verify email.
Step 2: Get Account ID (right sidebar on Workers & Pages overview) and create API Token: My Profile → API Tokens → Create Token → use Edit Cloudflare Workers template → Create.
Step 3: Call Workers AI:
Text cURL
bash
curl https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/ai/run/@cf/meta/llama-4-8b-instruct-scout \
-H "Authorization: Bearer $CF_API_TOKEN" \
-d '{"messages":[{"role":"user","content":"Hello Cloudflare!"}]}'Image Python
python
import requests
ACCOUNT_ID = "YOUR_ACCOUNT_ID"
API_TOKEN = "YOUR_TOKEN"
resp = requests.post(
f"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/black-forest-labs/flux-1-schnell-klein",
headers={"Authorization": f"Bearer {API_TOKEN}"},
json={"prompt": "A cyberpunk city at night, 8k"},
)
open("out.jpg","wb").write(resp.content)Dashboard → Workers AI shows daily neuron usage. Free tier resets UTC.

Community Feedback
Comments are tied to your GitHub account — sign in to join the discussion.