Skip to main content

Cloudflare AI Gateway — What the Free Tier Includes

Cloudflare AI Gateway is an observability and control layer placed between your application and AI providers (OpenAI, Anthropic, Gemini, Workers AI, Replicate, etc.). Pointing provider API calls at the gateway — a one-line code change — gives you analytics, caching, rate limiting, and fallback.

It is available on all plans, and the core features are free. The only meaningful free-tier boundary is log storage volume, so small to medium AI apps can effectively run at no cost.


Features included for free​

FeatureDescription
AnalyticsDashboard visibility into request counts, token usage, and cost
LoggingStored logs of requests and errors (limits below)
CachingServe responses from Cloudflare's cache instead of re-calling the provider — cuts both latency and provider billing
Rate limitingCap incoming request volume
Retry / model fallback (dynamic routing)Automatic retries and failover to another model or provider on error
DLPData loss prevention scanning — free on all plans (2 predefined profiles without a Zero Trust subscription)
LogpushExport logs to external destinations (R2, S3, etc.). The feature is free; exported volume is usage-billed
Combining with Workers AI

Workers AI can be a routing destination behind the gateway. Workers AI itself offers 10,000 Neurons/day free, so the two free tiers combined let you build an AI app PoC at near-zero cost.


Free-tier limits​

Gateways and caching​

ItemLimit
Gateways10 per account
Gateway name64 characters
Cacheable requestup to 25 MB per request
Cache TTLup to 1 month
Custom metadata5 entries per request

Rate limiting​

  • Unified Billing throttle: 200 requests per 60 seconds per gateway, returning 429 when exceeded.
  • Applies only to Cloudflare-managed credentials, not BYOK (your own provider API keys).

Log storage — the real free-tier boundary​

Logs are where AI Gateway consumes resources, and the rules depend on when your account created its first gateway (rules changed September 24, 2026).

RegimeApplies toFree plan limits
Legacy LogsAccounts that created their first gateway before 2026/09/24100,000 logs total across all gateways (10 MB per log, 500 logs/sec per gateway)
Workers LogsAccounts creating their first gateway on/after 2026/09/24200,000 events/day, 3-day retention

Upgrading to Workers Paid ($5/month) raises this to 10,000,000 logs per gateway (Legacy Logs) or 20 million events/month ($0.60 per additional million) under Workers Logs. For long-term retention, export via Logpush.

Another pricing change ahead

Workers Logs pricing is scheduled to move under Cloudflare Observability pricing on December 1, 2026. If you are creating a new gateway, check the current pricing page.


Items billed separately​

Three things fall outside the free tier:

ItemBilling
GuardrailsBilled as Workers AI token-based inference (depends on prompt + response length)
LogpushBilled by exported/transformed log volume
Unified Billing5% fee on credit purchases (e.g. $105 for $100 of credits). Provider inference rates pass through without markup

Summary​

  • Core features (analytics, caching, rate limiting, fallback, DLP) are free on all plans.
  • The free tier is bounded only by log storage: 100,000 logs for legacy accounts, or Workers Logs (200k events/day, 3-day retention) for gateways created on/after 2026/09/24.
  • Billing risks are limited to four items: log volume overage, Guardrails, Logpush export volume, and the 5% Unified Billing credit fee.
  • Provider inference costs still apply — the gateway adds no markup of its own.

References​