Skip to content
BYOK Tools

Comparison

Cloudflare AI Gateway vs LiteLLM

Both let you bring your own API key and both support OpenAI, Anthropic, Google Gemini. Differences below.

Cloudflare AI Gateway

Edge proxy that adds caching, rate limits and logs to your provider keys.

LiteLLM

Open-source gateway that calls 100+ LLMs with one OpenAI-style API.

Editor score4.4 / 54.5 / 5
CategoryLLM Gateways & RoutersLLM Gateways & Routers
PricingFreemium · Core features free on all Cloudflare plansOpen source · Free & open source; enterprise tier
PlatformsWebSelf-hosted, CLI
ProvidersOpenAI, Anthropic, Google Gemini, OpenRouter, Mistral, Groq, DeepSeek, xAI, Azure OpenAI, AWS Bedrock, Perplexity, CohereOpenAI, Anthropic, Google Gemini, OpenRouter, Mistral, Groq, DeepSeek, xAI, Ollama, Azure OpenAI, AWS Bedrock, Perplexity, Together AI, Cohere, OpenAI-compatible
Open sourceNoYes
Self-hostableNoYes
Local modelsNoYes
Key storageVendor serversVendor servers
Strengths
  • Nothing to host
  • Generous free tier
  • Global edge network
  • Makes any app multi-provider
  • Team cost control
Drawbacks
  • Closed source
  • Ties you to the Cloudflare dashboard
  • Another service to operate

The verdict

LiteLLM scores higher overall.

Choose Cloudflare AI Gateway if you want nothing to host on Web.

Choose LiteLLM if you want makes any app multi-provider on Self-hosted, CLI.

If auditability matters, LiteLLM is open source and can be inspected end-to-end.

Cloudflare AI Gateway vs LiteLLM: FAQ

Is Cloudflare AI Gateway or LiteLLM better?
LiteLLM has the higher editor score (4.5 vs 4.4). The better choice depends on platform, provider and pricing needs; see the table above.
Which is cheaper, Cloudflare AI Gateway or LiteLLM?
Cloudflare AI Gateway is freemium (Core features free on all Cloudflare plans). LiteLLM is open source (Free & open source; enterprise tier). With both, model usage is billed separately by your API provider.
Which handles API keys more safely?
LiteLLM scores higher on the BYOK Tools Key Safety Score (78 vs 28 out of 100).
Do Cloudflare AI Gateway and LiteLLM support the same AI providers?
Both support OpenAI, Anthropic, Google Gemini, OpenRouter, Mistral, Groq, DeepSeek, xAI, Azure OpenAI, AWS Bedrock, Perplexity, Cohere.
Can Cloudflare AI Gateway or LiteLLM run local models?
Only LiteLLM supports local models.