programcode

Review · LLM gateways

Cloudflare AI Gateway review

A hosted control plane with useful routing and observability primitives; check pricing, limits and data handling before production.

7.0/10ProgramCode score

We may earn a commission if you buy through links on this page. It never changes a score or a ranking. How we make money

The bottom line

A hosted gateway for multi-provider routing, caching and AI request logs, with pricing details to confirm.

Cloudflare AI Gateway sits between an AI application and model providers as a hosted control plane. It offers routing, caching, request logs, analytics, rate limiting and fallback configuration, with examples for Workers AI and the OpenAI SDK.

The product page says teams can start building for free, but Cloudflare does not publish AI Gateway-specific prices or billing terms. It is a practical option for teams already using Cloudflare; confirm usage costs, limits, data handling and migration needs before relying on it in production.

Good fit if

  • Teams already using Cloudflare
  • Apps calling multiple model providers
  • Developers who need request-level logs

Skip it if

  • Teams requiring self-hosted gateways
  • Buyers needing published pricing limits
  • Projects requiring documented data export
Cloudflare AI Gateway homepage
Cloudflare AI Gateway homepage, captured Nov 10, 2026

ScoresHow it rates

  • Features8
  • Ease of use8
  • Value for money7
  • Support5
  • User sentiment6

What works

  • Routes requests by latency, cost or availability
  • Caches frequent responses to reduce repeat calls
  • Logs prompts, responses, costs and token usage
  • Supports fallback routing and rate limiting
  • Works with OpenAI SDK and AI SDK

What doesn't

  • AI Gateway-specific prices and billing terms are not published
  • Rate-limit thresholds are not published
  • Source availability and license are not published
  • Self-hosting and data export are not documented
  • Retention and compliance details need confirmation

01What Cloudflare AI Gateway is, technically

Cloudflare AI Gateway is a hosted gateway and control plane that sits between an AI application and model-provider APIs. Instead of each application calling providers directly, requests can pass through a Cloudflare gateway endpoint, where teams can configure routing, caching, rate limiting and fallback behavior. The service also collects request logs and usage analytics.

That position in the stack makes it an operational layer, not a model, SDK or self-hosted proxy. Cloudflare describes routing by latency, cost or availability, and says rules can be adjusted from the dashboard or API without redeploying. Its logs can include prompts, responses, provider, status, token usage, cost and duration. The practical use is centralizing controls and visibility across provider calls. Teams still need to decide which providers and models to use, and should check how gateway behavior interacts with each provider's API and billing.

02Cloudflare AI Gateway API, SDKs and docs

The integration surface is an HTTP gateway endpoint: Cloudflare shows a curl request to https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id} and JavaScript examples for Workers AI and gateway configuration. A Wrangler JSONC example adds an AI binding to a Worker. For OpenAI-compatible calls, the example imports the openai package and sets its baseURL using env.AI.gateway(...).getUrl("openai").

Cloudflare says AI Gateway is compatible with the OpenAI SDK and AI SDK. The examples also show caching headers, fallback requests and methods such as patchLog and getLog for working with log records. The product page links to documentation and shows dashboard configuration. It does not name a CLI or a broader list of supported languages. Confirm SDK support, provider compatibility and endpoint-specific behavior in Cloudflare's docs before choosing an integration path.

03Cloudflare AI Gateway pricing for developers

Cloudflare's product page invites teams to start building for free, but the pricing page does not list AI Gateway-specific prices or billing terms. There is no published starting price, paid plan price, request allowance, token allowance, seat charge or overage rate to use for a production estimate. The free entry point is an advertised starting option, not a published quota with defined limits.

The homepage promotes unified billing and says teams can manage costs across providers through one gateway. It does not explain which charges are consolidated, how provider usage is billed, or whether gateway features add charges as request volume grows. Caching can reduce repeated provider calls, but savings depend on the application and cache behavior; it does not establish a gateway price. Before rollout, ask Cloudflare for the applicable billing model, free-tier limits, rate limits, cache-related charges, and any provider billing terms. Until those details are confirmed, compare the total expected cost with direct provider billing and other gateway options rather than assuming the free setup covers production use.

04Cloudflare AI Gateway: open source, self-hosting and lock-in

Cloudflare presents AI Gateway as a service running on its infrastructure, with requests sent to a Cloudflare gateway endpoint. Its product page does not publish a source-code license or describe a self-hosted edition, so teams should treat the documented deployment model as Cloudflare-hosted unless Cloudflare confirms otherwise.

The page describes logs and API methods for reading or updating individual log records, but it does not document bulk data export or a migration path. Moving away would mean changing the application’s gateway endpoint and replacing any Cloudflare-specific configuration, such as Workers AI bindings or logging calls. Provider-facing OpenAI-compatible requests may help keep some application code portable, but teams should test provider compatibility and preserve their own logs and routing configuration. Ask about export formats and deletion terms before routing sensitive traffic.

05Cloudflare AI Gateway in production

Cloudflare says the gateway runs on its global infrastructure and provides caching, fallback routing, rate limiting and security guardrails. Those are useful controls, but the product page does not publish gateway-specific request limits, availability targets, log retention periods or detailed compliance terms. Confirm thresholds, fallback behavior, streaming support, cache controls and incident handling against the requirements of your application.

Logs can contain prompts and model responses, so check what is retained, who can access it and whether sensitive fields can be filtered before sending production traffic. Security controls are advertised, but teams should verify how guardrails work for their providers and data flows. Reddit users describe routing Ollama calls through the gateway to inspect token usage and response time; another thread discusses using it with several OpenAI-compatible models. A separate comparison describes Cloudflare as quick to set up for teams already in its ecosystem. These are individual reports, not service guarantees.

From the threadsWhat users say

The available Reddit comments are limited but lean positive on setup and visibility, especially for Cloudflare users. They do not establish broad reliability or satisfaction across production deployments.

Quick in Cloudflare
Cloudflare is quick to set up if you're in their ecosystem
r/openziti · view thread
Usage visibility
Response caching — repeated prompts cost zero
r/CloudFlare · view thread
Routing experiments
I routed my Ollama API Call Cloudflare AI Gateway to see my token usage and response time
r/ollama · view thread
Gateway tradeoffs
the main tradeoff was pure open source routing vs knowing what your models are doing production
r/openziti · view thread

Questions people ask

What does Cloudflare AI Gateway do?

It sits between an AI application and model providers. Cloudflare describes routing requests by latency, cost or availability, caching responses, collecting usage analytics and logs, and configuring fallbacks, rate limiting and security guardrails. The goal is to centralize controls and visibility for provider calls.

Does Cloudflare AI Gateway have a free plan?

Cloudflare's product page says teams can start building for free. However, the pricing page does not publish AI Gateway-specific prices, usage allowances or billing terms. Confirm the free-tier limits and any production costs with Cloudflare before relying on the service.

Which SDKs and integrations does it support?

Cloudflare says AI Gateway is compatible with the OpenAI SDK and AI SDK. Its examples show JavaScript usage with Workers AI, a Wrangler JSONC configuration, and an HTTP request using curl. Check Cloudflare's documentation for support details and provider-specific behavior before integrating.

Can Cloudflare AI Gateway route requests to multiple providers?

Yes. Cloudflare describes a unified gateway for multiple providers, dynamic routing by latency, cost or availability, and fallback routing. Its examples show a request sequence with Workers AI and OpenAI. Confirm that the providers and model endpoints your application needs are supported.

Can I self-host AI Gateway or export its logs?

Cloudflare presents AI Gateway as a service on its infrastructure, and its product page does not describe a self-hosted edition. The page shows methods for reading and updating individual log records, but does not document bulk export. Ask Cloudflare about source availability, export formats and retention before deployment.

Sources

  1. Cloudflare AI Gateway homepage
  2. Cloudflare AI Gateway pricing page
  3. Reddit: Using Cloudflare AI Gateway & openobserve
  4. Reddit: We compared open source LLM gateways...
  5. Reddit: Added Cloudflare AI Gateway to my open source AI proxy
  6. Reddit: Route Ollama API through Cloudflare AI Gateway