Cloudflare AI Gateway
Cloudflare AI Gateway is a hosted proxy for model provider APIs that adds logging, analytics, caching, rate limiting and fallback.
What Cloudflare AI Gateway does
AI Gateway is a service on a Cloudflare account that an application calls instead of calling a model provider directly. Requests go to a gateway URL that names the account, the gateway and the provider, and Cloudflare forwards them to providers such as OpenAI, Anthropic, Google Gemini, Replicate or Cloudflare's own Workers AI.
In between it records analytics on requests, tokens and cost, and can log each request with its prompt, response, provider, status, token usage, cost and duration. It can serve repeated requests from cache, apply rate limits, retry a failed request and fall back to another model. Guardrails and data loss prevention scanning are optional extras.
With Unified Billing, provider usage is paid for through Cloudflare credits and appears on one Cloudflare bill. Logs can be exported with Logpush, which every AI Gateway customer can use and which is billed by the volume exported.
Cloudflare AI Gateway: owner, license and hosting
| Fact | Value | Source and date checked |
|---|---|---|
| Owner | Cloudflare, Inc. | SOURCE ↗ |
| License | Proprietary hosted service. The docs publish no source code or license for it. | SOURCE ↗ |
| Self-hosting | No. The docs describe it only as a service on a Cloudflare account, reached at gateway.ai.cloudflare.com. | SOURCE ↗ |
| Hosted regions | No region list is stated. Cloudflare's data localization table marks Regional Services as unsupported for AI Gateway and jurisdictional restrictions on log storage as unsupported. | SOURCE ↗ |
Each value was read from the vendor's own page on the date shown. How listings are checked
Cloudflare AI Gateway plans and prices
Cloudflare AI Gateway pricing, checked on . Lowest paid plan: Workers Paid, a minimum charge of $5 a month for the account. Free tier: Available on all plans. Core features (dashboard analytics, caching, rate limiting) are free; log storage follows Workers Logs pricing and retention. Pricing model: Core features are free. Log storage follows Workers Logs pricing, Logpush exports are billed by Logpush pricing on the volume exported, Guardrails is billed as Workers AI inference, and Unified Billing adds a 5% fee on credits.
| Plan | Price | Included usage | Beyond that | Data retention | Users |
|---|---|---|---|---|---|
| Workers Free, until 30 November 2026 | $0 | Workers Logs: 200,000 log events a day | – | 3 days | – |
| Workers Paid, until 30 November 2026 | $5 a month minimum | Workers Logs: 20 million log events a month | $0.60 per additional million log events | 7 days | – |
| Free, from 1 December 2026 | $0 | 0.5 GB of logs ingested a day | None: no more logs are taken in until 00:00 UTC | 7 days | – |
| Paid, from 1 December 2026 | $5 a month minimum | 50 GB of logs ingested and 10 GB-month stored per billing cycle | $0.25 per GB ingested, $0.10 per GB-month stored | 7 days | – |
AI Gateway has no plans of its own: it is available on all Cloudflare plans, and the rows are the Workers plans its pricing page refers to. Core features (dashboard analytics, caching, rate limiting) are free, and data loss prevention scanning is free on all plans. For accounts that created their first gateway on or after September 24, 2026, log storage follows Workers Logs pricing and retention; the log event allowances, the $0.60 rate and the retention periods in the rows are from Cloudflare's Workers Logs page, and the $5 minimum is from the Workers pricing page. Workers Logs takes at most 5 billion logs per account a day; past that, a 1% sample is applied for the rest of the day. Accounts that created a gateway before that date use Legacy Logs: 100,000 logs in total across all gateways on Workers Free and 10,000,000 logs per gateway on Workers Paid, kept until deleted. Logpush is available to all AI Gateway customers and is billed by Logpush pricing, on the volume of logs exported and transformed. From December 1, 2026, Cloudflare's Workers Logs page says Workers Logs will use Cloudflare Observability pricing, which lists AI Gateway logs among what it covers; the last two rows are from that pricing page. It measures logs in GB ingested and GB-month stored, shared across an account's logs and traces, and calls its plans Free and Paid. Guardrails is billed as Workers AI token-based inference. Unified Billing passes provider inference prices through with no markup and applies a 5% fee to credits purchased.
As stated on the vendor's pricing page on . A dash means the page does not say.
Cloudflare AI Gateway pricing history
The pricing page has been checked daily since . No price change has been recorded since then.
Where Cloudflare AI Gateway fits
Teams already on Cloudflare that want a proxy in front of several model providers without running one: analytics, caching and rate limiting are free on every plan, and paid use starts at the $5 a month Workers Paid minimum.
Limits of Cloudflare AI Gateway
It cannot be self-hosted and is not open source. Stored logs follow Workers Logs retention, 3 days on Workers Free and 7 days on Workers Paid, so it is not a long-term trace store unless logs are exported with Logpush. From 1 December 2026 the logs move to Cloudflare Observability pricing, which keeps them seven days by default and, on the free plan, stops taking in logs for the rest of the day after 0.5 GB. Cloudflare's data localization table lists Regional Services as unsupported for AI Gateway and jurisdictional restrictions on log storage as unsupported. Unified Billing adds a 5% fee on credits bought.
Alternatives to Cloudflare AI Gateway
-
LiteLLM
LiteLLM is an open-source Python SDK and self-hosted gateway that calls many language model providers through the OpenAI API format.
-
OpenRouter
OpenRouter is a hosted API that routes requests to language models from many providers through one endpoint and one prepaid credit balance.
-
Portkey
Portkey is a hosted gateway for language model requests with logging, prompt management and guardrails, built on an MIT-licensed gateway.