If you searched for Cloudflare AI Gateway alternatives, you probably hit a wall, a bill or a missing feature, and most pages that rank for the phrase list competitors without saying what the Cloudflare product does. This one starts from Cloudflare’s own documentation, read on 28 November 2026. You get a sourced feature table, a calculator that turns Workers AI free neurons into requests a day, a fee comparison with arithmetic, and a checklist that tells you whether you need a different gateway at all. One AI API Key publishes this post and is one of the alternatives, so each claim about us points to a page you can open.
What does Cloudflare AI Gateway actually do?
Cloudflare describes AI Gateway as a way to gain visibility and control over AI apps: you connect your app, then get analytics and logging, and control scale with caching, rate limiting, request retries and model fallback. Its overview page adds routing, with model aliases and dynamic routes. That is a real list, and most of it is free. The table below keeps to what each documentation page says, with the page linked.
| Capability | What the docs say | Where |
|---|---|---|
| Analytics | Requests, tokens and cost for your app, in the dashboard | Overview |
| Logging | On by default per gateway; a log can include prompt, response, provider, status, tokens, cost, duration | Logging |
| Caching | Off by default; text and image responses; identical requests only; TTL from 60 seconds to one month | Caching |
| Rate limiting | Requests per time window, fixed or sliding; excess requests get 429 | Rate limiting |
| Routing | Model aliases (ordered fallback or smart routing), dynamic routes with conditions, percentage splits, rate and budget limits | Routing |
| Guardrails | Llama Guard 3 8B for content hazards, Prompt Guard 2 for injection; flag, block or ignore | Guardrails |
| Provider keys | Send per request, or store with BYOK in Secrets Store | BYOK |
| Model access | Unified Billing credits for Workers AI and third-party providers | Unified Billing |
| Provider list | Workers AI, Bedrock, Anthropic, Azure OpenAI, Cerebras, Cohere, DeepSeek, Google, Groq, Mistral, OpenAI, OpenRouter, xAI and more | Providers |
Two things deserve a plain statement. First, this is a strong feature set, and for a team already on Cloudflare it is hard to beat on convenience: no new vendor, no new invoice line if you use standard billing. Second, several of these features are controls and observability, not access. Caching, rate limits, logs and guardrails do nothing until you also solve where the model tokens come from. That second question is where the alternatives start.
Is Cloudflare AI Gateway a proxy or a model provider?
Both, and the answer changes how you should compare it. The REST API page says you can call any model, hosted on Cloudflare or by a third party, through the same Cloudflare API with logging, caching and rate limiting applied automatically, with authentication and billing handled through your Cloudflare account. Third-party models are billed through Unified Billing. The same page lists four endpoints, including an OpenAI chat completions one and an Anthropic Messages one.
Credentials are resolved in a fixed order, which matters when something fails and you need to know whose money was spent.
Which credentials Cloudflare uses
The docs add one more detail worth reading twice: on requests routed through Unified Billing endpoints, only a BYOK key stored under the default alias stops a request from falling through to Cloudflare credits. Keys under other aliases are not consulted on that path. If you run separate production and testing keys, that is the kind of footnote that turns into a surprise charge.
So, when someone says “Cloudflare AI Gateway does not give you models”, that is out of date as of this reading. The more accurate statement is that it gives you models only if you load Cloudflare credits, and that the terms of those credits are a short list you can check against your situation. We cover the same split for other products in the guide to what an LLM gateway is and the head-to-head on using a gateway versus calling the provider directly.
What does Cloudflare AI Gateway not do?
Everything below is stated in, or follows directly from, the documentation pages linked. Where a limit is an absence in the docs, we say “we did not find” instead of claiming the feature does not exist.
It does not let you buy credits without a card. Unified Billing credits are bought in the dashboard with a non-prepaid credit or debit card. PayPal, Apple Pay and Google Pay are not supported, even when linked to a card. The separate Machine Payments feature for stablecoin wallets requires you to be based in the United States and to have a credit card on file. If your buyer is a student, a hobbyist without a card, or a team that pays by invoice outside Cloudflare’s own plans, that matters.
It does not charge zero on top of provider prices. Per the pricing page, a 5 percent fee applies to all credits bought through Unified Billing, so a $100 purchase becomes a $105 charge. Provider inference rates are passed through with no markup. Standard billing and your own keys avoid the fee, but then you manage provider accounts yourself.
It does not hard-stop at a zero balance in every case. The Unified Billing page warns that in rare instances your credit balance may go negative, and that Cloudflare then charges the payment method on file at the start of the next month. That is a postpaid tail on a prepaid product. A purely prepaid design refuses the call at zero instead.
It does not offer a per-project key. Gateway tokens are Cloudflare API tokens, and the authentication page states that the AI Gateway Read, Run and Edit permissions cannot be restricted to a single gateway. Any token with Run can send requests through every gateway in the account, including ones with stored provider keys. For isolation the docs suggest separate Cloudflare accounts or a Worker-side binding. A leaked token is therefore an account-wide event. The docs do describe budget limits inside dynamic routes, which cap spend by metadata such as a user or plan, but those live in route logic you must build, not in a key you hand to one app.
It does not do semantic caching yet. The caching page says caching applies only to identical requests and that semantic search for caching is planned. The cache key hashes provider, endpoint, model, the provider authentication header and the full request body, so one changed character is a miss. That is fine for a menu-driven support bot and weak for free-text chat.
It does not stream through Guardrails or DLP unchanged. For Guardrails, the docs say the REST API evaluates streamed responses without enforcing the response policy, and gateway endpoints buffer a streamed response and return one non-streamed payload. DLP scanning of a streamed reply also buffers the whole response before release, which raises time to first token. If your product depends on token-by-token streaming, test with the protection on.
It does not include a free model lane for most models. Workers AI includes a free allocation of 10,000 neurons a day on both Free and Paid Workers plans, and several frontier models are listed as requiring a paid billing method. We did not find a general free daily allowance for third-party models such as OpenAI or Google through Unified Billing.
It does not remove a request-rate ceiling on credits. For requests that use Cloudflare-managed credentials, the limits page gives 200 requests per 60 seconds per gateway, with HTTP 429 and error code 2018 beyond it. Requests with your own keys are not subject to that particular limit.
That list is not a flaw list. A gateway has to draw lines somewhere, and Cloudflare draws them where a large infrastructure company would. It is a list of questions to answer before you commit, and the ones that matter depend on who you are.
What does it cost, compared with other ways to add credit?
Fees are the one number you can compute in advance. Unified Billing charges 5 percent on credits. OpenRouter’s FAQ, read the same day, says it charges 5.5 percent with a $0.80 minimum on credit purchases. One AI API Key adds no fee on the amount of credit you add; the fee comparison explains how to check that for any provider, and the prepaid credits guide covers what happens to an unused balance. Enter your own top-up:
Credit top-up fee check
- Cloudflare Unified Billing, 5% fee
- $5.00
- Cloudflare total charge
- $105.00
- OpenRouter, 5.5% with $0.80 minimum
- $5.50
- OpenRouter fee as share of top-up
- 5.5%
- One AI API Key fee on credit added
- $0.00
Fees as published on 28 November 2026: Cloudflare pricing page and OpenRouter FAQ. Provider token prices are passed through at their own rates by Cloudflare; this check covers only the fee on buying credit. Taxes and card fees are not included.
At $100, the fee is $5.00 at Cloudflare and $5.50 at OpenRouter. At $10, it is $0.50 against $0.80, which is 8 percent for OpenRouter because the minimum bites first. Fees alone do not decide anything: Cloudflare and OpenRouter both give you something for the fee, and a gateway with no fee has to make its money from the per-token rates, which is why our model prices on the pricing page and the models list are the numbers to compare, not the fee line. The cost calculator turns a token count into dollars at those rates.
Fee on a $100 credit purchase (28 November 2026)
- Cloudflare Unified Billing$5.005% of the credit
- OpenRouter$5.505.5% with a $0.80 minimum
- One AI API Key$0.00no fee on credit added; model rates apply
How much can you test for free on each?
A free lane decides how much you can try before spending. Cloudflare’s free route is the Workers AI daily allowance: 10,000 neurons a day, resetting at 00:00 UTC, on the Free and Paid Workers plans. Neurons are Cloudflare’s unit for the GPU work behind a request, and the pricing page converts them to tokens per model. Model prices are quoted per million tokens in neurons, so you can work out requests a day yourself.
Take Llama 3.1 8B (the fp8-fast build). The pricing table lists 4,119 neurons per million input tokens and 34,868 per million output tokens. For a request with 1,000 input tokens and 300 output tokens:
- Input: 1,000 × 4,119 ÷ 1,000,000 = 4.119 neurons.
- Output: 300 × 34,868 ÷ 1,000,000 = 10.460 neurons.
- Total: 14.579 neurons a request, so 10,000 ÷ 14.579 = 685 requests a day.
The 70B Llama 3.3 build lists 26,668 and 204,805 neurons per million. The same request costs 26.668 + 61.442 = 88.110 neurons, which gives 113 requests a day. Cloudflare prices neurons at $0.011 per 1,000, so the whole free allocation is worth about 11 cents a day. That is a testing allowance, and a useful one.
Our free lane works differently: 48 ids ending in :free share 100 requests and 3,000,000 tokens a day per account, in the chat and through the API, refilling at 00:00 UTC. The same request of 1,300 tokens gives min(100, 3,000,000 ÷ 1,300) = 100 requests, because the request cap bites first. Change the numbers:
Free allowance in requests a day
- Cloudflare Workers AI free, Llama 3.1 8B
- 685
- Cloudflare Workers AI free, Llama 3.3 70B
- 113
- One AI API Key free lane (shared by 48 ids)
- 100
Neuron rates from the Workers AI pricing page, read 28 November 2026. Free neurons apply to Workers AI models, not to third-party models through Unified Billing, and some Workers AI models require a paid plan. Our figures come from the site's own limits and refill at 00:00 UTC.
Free requests a day for a 1,300-token request
- Cloudflare Workers AI, Llama 3.3 70B113
- One AI API Key free lane10048 ids share it, plus a 3,000,000-token cap
- Cloudflare Workers AI, Llama 3.1 8B685
For tiny requests on a small model, Cloudflare gives you more calls a day. For long prompts and bigger models, our token cap goes further. The honest summary: if you only want to run a script a few hundred times against a small open model, either works, and the choice follows the model list. If you want to try several different families behind one key, the shared lane is simpler. The guide to free LLM APIs with no credit card compares the other free tiers with dated limits.
What do the logs and data terms look like?
Cloudflare logging is on by default and can capture the prompt and response. You can switch it off per gateway, or per request with the cf-aig-collect-log header. Retention depends on when your account made its first gateway. Accounts whose first gateway is dated on or after 24 September 2026 follow Workers Logs pricing and retention. Earlier accounts use Legacy Logs with these limits from the pricing and limits pages:
| Plan | Legacy Logs storage | Source |
|---|---|---|
| Workers Free | 100,000 logs in total across all gateways | Pricing |
| Workers Paid | 10,000,000 logs per gateway | Limits |
| Log storage rate | 500 logs a second per gateway | Limits |
Logpush exports are billed under Logpush pricing, and DLP scanning is free on all plans with two predefined profiles when you have no Zero Trust subscription. Requests paid through Unified Billing are always logged, even if logs are off, and the entry holds metadata and billing details rather than request and response bodies. That last rule is sensible for billing records, and it is also the kind of detail to put in your data-processing review.
Our approach is narrower: prompts and answers pass through and are not stored; we keep usage records (model, token counts, charge, timing, key name, request id), we do not train on your data, and the company running the model still receives the request. The exceptions are on the record: prompt logging is an opt-in per key, X-No-Log: true opts one call out, content is captured only if you ask us to troubleshoot a request or we investigate abuse, and shared chat links store what was shared. The routing and privacy docs, the privacy policy and the guide to what a gateway sees hold the details, and the post of ten data-processing questions to ask any gateway works as a script for either vendor.
One difference to weigh: Cloudflare’s logs are a feature you may want. They give you a searchable history of prompts, which is how most teams debug. Storing no prompt text is safer for sensitive input and worse for debugging. Neither design is better in the abstract; pick by what you send.
How hard is it to start on each?
The first call tells you a lot about the product. This is the Cloudflare route from its REST API page, with a third-party model:
export CLOUDFLARE_ACCOUNT_ID="your-account-id"
export CLOUDFLARE_API_TOKEN="your-token"
curl -X POST "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "openai/gpt-4.1-mini",
"max_tokens": 100,
"messages": [{"role": "user", "content": "Say hello in five words."}]
}'You need an account ID, an API token with the right permissions (the get-started page lists AI Gateway Read, AI Gateway Edit and Workers AI Read), a funded Unified Billing balance or a provider key, and an author/model id. For Workers AI models you also send a cf-aig-gateway-id header. The docs state that a gateway is created on the first authenticated request.
Here is ours with a free model id:
export ONEAIAPIKEY_API_KEY="paste-your-key-here"
curl https://api.oneaiapikey.com/v1/chat/completions \
-H "Authorization: Bearer $ONEAIAPIKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-ai-glm-5.3:free",
"max_tokens": 100,
"messages": [{"role": "user", "content": "Say hello in five words."}]
}'The ingredients are a Google sign-in, a key from the console and the base URL. There is no card field, the 48 free ids work at a $0 balance, and the quickstart and authentication guide cover keys, expiry and spend limits. Priced models are set up by hand, offline: pick a model on the models page, read the price, and email somdutt777@gmail.com to buy access. That is slower than a card form, and the post on why paid access goes through email explains the trade.
If you are moving an app, the code change is small, because both sides speak the OpenAI shape:
import os
from openai import OpenAI
# Before: a call that goes through Cloudflare's OpenAI-compatible endpoint
# client = OpenAI(
# base_url=f"https://api.cloudflare.com/client/v4/accounts/{os.environ['CLOUDFLARE_ACCOUNT_ID']}/ai/v1",
# api_key=os.environ["CLOUDFLARE_API_TOKEN"],
# )
# After: the same SDK, pointed at One AI API Key
client = OpenAI(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"])
reply = client.chat.completions.create(
model=os.environ.get("MODEL_ID", "z-ai-glm-5.3:free"), # model ids differ by provider, keep this in config
max_tokens=100,
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(reply.choices[0].message.content)
print(reply.usage)Keep the model id in config, not in code. Ids differ: Cloudflare uses author/model or @cf/author/model, and ours are listed on the models page with their :free variants on the free list. The tutorial on switching an OpenAI SDK app to a different base URL covers Node and environment variables, and OpenAI API alternatives lists what else changes (tools, streaming edge cases).
Where Cloudflare AI Gateway wins
You came for alternatives, so here is the other side, because an alternative that hides the incumbent’s strengths is a sales page.
Routing control. Aliases give you ordered fallback or smart routing under one name, dynamic routes let you branch on request metadata, split traffic by percentage and apply rate or budget limits, and you version and roll back routes without a code change. We offer automatic retries, a free-lane retry on another model, and up to three fallback ids you name in an X-Fallback-Models header (see routing and failover and the uptime and fallbacks guide). That is simpler and less capable. If you need A/B rollouts across providers, Cloudflare is the better fit.
Provider breadth and your own keys. The supported provider list is long, and BYOK stores your keys in Secrets Store so they leave your code. Here, providers are ours: you do not attach an upstream key of your own, which is the point for someone who wants one bill, and a limit for someone who already has provider contracts.
Security features. Guardrails with Llama Guard and Prompt Guard, DLP profiles shared with Cloudflare One, and logs you can export with Logpush. We have none of these. If compliance asks for content scanning, you want Cloudflare or a dedicated tool.
Caching. An exact-match response cache that returns without calling the model is a real cost and latency saver for repeated inputs. Our side has provider prefix caching, which lowers price but still runs the model.
Scale and reputation. A large vendor with a status history and enterprise support is a lower-risk choice for a production workload that already depends on it. The status page checklist shows how to grade any provider, including us. If you are weighing the whole market, the nine-gateway comparison and the posts on LiteLLM alternatives, Portkey alternatives, Vercel AI Gateway alternatives, Requesty alternatives and Helicone alternatives cover their own products with their own docs.
Where a gateway with its own model access fits
Four situations push people off a control-plane gateway and toward one that is also the model source.
You want one key per project with a ceiling. On our side a key can carry a spend limit, an expiry and a model list, and a key at its limit gets a 403 before the model is called, so that request costs nothing. A leaked key can spend only its own limit. The tutorial on a key and spend limit per project shows how to size them, and runaway token bills shows why a ceiling is the first cap to set. The Cloudflare equivalent is to build budget logic into dynamic routes and keep tokens in separate accounts. Both can work; ours is a form field.
You want to test models before paying. A Google sign-in gives you a $10 sign-up credit for priced models and 48 free ids sharing 100 requests and 3,000,000 tokens a day. The chat uses the same allowance without code. You can watch the status page, the public rankings and the transparency page to see how we measure ourselves.
You do not want a card on file with a platform. Our sign-up has no card field, and paid credit is added by email, from $1, with the amount you add being the amount you get. Whether you want that depends on whether you trust a small operator with a payment by email more or less than a large one with a card form. That is a fair question, and the next section shows how to answer it without taking our word.
You need models Cloudflare does not carry. Our free and priced lists include open and uncensored families that a general-purpose platform has little reason to host. If that is your use, see the uncensored AI API page and the acceptable use policy, which applies to every request.
None of this makes us the safer choice. It makes us the smaller, simpler one, and we have to prove that. Our post on reseller risks explains the checks a reader should run on any gateway that resells model access.
How can you check any of this without trusting us?
Run tests that cost nothing. These four are quick, and the first one applies to Cloudflare as much as to us.
- Read the bill against your own count. Take a prompt, count tokens with a tokenizer for that model family, send it, and compare the
usageobject. A gap larger than a few tokens needs an explanation (system prompts, tool schemas). The billing audit guide has the method. - Confirm the model identity. Ask the same hard question to the gateway and to the provider and compare. The guide to verifying an API serves the model it names gives six checks, and the CISPA research explainer covers why this matters.
- Watch the balance move. Send one priced request and read the balance before and after. On free ids, the daily counter in the response headers should drop. See the headers reference.
- Test the failure path. Send an invalid key and an over-limit request. A good gateway returns a clear 401, 403 or 429. Our error reference lists the codes and the guide to 429 errors separates the causes.
The free gateway test protocol extends this to eight tests with scripts, and what OpenAI-compatible actually means gives a probe for chat, streaming, tools and errors.
If you do use Cloudflare’s cache, here is a short check that it behaves as documented:
# Needs a gateway with caching on (dashboard: AI > AI Gateway > Settings > Cache Responses).
# Per the caching page, the response header cf-aig-cache-status is HIT or MISS.
URL="https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions"
BODY='{"model":"openai/gpt-4.1-mini","max_tokens":50,"messages":[{"role":"user","content":"Name one prime number."}]}'
for i in 1 2; do
curl -s -o /dev/null -D - "$URL" \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$BODY" | grep -i "cf-aig-cache-status"
done
# Expect MISS, then HIT. Change one character in BODY and you should get MISS again,
# because the cache key covers the full request body (exact match).Which gateway do you actually need?
Tick what applies to your project. The score is a nudge, not a verdict, and it runs in your browser.
Signs you need an alternative to Cloudflare AI Gateway
0 of 8 signs ticked
Stay where you are
Nothing here points away from Cloudflare. If you already run on it, keep it and add a second route for fallback.
What are you actually trying to do?
Add caching and rate limits to an app that already works
Pay one bill for several model providers
Try models for free before committing
Self-host the proxy
Give every agent or project its own budget
What should you move, and what should you keep?
You do not have to pick one. A common and sensible setup keeps Cloudflare AI Gateway in front for caching, rate limits and logs, and uses a second gateway as the model source behind it, or as a fallback route when the first one fails. Cloudflare’s provider list includes OpenRouter, so a call can pass through Cloudflare and still be answered elsewhere. That keeps your analytics in one place and your model access in two.
If you choose to leave entirely, copy these before you do:
- Aliases and dynamic routes (dynamic routes have a JSON configuration view; write aliases down by hand).
- Cache TTLs and the keys you use with
cf-aig-cache-key. - Rate limit values and DLP profiles.
- Logs you still need (use Logpush before you remove the gateway).
- A map of model ids on the new service. The exit plan guide shows an alias map and a 30-minute drill, and the provider checklist lists twelve questions for the new one.
For a coding agent, the key point is whether the agent speaks Anthropic Messages or OpenAI format. Both gateways document both, so test with a cheap non-Claude model first. Our coding agent key guide covers Cline, Cursor, Codex CLI and Aider. A head-to-head with the closest comparable is in OpenRouter against One AI API Key and the OpenRouter comparison page.
Our own limits, stated plainly
We would rather you hear these from us. We have no guardrails product, no DLP, no BYOK, no visual routing and no response cache. Our status history is younger than Cloudflare’s and our team is small. Paid models are bought by email, which is slower than a card form, and online checkout is not open. Free models run on upstream providers we choose and monitor but do not host, and the list changes: the transparency page says what we can and cannot see. The model list can change, so keep a fallback id in config. We say this because a gateway you cannot leave is not a good deal at any price.
What we can offer is a quick way to find out. Make an account, send a free call, compare the usage count with your own, and read the bill after one priced request. If it behaves as described here, you have learned something; if it does not, email us with the details and we will look at it case by case.
Run the free tests on a gateway that is also the model source
$10 sign-up credit, 48 free models sharing 100 requests and 3,000,000 tokens a day, no card.