On this page
Cloudflare Workers AI runs inference at whichever Cloudflare location is closest to your users, so you get low-latency AI without managing GPUs. Added to the free tier in 2024, it's one of the few platforms where you can run real models — including image generation and Whisper transcription — at zero cost for prototypes and small projects.
What's Free
Workers AI meters compute in "neurons." On the free Workers plan:
- 10,000 neurons/day, reset at 00:00 UTC; past it, calls fail instead of billing
- Most of the catalog — but not all of it. Seven frontier models (Kimi K2.6/K2.7, GLM-5.2/5.3/5.3-flash, DeepSeek V4 Flash/Pro) need the Workers Paid plan or prepaid AI Gateway credits
Need more than 10,000 neurons a day? Workers Paid ($5/month for the Workers plan) keeps the same 10,000 free neurons a day and bills $0.011 per 1,000 neurons above that (pricing page, checked 2026-10-11).
What 10,000 neurons bought us (tested 2026-10-11)
We called the REST API from an account on the Workers Free plan (confirmed: paid-only models answered 403 … is not available on the Workers Free plan). Same prompt for every text model — a 400-word explanation of DNS, capped at 600 output tokens. Neurons are what Cloudflare billed, read back from the account's own usage analytics; they matched the usage.neurons field in each response.
| Model | Output | Neurons billed | ≈ Per day on 10,000 | Response time |
|---|---|---|---|---|
| @cf/meta/llama-3.1-8b-instruct | 579 tokens | 20.4 | ~490 | 5.5 s |
| @cf/meta/llama-3.1-8b-instruct-fp8 | 600 tokens | 16.0 | ~620 | 36.4 s |
| @cf/meta/llama-3.2-3b-instruct | 536 tokens | 16.6 | ~600 | 3.1 s |
| @cf/meta/llama-3.3-70b-instruct-fp8-fast | 578 tokens | 119.7 | ~83 | 15.6 s |
| @cf/openai/gpt-oss-20b | 600 tokens | 17.9 | ~560 | 7.2 s |
| @cf/google/gemma-4-26b-a4b-it | 600 tokens | 16.7 | ~600 | 13.6 s |
| @cf/zai-org/glm-4.7-flash | 600 tokens | 22.0 | ~450 | 16.7 s |
| @cf/black-forest-labs/flux-1-schnell (defaults) | 1 image | 172.8 | ~57 | 8–11 s |
| @cf/stabilityai/stable-diffusion-xl-base-1.0 (20 steps) | 1.8 MB PNG | 0 (beta) | — | 11.2 s |
| @cf/myshell-ai/melotts → @cf/openai/whisper-large-v3-turbo | ~7 s of speech, transcribed back | under 5 | — | 4.6 s + 17.6 s |
| @cf/baai/bge-base-en-v1.5 | 2 × 768-dim vectors | ~0 | — | 1.4 s |
Three things this changed in our own advice. First, text is far cheaper than the "15–25 calls a day" this page used to quote: small models cost about 16–22 neurons per 600-token reply, so the free budget covers several hundred replies. Second, images are the expensive part — one default FLUX-1 schnell image costs as much as eight or nine 8B replies. Third, two models this page used to list are gone: @cf/microsoft/phi-2 and @cf/qwen/qwen1.5-7b-chat-awq now return 410 Model has been deprecated (deprecated 2026-05-30 and 2025-10-01). The Whisper round trip returned "Cloud Flaffer Workers AI can turn this sentence into speech…": one word wrong in eighteen. Response times are single non-streaming calls through a proxy from Asia; read them as rough.
What You Can Run
| Category | Models | Use Case |
|---|---|---|
| Text Generation | Llama 3.1 8B, Llama 3.2, Llama 3.3 70B, gpt-oss-20b/120b, Gemma 4, GLM-4.7 Flash, Qwen3, Mistral Small 3.1 | Chatbots, summarization, code |
| Embeddings | BAAI bge-small / bge-base-en-v1.5 | Semantic search, RAG |
| Image Generation | FLUX-1 schnell, FLUX-2, Stable Diffusion XL, dreamshaper-8-lcm | Image creation, thumbnails |
| Speech to Text | Whisper (tiny, base, large-v3-turbo) | Transcription, voice |
| Translation | M2M-100, Meta NLLB-200 | 200 languages |
| Vision / Classification | ResNet-50, MobileNetV2, DETR, distilbert-sst-2 | Labeling, detection, sentiment |
Note: Llama 3.3 70B (@cf/meta/llama-3.3-70b-instruct-fp8-fast) does run on the free plan — it just costs about six times the neurons of an 8B model (119.7 vs 20.4 in our test). What the free plan cannot call at all are the seven frontier models listed above.
Get Started (Under 5 Minutes)
Create a free account at cloudflare.com, then generate a token under My Profile → API Tokens with the Workers AI: Run permission. Copy your Account ID from the dashboard sidebar and set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID. No waitlist, no approval.
REST API (any language)
curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/llama-3.1-8b-instruct
-H "Authorization: Bearer {API_TOKEN}"
-d '{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain edge computing in one paragraph."}
]
}'
The response is {"result": {"response": "..."}, "success": true}.
Python Client
pip install cloudflare
import os
from cloudflare import Cloudflare
client = Cloudflare(api_token=os.environ["CLOUDFLARE_API_TOKEN"])
response = client.workers.ai.run(
account_id=os.environ["CLOUDFLARE_ACCOUNT_ID"],
model_name="@cf/meta/llama-3.1-8b-instruct",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is Cloudflare Workers AI?"}
]
)
print(response.response)
Cloudflare Worker (native edge deployment)
The native path runs inference inside a Worker deployed globally:
export default {
async fetch(request, env) {
const response = await env.AI.run('@cf/meta/llama-3.1-8b-instruct', {
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'Summarize the concept of edge AI.' }
]
});
return new Response(JSON.stringify(response));
}
};
npm install -g wrangler
wrangler login
wrangler init my-ai-worker
# add to wrangler.toml: [[ai]] binding = "AI"
wrangler deploy
Beyond Text: Images, Speech, Embeddings
The same .run() call swaps model and payload for other modalities. Image generation with SDXL returns binary PNG data:
image_response = client.workers.ai.run(
account_id=os.environ["CLOUDFLARE_ACCOUNT_ID"],
model_name="@cf/stabilityai/stable-diffusion-xl-base-1.0",
prompt="A futuristic city skyline at sunset, digital art",
num_steps=20
)
with open("output.png", "wb") as f:
f.write(image_response)
Whisper transcription takes audio bytes and returns result.text:
with open("audio.mp3", "rb") as f:
audio_bytes = f.read()
result = client.workers.ai.run(
account_id=os.environ["CLOUDFLARE_ACCOUNT_ID"],
model_name="@cf/openai/whisper-large-v3-turbo",
audio=list(audio_bytes)
)
print(result.text)
Embeddings with @cf/baai/bge-base-en-v1.5 return vectors in result.data — the foundation for a free RAG or semantic-search pipeline.
Workers AI vs Other Free AI APIs
| Feature | Workers AI | Groq | Gemini | OpenRouter (free) |
|---|---|---|---|---|
| Free text | 10k neurons/day | 1,000 req/day (chat models) | Not published | 20 req/min (varies) |
| Image generation | Yes (FLUX, SDXL) | No | Flash only | Some models |
| Speech transcription | Yes (Whisper) | Yes (Whisper) | No (free) | No |
| Embeddings | Yes (BGE) | No | Yes | Some |
| Edge deployment | Yes (300+ locs) | No | No | No |
| Credit card | No | No | No | No |
The standout advantage is multi-modal free inference: text, images, speech, embeddings, translation, and vision in one API within the daily neuron limit. Groq is faster for text but does no image generation; Gemini is more capable but its free tier is text-only.
Limits to Know
- One budget across every modality. Text, image, speech and embedding calls all draw from the same 10,000 neurons, and it resets daily with no rollover — an embedding batch competes with your chat traffic.
- 10,000 neurons/day is modest. Several hundred short replies is fine for a side project; a production chatbot with 100+ active users will hit the cap — cache common queries with Cloudflare KV.
- Model tiers change. Cloudflare moves models from beta to GA, which shifts neuron pricing. Check the models page first.
- Context varies by model. The catalog lists 32,000 tokens for Llama 3.1 8B (fp8), 24,000 for Llama 3.3 70B fp8-fast and 128,000 for gpt-oss — check the model page before sending long documents.
- Images are slow-ish. 8–11 s for FLUX-1 schnell and 11 s for SDXL at 20 steps in our test; fine for async, not real-time.
- No fine-tuning. You're limited to Cloudflare's hosted catalog — no custom weights.
Frequently Asked Questions
Do I need a credit card for the free tier?
Cloudflare's pricing pages list no card requirement for Workers Free, and our test account runs on that plan, but we did not sign up a fresh account to confirm the card question on 2026-10-11. There is no waitlist or approval step for the API itself.
How many free requests is 10,000 neurons per day?
Measured on 2026-10-11: a ~580-token Llama 3.1 8B reply cost 20.4 neurons, so roughly 490 such replies a day. Llama 3.3 70B cost 119.7 neurons (about 83 a day), and one FLUX-1 schnell image cost 172.8 (about 57 a day). All modalities share the same 10,000.
Can I run image generation and speech transcription for free?
Yes — we ran FLUX-1 schnell, Stable Diffusion XL, MeloTTS and Whisper large-v3-turbo on a Workers Free account on 2026-10-11. That is a real edge over Groq, which has no image models.
When should I pick something else?
Use Groq for the fastest text generation, Gemini for the most capable free model, or OpenRouter's free models if you need more than 10,000 neurons/day without paying.
The Verdict
Workers AI is the most versatile free AI API in 2026 by modality coverage. The daily cap is modest for production, but for side projects, RAG prototypes, image tools, and transcription apps — it's genuinely useful. And no other free API runs your inference in 300+ locations, which matters for latency-sensitive, globally distributed apps. If you're already on Cloudflare, it's the easiest way to add AI without leaving the stack. Get started free at developers.cloudflare.com/workers-ai.