Cloudflare AI Gateway is easy to adopt because the core product costs nothing and sits in front of providers you already use. Analytics, caching and rate limiting are free on every plan, and the first integration is close to a base URL change. That is a strong default for a team already on Cloudflare.
The reason to replace it is rarely the price of the gateway itself. It is the shape of the control you need: multi-provider failover with a single bill, self-hosted keys and budgets, or an origin that can run inside your own network. Those are different products, and only some of them are gateways.
| Option | Best for | Pricing model | Deployment | Notable limit |
|---|---|---|---|---|
| Cloudflare AI Gateway | Free analytics, caching and rate limits on the edge | Core features free; 5% fee on Unified Billing credits; logs and Logpush billed by usage | Cloudflare-hosted | Control layer only; model access depends on your provider keys |
| Vercel AI Gateway | One bill and failover across 400+ models | No markup and no platform fee on tokens; free tier; paid credits; add-ons priced per request | Vercel-hosted | Strongest fit if Vercel is already your platform |
| OpenRouter | Widest catalogue and provider fallback | Provider list price plus 5.5% Standard or 8% Business fee on credit purchases | Hosted | Retention and regional routing vary by upstream provider |
| LiteLLM | Self-hosted gateway with keys, budgets and audit | Open source; enterprise licence for SSO, audit logs and support | Self-hosted | You operate the proxy, database and upgrades |
| Plugsky | Flat-rate model access with a private deployment boundary | $20, $60 or $120 per month; private deployment by contract | Public API, VPC, on-premises, air-gapped | An API, not a multi-provider gateway |
What Cloudflare AI Gateway is, and is not
The product is a request path with observability attached. It records requests, tokens and cost, caches responses, enforces rate limits, retries and falls back across models, and can run guardrails. It supports Workers AI, Anthropic, Google Gemini, OpenAI, Replicate and others. For a small team, that is most of what a gateway needs to do.
It is not a model seller. You bring provider keys, and the gateway sits between your application and those providers. Unified Billing is the exception: Cloudflare can sell credits, and it applies a 5% fee to purchases. Inference itself is passed through at provider rates.
The limits are administrative as much as technical. Accounts whose first gateway was created before 24 September 2026 use Legacy Logs, with 100,000 logs total on Workers Free and 10,000,000 logs per gateway on Workers Paid. Newer accounts follow Workers Logs pricing and retention. DLP scanning is free with two predefined profiles, guardrails are billed as Workers AI inference, and Logpush exports are billed by volume. A buyer who assumes everything after the free core is also free will be surprised by the first invoice.
How to compare the shortlist
Name the job before you compare the feature grid. If the job is observability and a cache in front of one provider, Cloudflare is hard to beat on entry cost. If the job is one contract across many models, a gateway that resells tokens, such as Vercel or OpenRouter, removes more work. If the job is internal chargeback with self-hosted keys, LiteLLM is the closer fit.
Then price the control plane, not just the token. Vercel charges no markup on tokens but bills add-ons per request: a team-wide provider allowlist and team-wide zero data retention are each $0.10 per 1,000 requests, regional hosting is 5% of inference cost, and trace drains are metered separately. OpenRouter's fee is charged when you buy credits, not per request. LiteLLM's licence is a quote, but your engineering time is the larger cost.
- List every provider and model the gateway must reach, including self-hosted endpoints.
- Decide whether logs must be exportable to your own SIEM and for how long.
- Test failover with a provider key that is deliberately revoked.
- Model the add-on fees at your request volume, not at a demo volume.
Migration notes
Many gateways accept an OpenAI-compatible request, but the base URL, auth header and model naming differ. Keep a per-environment key and a per-provider key so a rollback does not require reissuing everything. If you use caching, the cache key usually includes the model, prompt and parameters; confirm how each gateway handles a cached response after a provider changes a model version.
Export the old logs before you switch. Cloudflare's log retention depends on account age and plan, and a new gateway will not backfill history. For chargeback, reconcile one full billing cycle in parallel: run the same traffic through both paths for a sample of keys and compare token counts, not just totals.
- Pilot one low-risk application, not the whole estate.
- Keep the old gateway in the DNS or base-URL path for a rollback window.
- Verify rate-limit behaviour: a 429 from the gateway and a 429 from the provider are different failures.
- Document which team owns the gateway configuration.
When a competitor wins
Cloudflare wins when you are already on Workers or the Cloudflare edge and the requirement is free analytics, caching and simple limits. The operational cost is low, the integration is short, and Unified Billing is optional. It also wins when you want a control layer without moving your model contracts.
Vercel AI Gateway wins when you are building on Vercel or the AI SDK and want one bill across 400+ models with no token markup. Its failover, virtual models, ZDR routing and regional inference are aimed at application teams that want routing in the same platform as deployment. The trade-off is platform gravity: the add-ons and the best experience assume Vercel.
OpenRouter wins when catalogue breadth is the point. It lists 600+ models from 80+ providers, supports data-policy routing and offers EU or US in-region routing on Business and Enterprise. A team that wants to compare models weekly will get more from OpenRouter than from a gateway tied to one cloud.
LiteLLM wins when the gateway must run inside your network. It is open source, supports 100+ providers, and adds virtual keys, budgets, MCP and agent routing. Enterprise adds SSO, audit logs and multi-region deployment. The cost is that you own the database, upgrades and on-call rota.
Plugsky wins when the real goal is to remove a layer, not replace it. It sells 39 model IDs through one OpenAI-compatible API, with flat $20, $60 or $120 plans and private VPC, on-premises or air-gapped deployment by contract. It can sit behind a gateway, but it is not a substitute for multi-provider routing.
Verdict
Keep Cloudflare AI Gateway if free edge analytics, caching and rate limits are enough. Choose Vercel for one bill and failover across a large catalogue, OpenRouter for the widest model choice, LiteLLM for a self-hosted control plane, or Plugsky when you want a flat bill and a private boundary instead of another routing layer.
Whatever you choose, test revocation and log export before production. A gateway that cannot prove which key made which request is a shared credential with a dashboard.
Frequently asked questions
Is Cloudflare AI Gateway free?
Core features such as dashboard analytics, caching and rate limiting are free on all plans. Logs, Unified Billing credits, guardrails and Logpush exports have their own pricing and limits.
Does Cloudflare AI Gateway store my prompts?
It can store request logs, with retention and volume depending on the logging system and plan. Check the log limits and deletion options before sending sensitive prompts.
Can I use Cloudflare AI Gateway with OpenAI?
Yes. It supports OpenAI along with Anthropic, Google Gemini, Workers AI, Replicate and other providers. You bring the provider key.
What is the best self-hosted alternative?
LiteLLM is the closest fit for a self-hosted gateway with virtual keys, budgets and audit. It is open source, and enterprise features are licensed separately.
Is Plugsky a gateway?
No. It is an OpenAI-compatible model API with flat monthly plans and private deployment. It can sit behind a gateway, but it does not provide multi-provider routing itself.
Related
Sources
- Cloudflare AI Gateway overview · 23 Nov 2026
- Cloudflare AI Gateway pricing · 23 Nov 2026
- Vercel AI Gateway pricing · 23 Nov 2026
- OpenRouter pricing · 23 Nov 2026
- LiteLLM documentation · 23 Nov 2026