Cloudflare Workers AI Free API
cloudflare.comServerless inference with a free daily allocation on the edge.
Opens Cloudflare Workers AI’s official key page. You create and own the key — FreeLLMKeys never sees or stores it.
Quick facts
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1About Cloudflare Workers AI’s free API
Cloudflare Workers AI runs open models on Cloudflare’s global edge. Every account on the free plan gets a daily budget of “Neurons” (a usage unit) that resets each day.
It covers far more than chat: text generation, vision, speech-to-text with Whisper, and embeddings for RAG — all under one free allocation. There is an OpenAI-compatible endpoint, though the base URL includes your account id.
Ideal if you are already on Cloudflare or want inference co-located with Workers and Pages at the edge.
How to get a free Cloudflare Workers AI API key
- 1Go to the official key page: https://dash.cloudflare.com/
- 2Create a free account — no credit card needed.
- 3Open the API keys section and generate a new key. Copy it somewhere safe.
- 4In your code, set the base URL to
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1and paste your key. - 5Call a model such as
@cf/meta/llama-3.3-70b-instruct-fp8-fastusing the examples below.
Code examples
Replace YOUR_CLOUDFLARE_WORKERS_AI_KEY with the key you created.
from openai import OpenAI
client = OpenAI(
base_url="https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1",
api_key="YOUR_CLOUDFLARE_WORKERS_AI_KEY"
)
resp = client.chat.completions.create(
model="@cf/meta/llama-3.3-70b-instruct-fp8-fast",
messages=[{"role": "user", "content": "Hello!"}]
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1",
apiKey: process.env.API_KEY, // your free Cloudflare Workers AI key
});
const resp = await client.chat.completions.create({
model: "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);curl https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
"messages": [{"role":"user","content":"Hello!"}]
}'Pros & cons
Pros
- Runs on Cloudflare’s edge network
- Free daily allocation
- Text, vision, audio & embeddings
- OpenAI-compatible route
Cons
- Neuron budget is easy to exhaust
- Base URL needs your account id
Cloudflare Workers AI free API — FAQ
Is the Cloudflare Workers AI API really free?+
Yes. Cloudflare Workers AI offers free tier access: Free daily “Neurons” allowance that resets every day — part of the free Cloudflare plan. No credit card is required to start.
How do I get a free Cloudflare Workers AI API key?+
Create a free account at https://dash.cloudflare.com/, open the API keys section, generate a key, then set your base URL to https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1 in your OpenAI-compatible code.
Which models does Cloudflare Workers AI offer for free?+
Llama 3.3 70B, Llama 3.1 8B, Llama 4 Scout, DeepSeek R1 Distill Qwen 32B, Mistral Small 3.1, Gemma 3, Whisper, BGE embeddings.
What are the Cloudflare Workers AI free-tier rate limits?+
10,000 Neurons/day free (varies by model cost per request).
Is Cloudflare Workers AI OpenAI-compatible?+
Yes. Cloudflare Workers AI exposes an OpenAI Chat Completions compatible endpoint, so you can reuse your existing OpenAI SDK code and only change the base URL and API key.
Popular free models on Cloudflare Workers AI
Related free LLM APIs
Scaleway Generative APIs
EU-hosted open models with a free beta allowance.
Groq
The fastest free inference on the planet — 500+ tokens/sec.
OpenRouter
One key, 300+ models — dozens are completely free.