Gateways & routers
Cloudflare AI Gateway
Drop-in proxy that adds caching, rate limiting, and analytics to provider calls from Cloudflare’s edge.
Visit developers.cloudflare.com ↗
- Category
- Gateways & routers
- Pricing
- Free tier
- Runs
- Hosted
- Interface
- API, Dashboard
- Source
- Proprietary
What Cloudflare AI Gateway is
Cloudflare AI Gateway is a proxy you enable by changing the base URL of your existing provider calls — no SDK change, no code restructuring. It adds caching, rate limiting, request logging, and cost analytics at the edge, and is the lowest-effort way to get visibility into what your application is spending.
Best for
Adding caching and cost visibility to calls you already make, especially if you are on Cloudflare already.
Consider something else if
It is closer to a smart proxy than a full router; cross-provider failover and per-key budgets are not its focus.
Cloudflare AI Gateway alternatives
The closest options in gateways & routers, on the axes that actually separate them.
| Tool | Best for | Pricing | Runs |
|---|---|---|---|
| Cloudflare AI Gateway | Adding caching and cost visibility to calls you already make, especially if you are on Cloudflare already. | Free tier | Hosted |
| OpenRouter | Trying many models quickly, or shipping something that must keep working when a single provider degrades. | Usage-based | Hosted |
| LiteLLMopen source | Teams that want gateway behaviour — budgets, key management, failover — without adding a third-party service to the request path. | Open source | Hosted or self-hosted |
| Portkeyopen source | Teams that want routing and request-level tracing from one system instead of integrating a gateway and an observability tool separately. | Free tier | Hosted or self-hosted |
Choosing within gateways & routers
Hosted or self-hosted
A hosted gateway is another service in your critical path — when it is down, you are down. A self-hosted proxy keeps the failure domain yours but is now yours to run. Some options offer both; pick before you build around one.
What it costs you in latency
Every gateway adds a network hop. That is usually single-digit milliseconds and irrelevant next to generation time, but it matters for high-volume classification where the model call itself is short.
Questions
What is Cloudflare AI Gateway?
Cloudflare AI Gateway is a proxy you enable by changing the base URL of your existing provider calls — no SDK change, no code restructuring. It adds caching, rate limiting, request logging, and cost analytics at the edge, and is the lowest-effort way to get visibility into what your application is spending. It is a commercial product and hosted.
What are the alternatives to Cloudflare AI Gateway?
The closest alternatives are OpenRouter, LiteLLM, Portkey. They sit in the same category — gateways & routers — and differ mainly on hosting model, pricing shape, and how much they abstract away.
Is Cloudflare AI Gateway the right choice?
Adding caching and cost visibility to calls you already make, especially if you are on Cloudflare already. The main caveat: It is closer to a smart proxy than a full router; cross-provider failover and per-key budgets are not its focus.
Whatever you build on, the model is the line item that scales. See what each one costs per million tokens, or price your own workload.