LiteLLM vs Cloudflare AI Gateway

Both are llm gateways tools. Here is how they actually differ on price, billing model and deployment.

LiteLLM Cloudflare AI Gateway
Category LLM Gateways LLM Gateways
Our rating 5/5 4/5
Starting price $0 self-hosted $0
Billing meter No usage metering record
Free plan Yes Yes
Free self-hosting Yes, free No or paid tier only
Best for Teams with engineering capacity that want provider-agnostic routing with no per-token markup, particularly at volumes where a percentage fee on a managed gateway becomes significant. Teams already on Cloudflare who want caching, rate limiting and cost visibility at the edge with no markup, and who have separate tooling for evaluation.

Our verdict on LiteLLM

LiteLLM is the default open-source LLM gateway and deserves to be. It is MIT licensed, fronts 100+ providers behind an OpenAI-compatible endpoint, and takes no markup on your tokens - which is the decisive difference at any real volume, because managed alternatives charge a percentage of everything you spend forever. Adopting it is largely a base URL change, and so is leaving, which is an unusually honest position for infrastructure to be in. The cost is operational rather than financial. You run the proxy, the database, the monitoring and the upgrades, which realistically means a few hundred dollars a month of infrastructure and a person who owns it. Releases are frequent enough that pinning to stable versions is advisable. The one genuinely unsatisfying part is enterprise pricing, where third-party sources disagree so wildly - from $250 a month to around $30,000 a year - that none of them can be trusted, and enterprise SSO being free only up to five users means identity management turns into a commercial conversation sooner than you might expect.

Full LiteLLM review →

Our verdict on Cloudflare AI Gateway

Cloudflare AI Gateway is the best free managed gateway available, and the reason is that Cloudflare is not trying to make money from it directly. Core features - dashboard analytics, caching, rate limiting - are free on every plan, there is no percentage markup on your tokens, and the free tier includes 100,000 logs a month with the $5 Workers Paid plan lifting that to a million. Compare OpenRouter charging 5.5% of everything you spend forever, and the difference at volume is substantial. Running at the edge is a genuine architectural advantage too, putting the control plane near your users rather than in one region. The 2026 addition of unified billing, letting you pay for OpenAI, Anthropic and Google AI Studio usage through a single Cloudflare invoice, removes procurement friction that is more annoying in practice than it sounds. Two honest limits. The metering is logs, not requests, so that is the number to model. And observability stops at request metrics and cost - there is no structured evaluation, so this is one component of a stack rather than the stack.

Full Cloudflare AI Gateway review →
These two meter differently, so published prices are not comparable. Model both against your own workload →

Frequently Asked Questions

What is the main difference between LiteLLM and Cloudflare AI Gateway?

LiteLLM: Teams with engineering capacity that want provider-agnostic routing with no per-token markup, particularly at volumes where a percentage fee on a managed gateway becomes significant. Cloudflare AI Gateway: Teams already on Cloudflare who want caching, rate limiting and cost visibility at the edge with no markup, and who have separate tooling for evaluation. Both sit in LLM Gateways, so the decision usually comes down to billing model and deployment rather than raw capability.

Which is cheaper, LiteLLM or Cloudflare AI Gateway?

It depends entirely on your workload shape, because they meter differently - LiteLLM bills on no usage metering and Cloudflare AI Gateway bills on record. Published starting prices are $0 self-hosted and $0 respectively, but those numbers are not comparable until you apply them to the same traffic. Use our cost calculator to model both against your own request volume and span count.

Can I self-host LiteLLM or Cloudflare AI Gateway?

LiteLLM: Yes, free. Cloudflare AI Gateway: No or paid tier only. Free self-hosting means no licence fee, not no cost - you still own the infrastructure, upgrades and on-call.