Cloudflare Workers AI: 300+ Global Edge Locations, 10,000 Free Neurons/Day & Engineering Gotchas
As a global cloud infrastructure and CDN titan, Cloudflare has turned its Anycast edge network spanning over 300 cities into an edge inference powerhouse: Workers AI. By deploying open-source large language and multimodal models across serverless GPU clusters worldwide, requests route automatically to the geographically closest point of presence, drastically cutting transatlantic and transpacific latency.
For individual developers, hobbyists, and open-source engineers, Cloudflare offers one of the most compelling free offerings in the industry: a permanent, card-free Free Tier (Workers Free) loaded with 10,000 Neurons of compute refreshed every single day at midnight UTC!
However, Cloudflare’s architecture departs significantly from conventional API providers: it meters compute in GPU Neurons rather than raw tokens, requires your unique Cloudflare Account ID embedded directly in the REST URL, and omits browser CORS response headers by default. Based on our comprehensive October 2026 verification, here is the complete operational guide to maximizing Cloudflare Workers AI.
1. Core Policy & Free Tier Verification
| Dimension | Specification & Audit Findings |
|---|---|
| Free Tier Type | ✅ daily_refresh (Permanent free tier, daily reset) |
| Free Quota | 10,000 Neurons/day (shared across all models; not token-based) |
| Reset Cycle | Daily at 00:00 UTC (08:00 Beijing / 01:00 London / 17:00 PT prev day) |
| Credit Card Requirement | ❌ None (sign up with standard email; no billing info needed) |
| Overage Behavior | Returns HTTP 429 Too Many Requests or Error 3040 / 1027; zero auto-debit risk |
| Default Rate Limits | 300 RPM for text generation (up to 720–1,500 RPM for lightweight models) |
| Catalog Breadth | ~80 open-source models across LLM, reasoning, vision, audio & embeddings |
2. Demystifying Neurons: How Much Compute is 10,000 Neurons?
Unlike standard token-priced APIs, Cloudflare calculates resource consumption via Neurons—a unified metric capturing raw GPU floating-point operations and memory bandwidth.
Real-World Request Conversions
| Use Case | Estimated Context (Tokens) | Neurons / Request | Daily Requests Supported (10K Neurons) |
|---|---|---|---|
| Short Conversational Queries | 2K Input / 200 Output | ~18 Neurons | ~550 queries / day |
| Standard Long-Context Chat | 6K Input / 1K Output | ~70 Neurons | ~140 queries / day |
| Multi-Step Agent Pipelines | Full Context + 4 Iterations | ~280 Neurons | ~35 workflows / day |
💡 Takeaway: 10,000 Neurons per day easily accommodates personal experiments, hobby projects, Discord/Telegram bots, and scheduled scraping automations. For high-volume enterprise traffic, upgrade seamlessly to Workers Paid ($5/month + $0.011/1,000 Neurons).
3. Online Model Catalog: 80+ Models & Frontier Paywalls
1. Highlighted Models Included in Workers Free
| Modality / Task | Model ID (modelId) | Highlights & Use Cases |
|---|---|---|
| Flagship LLM | @cf/meta/llama-3.3-70b-instruct-fp8-fast | Fast edge-optimized 70B flagship, 128K context, rapid time-to-first-token |
| Deep Reasoning | @cf/deepseek-ai/deepseek-r1-distill-qwen-32b | DeepSeek R1 distilled 32B, combining deep chain-of-thought with fast execution |
| Efficient Chat | @cf/qwen/qwen2.5-7b-instruct | Qwen 2.5 7B, balanced performance, minimal Neuron drain for multi-turn chat |
| Micro LLM | @cf/microsoft/phi-2 | Microsoft 2.7B compact model capable of up to 720 RPM throughput |
| Image Gen (FLUX) | @cf/black-forest-labs/flux-1-schnell | Top-tier 4-step rapid image synthesis directly on edge GPUs |
| Speech-to-Text | @cf/openai/whisper | OpenAI Whisper speech recognition microservice for audio transcription |
| Vector Embeddings | @cf/baai/bge-large-en-v1.5 | BAAI vector embeddings for low-latency edge RAG search |
2. ⚠️ Important: Frontier Models Require Workers Paid
Certain proprietary or heavily resource-intensive frontier models (such as @cf/moonshotai/kimi-k2.6, @cf/moonshotai/kimi-k2.7-code, and @cf/zai-org/glm-5.2) cannot be invoked on Workers Free. Accessing these requires a Workers Paid plan or prepaid AI Gateway credits.
4. Key Engineering Gotchas
Avoid these critical integration pitfalls when connecting to Cloudflare Workers AI:
1. ⚠️ Base URL Requires Your Actual Account ID (Common 404 Pitfall)
The REST API endpoint is namespaced to your specific account:
- Incorrect URL:
https://api.cloudflare.com/client/v4/ai/v1❌ - Correct URL:
https://api.cloudflare.com/client/v4/accounts/{YOUR_ACCOUNT_ID}/ai/v1✅ - Where to Find: Log in to dash.cloudflare.com, select your account, and copy the
Account IDstring displayed in the right sidebar.
2. ⚠️ REST Endpoints Lack CORS Headers (Direct Browser Fetch Fails)
Cloudflare REST endpoints do not return Access-Control-Allow-Origin headers. Direct browser-side fetch() requests will trigger CORS blocks.
- Solution: Configure desktop clients (NextChat, ChatBox), invoke via backend services (Node.js/Python), or deploy a simple Cloudflare Worker to act as a CORS reverse proxy.
3. ⚠️ Overdraft & Rate Limit Codes
HTTP 429/Error 3040:Capacity temporarily exceededon the requested edge GPU cluster.Error 1027: Daily request ceiling hit (Workers Free permits up to 100,000 HTTP subrequests/day).- Zero Financial Risk: Because Workers Free accounts require no credit card, quota exhaustion merely halts requests with clean error codes—never unexpected charges.
4. ⚠️ Token Scope Permissions
When generating your token at Profile -> API Tokens -> Create Token, make sure to use the pre-built Workers AI (Read/Write) template. Using an improperly scoped API token will result in HTTP 401 Unauthorized.
5. Integration Code Examples
1. cURL Quick Test
export ACCOUNT_ID="YOUR_CLOUDFLARE_ACCOUNT_ID"
export CF_TOKEN="YOUR_WORKERS_AI_API_TOKEN"
curl -X POST "https://api.cloudflare.com/client/v4/accounts/${ACCOUNT_ID}/ai/v1/chat/completions" \
-H "Authorization: Bearer ${CF_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"messages": [
{"role": "user", "content": "Explain the architectural benefit of edge AI in two concise sentences."}
],
"max_tokens": 100
}'
2. Python Client Example
import os
import requests
ACCOUNT_ID = os.environ.get("CLOUDFLARE_ACCOUNT_ID", "YOUR_ACCOUNT_ID")
API_TOKEN = os.environ.get("CLOUDFLARE_API_TOKEN", "YOUR_API_TOKEN")
url = f"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/v1/chat/completions"
headers = {
"Authorization": f"Bearer {API_TOKEN}",
"Content-Type": "application/json"
}
payload = {
"model": "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b",
"messages": [
{"role": "user", "content": "Which is larger: 9.11 or 9.9? Explain briefly."}
]
}
resp = requests.post(url, headers=headers, json=payload)
data = resp.json()
print("Response:", data["choices"][0]["message"]["content"])
3. Native Cloudflare Worker Binding (Zero Network Overhead)
When developing inside a Cloudflare Worker, bind the AI service directly with zero HTTP latency and no API token requirement:
export default {
async fetch(request, env) {
const response = await env.AI.run("@cf/meta/llama-3.3-70b-instruct-fp8-fast", {
messages: [
{ role: "user", content: "Hello from the Cloudflare edge network!" }
]
});
return new Response(JSON.stringify(response), {
headers: { "Content-Type": "application/json" }
});
}
};
6. Summary
Cloudflare Workers AI stands out as a unique pillar in the AI ecosystem:
- Unrivaled Edge Latency: Direct execution across 300+ data centers eliminates long-distance round trips;
- True Multimodal Hub: Text chat, DeepSeek reasoning, FLUX image synthesis, and Whisper audio transcription, all sharing a 10,000 Neurons/day pool;
- Worry-Free Cardless Access: Resets every day at 00:00 UTC with zero credit card commitment and zero overdraft danger.