API KEYS · GUIDE 6 OF 7
How to get a free Cloudflare Workers AI API key
Free daily AI allowance inside the same account that hosts your Workers and bots.
- You need
- A free Cloudflare account (email). No card for the free plan.
- Free allowance
- A free daily allocation measured in “Neurons” (10,000 per day at the time of writing) across text, image and speech models.
- Best for
- Your own projects: Telegram/Discord bots and chat widgets built in our Build-apps workshops, image generation, speech-to-text.
- Region notes
- Cloudflare is available almost everywhere. Workers AI is called from your Worker or with an account API token; it does not accept calls straight from web pages, so it is not offered in Key settings here.
Step by step
- Create a free account at dash.cloudflare.com.
- Note your Account ID (Workers & Pages → Overview, right side).
- For use inside a Worker: add an AI binding in wrangler.toml ([ai] binding = "AI") — no key needed.
- For REST use: My Profile → API Tokens → Create Token → template “Workers AI” → Create. Copy the token.
- Test with curl: curl https://api.cloudflare.com/client/v4/accounts/ACCOUNT_ID/ai/run/@cf/meta/llama-3.1-8b-instruct -H "Authorization: Bearer TOKEN" -d '{"prompt":"Say hello"}'
Where you will use it
This provider is for your own projects — for example the Telegram, Discord and chat-widget projects in Build apps. It is not used inside Open Practice tools.
If something goes wrong
| 10000 authentication error | Token lacks the Workers AI permission. Recreate it from the template. |
|---|---|
| Daily limit reached | The free Neuron allocation resets daily (UTC). |
Keep your key safe
- Treat a key like a password: never post it in chats, screenshots, GitHub or website code.
- Create one key per project so you can delete just that one if it leaks.
- If a key leaks, delete it in the provider console immediately and create a new one.
- Prefer free-only keys (for example, OpenRouter with a $0 credit limit) so a leak cannot cost money.
- On a shared or public computer, do not tick “remember on this device”, and press “Forget all keys” when you finish.
Other free keys
GUIDEGroqThe easiest first key: email signup, no card, very fast open models.GUIDEGoogle Gemini (AI Studio)Generous free tier on Gemini Flash models with a Google account.GUIDEOpenRouterOne key for many models, including a rotating set of free ones.GUIDEMistralFree “Experiment” plan covering Mistral’s model line-up, with phone verification.GUIDECerebrasExtremely fast inference — but check whether a card is now required.GUIDEHugging FaceThe home of open models. Great for discovery; hosted inference now needs credits.
Questions people ask
Is Cloudflare Workers AI free?
A free daily allocation measured in “Neurons” (10,000 per day at the time of writing) across text, image and speech models.
Do I need a credit card for Cloudflare Workers AI?
A free Cloudflare account (email). No card for the free plan.
Is Cloudflare Workers AI available in my country?
Cloudflare is available almost everywhere. Workers AI is called from your Worker or with an account API token; it does not accept calls straight from web pages, so it is not offered in Key settings here.