Cloudflare AI Gateway Alternatives

AI gateway that runs on Cloudflare's network

Edge gatewayHosted (Cloudflare)Core features freePart of CloudflareAvailable on all plans24 provider-native integrations
Visit website

What is Cloudflare AI Gateway?

Cloudflare AI Gateway is a gateway that sits in front of your AI provider calls on Cloudflare's network, giving you visibility and control over AI apps. It is available on all Cloudflare plans, and its core features, dashboard analytics, caching and rate limiting, are free. It supports 24 provider-native integrations including Workers AI, OpenAI, Anthropic, Google Vertex AI, Amazon Bedrock, Groq and Mistral, an OpenAI-compatible chat completions endpoint, and a Workers binding.

Caching is exact-match: it is off by default, keyed on a hash of the provider, model and full request body, with a TTL from 60 seconds to a month. Rate limiting is configured per gateway with fixed or sliding windows and returns 429 when exceeded. Dynamic routing lets you build versioned routes with conditional, percentage, rate-limit and budget-limit nodes, and guardrails evaluate prompts and responses with Llama Guard and are billed as Workers AI inference.

Unified Billing lets you pay for third-party model usage through Cloudflare with a 5% fee on credits purchased. Its limits are documented: caching covers text and image responses only, semantic caching is only planned, dynamic routes accept the OpenAI chat completions shape, and AI Gateway API tokens cannot be restricted to a single gateway.

Key features

Core capabilities this platform advertises.

  • Runs on Cloudflare's network and is available on all plans
  • Exact-match caching with TTLs from 60 seconds to one month, plus per-request cache headers
  • Rate limiting with fixed or sliding windows per gateway
  • Dynamic routing with conditional, percentage, rate-limit and budget-limit nodes, versioned with instant rollback
  • Guardrails that evaluate prompts and responses and flag or block, using Llama Guard
  • Request logs with prompt, response, tokens, cost and duration, with Logpush export
  • Unified Billing, BYOK through Secrets Store and spend limits per gateway
  • 24 provider-native integrations plus an OpenAI-compatible endpoint

Strengths and tradeoffs

What this tool does well, and the limitations to keep in mind.

Pros

  • Core features are free and fit naturally into an existing Cloudflare setup
  • Edge deployment close to your users
  • Flexible dynamic routing for A/B tests, paid vs free tiers and gradual rollouts
  • Cloudflare One DLP profiles for sensitive data

Cons

  • Tied to a Cloudflare account and network
  • Caching is exact-match only for text and image responses; semantic caching is only planned
  • Unified Billing adds a 5% fee on credits, and the balance can go negative
  • API token permissions cannot be restricted per gateway

Plans & pricing

What's included in each plan, and how the tiers compare.

Workers Free

$0

Core features free

  • Dashboard analytics, caching and rate limiting
  • 100,000 logs total on legacy gateways
  • Available on all plans

Workers Paid

$5

Per month · Cloudflare plan

  • 10 million logs per gateway on legacy gateways
  • Logpush export billed separately
  • Unified Billing with a 5% fee on credits

Enterprise

Custom

Contact your account team

  • Confirm pricing with Cloudflare
Fee on tokens: None on the gateway; 5% fee on Unified Billing credits
View pricing

Common use cases

Cloudflare users who want to add AI gateway capabilities to their existing edge infrastructure.

  • Edge caching for repeated AI API calls
  • Rate limiting AI usage per user, project or team
  • Routing paid and non-paid users to different models
  • A/B tests and gradual rollouts of new models
  • Cost management and logging across multiple providers

Cloudflare AI Gateway and Spro

Both are LLM gateways, with different strengths. Here is how they fit.

Where Spro can help

  • Use Spro when you want a hosted gateway that is not tied to a Cloudflare account
  • Get semantic caching, guardrails and trace grouping in the gateway itself
  • Pay provider prices on tokens with 0% markup instead of a 5% credit fee
  • Keep one OpenAI-compatible endpoint for Chat Completions, Responses and Anthropic Messages

Where Cloudflare AI Gateway is stronger

  • Core features are free and fit naturally into an existing Cloudflare setup
  • Edge deployment close to your users
  • Flexible dynamic routing for A/B tests, paid vs free tiers and gradual rollouts
Read the full Spro vs Cloudflare AI Gateway comparison

Cloudflare AI Gateway integrations

Tools, SDKs and platforms that Cloudflare AI Gateway works with.

Workers AIOpenAI SDKVercel AI SDKCloudflare One DLPLogpushSecrets StoreVectorize

Cloudflare AI Gateway FAQs

Common questions about Cloudflare AI Gateway.

0% markup on tokens

See how Spro compares

Spro is an OpenAI-compatible gateway with failover, caching, guardrails and tracing built in, 0% markup on tokens and a free trial, so you can test it with your own traffic before deciding.

  • Failover
  • Caching
  • Guardrails
  • Tracing

Best Cloudflare AI Gateway alternatives & competitors

Top LLM gateways you can use instead of Cloudflare AI Gateway.

Compare Cloudflare AI Gateway

Side-by-side comparisons with other gateways.

Route every AI request through SPRO.

One OpenAI-compatible API for 350+ models, with intelligent routing, 29 built-in guardrails, observability, and automatic failover.

Talk to sales