Cloudflare Workers AI logo

Cloudflare Workers AI Free API

cloudflare.com

Serverless inference with a free daily allocation on the edge.

Free tier No credit card OpenAI-compatible Verified November 2026
Get your free Cloudflare Workers AI key

Opens Cloudflare Workers AI’s official key page. You create and own the key — FreeLLMKeys never sees or stores it.

Quick facts

Base URL
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1
Free access
Free daily “Neurons” allowance that resets every day — part of the free Cloudflare plan.
Rate limits
10,000 Neurons/day free (varies by model cost per request).
Credit card
Not required
OpenAI-compatible
Yes — reuse your OpenAI SDK
Free models
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

About 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

  1. 1Go to the official key page: https://dash.cloudflare.com/
  2. 2Create a free account — no credit card needed.
  3. 3Open the API keys section and generate a new key. Copy it somewhere safe.
  4. 4In your code, set the base URL to https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v1 and paste your key.
  5. 5Call a model such as @cf/meta/llama-3.3-70b-instruct-fp8-fast using the examples below.

Code examples

Replace YOUR_CLOUDFLARE_WORKERS_AI_KEY with the key you created.

Python
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)
JavaScript
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
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