Cloudflare AI Gateway alternatives: hosted and self-hosted options
Cloudflare AI Gateway is free to start and runs on Cloudflare's edge. If you need self-hosting, per-user budgets or your own GPUs, here are 5 alternatives.
Cloudflare AI Gateway sits on Cloudflare's network and gives you analytics, logging, caching, rate limiting and model fallbacks, with core features free on every plan. Teams look for alternatives when requests must stay inside their own network, when they need budgets per person rather than per gateway, or when they want their own GPUs in the routing. The main options are Vercel AI Gateway and OpenRouter (hosted), and LiteLLM, Kong AI Gateway and AI Gateway by LayerX (self-hosted).
Facts checked between 27 November and 3 December 2026.
What Cloudflare AI Gateway does well
According to Cloudflare's docs:
- Free core features on all plans: analytics on requests, tokens and cost, caching and rate limiting.
- Response caching at Cloudflare's edge, so repeated requests don't hit the provider again.
- Routing with model aliases, dynamic routes, retries and fallbacks.
- Providers including Workers AI, OpenAI, Anthropic, Google Gemini and Replicate.
- Guardrails using Llama Guard on Workers AI, billed as inference, and free DLP scanning (pricing).
Why teams look for an alternative
- It's hosted on Cloudflare. Requests pass through Cloudflare's network before reaching the provider.
- Logging limits and pricing changed. Accounts that created their first gateway on or after 24 September 2026 store logs in Workers Logs and pay its prices; older accounts keep the legacy limits (pricing).
- Unified Billing has a fee. Buying model credits through Cloudflare adds 5%; a $100 top-up costs $105.
- People, not just apps. Its rate limiting controls how many requests reach a gateway. If you need each employee to have their own key, token budget and model list, you'll want a gateway built around users.
- Your own GPUs. If you serve models on your own vLLM or Ollama servers, those servers sit in your network, not on Cloudflare's.
The alternatives at a glance
| Alternative | Runs where | Cost model | Best for |
|---|---|---|---|
| Vercel AI Gateway | Hosted by Vercel | No markup or platform fee on tokens | Budgets per key or team member, many API formats |
| OpenRouter | Hosted | 5.5% fee on credits; BYOK free up to $25,000 a month | The biggest model catalogue |
| LiteLLM | Your servers | Open source; paid Enterprise | Widest provider coverage, self-hosted |
| Kong AI Gateway | Your data planes, managed through Konnect | Konnect Plus from $25/month plus usage | Companies already running Kong |
| AI Gateway by LayerX | Your servers, or managed by LayerX | Commercial licence | Your own GPUs first, budgets per person |
Hosted alternatives
Vercel AI Gateway
A hosted API you can call from any cloud, with no markup on tokens, including BYOK. It accepts OpenAI Chat Completions, OpenAI Responses and Anthropic Messages formats. Budgets can be set per team, project, API key or team member, and request logs show provider attempts, latency, tokens and cost (Vercel docs). Full-response caching is left to your application. Compared in Vercel AI Gateway vs Cloudflare AI Gateway.
OpenRouter
One key for 400+ models with no markup, and a 5.5% fee on credit purchases. Prompt logging is opt-in and you can enforce zero-data-retention routing (OpenRouter FAQ). See OpenRouter vs Cloudflare AI Gateway.
Self-hosted alternatives
LiteLLM
The most used open-source gateway: 100+ providers, virtual keys, budgets and rate limits per key, user and team, spend tracking and an admin UI in the free version (LiteLLM). Caching and a guardrails framework are included. It needs Postgres, and Redis at scale. Pin versions after the 2026 supply-chain incidents (what happened). See Cloudflare AI Gateway vs LiteLLM.
Kong AI Gateway
Kong's AI Gateway 2.x is managed through Konnect, with data planes running in your environment, on Kubernetes or as Kong-hosted dedicated gateways. It covers LLM, MCP and agent-to-agent traffic, with semantic caching, token budgets per consumer group, PII sanitising and prompt guards (Kong docs). A strong fit if you already run Kong for your APIs. See Kong AI Gateway alternatives.
AI Gateway by LayerX
For companies that run their own models as well as buying tokens. AI Gateway puts your vLLM or Ollama servers and vendors like OpenAI, Groq, Together and OpenRouter behind one OpenAI-compatible endpoint, sends requests to your GPUs first and moves to vendors when needed. Admins invite people by email; each person gets their own keys, daily and monthly token budgets and allowed models. Prompts and responses are never stored. It has no caching or guardrails, and supports OpenAI-compatible providers only. See AI Gateway vs Cloudflare AI Gateway.
Which one should you pick?
- You want hosted, with budgets per key or person: Vercel AI Gateway.
- You want the most models behind one key: OpenRouter.
- Requests must stay in your network: LiteLLM.
- You already run Kong: Kong AI Gateway.
- You run your own GPUs and want each person on their own budget: AI Gateway.
- You're on Cloudflare and caching matters most: stay. It's free to start and does that well.
Questions
Is Cloudflare AI Gateway free?
Its core features, including analytics, caching and rate limiting, are free on all plans. Log storage, Logpush, guardrails inference and credits bought through Unified Billing (5% fee) can cost money.
Can I self-host Cloudflare AI Gateway?
No. It runs on Cloudflare's network. For a self-hosted gateway, look at LiteLLM, Kong AI Gateway or AI Gateway by LayerX.
What's the best Cloudflare AI Gateway alternative for privacy?
A self-hosted gateway, so requests don't pass through another company's network before they reach the model provider. If you also serve models on your own GPUs, that traffic never leaves your network at all.
Does Cloudflare AI Gateway support Anthropic?
Yes. Anthropic is one of its supported providers, along with OpenAI, Google Gemini, Workers AI and others.