πΊπΈ USA Β· Cloudflare AI Gateway
Status: π© COMPLETE π¦ LIVING Last updated: 2026-06-26 Plain-English tagline: A proxy that sits between your app and AI providers (OpenAI, Anthropic, Google, etc.) β giving you central observability, caching, rate-limiting, and cost-tracking across all your AI calls. Free.
Front-matter facts
| Field | Value |
|---|---|
| Vendor | Cloudflare Inc (San Francisco, USA) |
| Country / origin | πΊπΈ USA |
| Recommended for Australian users? | β Yes β Cloudflare global edge incl AUS |
| Privacy summary | Cloudflare proxies but doesnβt train on data; underlying providerβs privacy posture applies for the actual AI work |
| Free tier | Yes β completely free (Cloudflareβs positioning) |
| Paid tiers | None separately β bundled with Cloudflare account |
| First released | 2024 |
| Last reviewed | 2026-06-26 |
| Official site | https://developers.cloudflare.com/ai-gateway |
What it is
Cloudflare AI Gateway is a proxy / observability layer that sits between your app and AI providers (OpenAI, Anthropic, Google, Mistral, Cohere, Hugging Face, Replicate, Groq, etc.). Instead of calling provider APIs directly, you call AI Gateway, which forwards to the provider.
Benefits:
- Central observability β see all your AI calls across providers in one dashboard
- Cost tracking β actual spend across multiple AI vendors
- Caching β cache identical requests (saves money on repeated queries)
- Rate limiting β per-app / per-user rate limits
- Fallback β if one provider is down, route to another
- Logging / replay β capture requests for debugging
- No vendor lock-in β same Gateway works with any provider
Why Cloudflare offers this free: it nudges developers into the Cloudflare ecosystem; Cloudflare upsells Workers AI, R2, D1, Vectorize, etc. once youβre already using their account.
What youβd use it for
- Multi-provider AI app with central monitoring
- Cost tracking across multiple AI APIs
- Caching identical / similar requests to save money
- Rate limiting per-user / per-app
- A/B testing between providers (route X% to Claude, Y% to GPT)
- Fallback when a provider has an outage
- Centralised logging for AI work
- Personal projects wanting cost visibility
How to use from Australia
- Cloudflare account (free)
- Dashboard β AI β AI Gateway β Create Gateway
- Get the Gateway URL β something like
https://gateway.ai.cloudflare.com/v1/{account-id}/{gateway-name}/openai - Replace provider URL in your code with Gateway URL
- Calls now flow through Cloudflare; visible in dashboard
Example (drop-in OpenAI replacement):
from openai import OpenAI
client = OpenAI(
api_key="...",
base_url="https://gateway.ai.cloudflare.com/v1/{account-id}/{gateway-name}/openai"
)
# Now all calls show up in Cloudflare AI Gateway dashboardWhat it costs
Free
- AI Gateway itself is free
- You still pay your underlying AI provider (OpenAI, Anthropic, etc.)
- No Cloudflare-side charge for using Gateway
Optional Cloudflare Workers
- Pair with Workers Paid (US$5/mo) for deeper integration
How it compares to alternatives
| Aspect | Cloudflare AI Gateway | Vercel AI Gateway | Portkey | Helicone | LiteLLM |
|---|---|---|---|---|---|
| Free tier | Free (no cost) | Limited free | Limited free | Limited free | Free (self-hosted) |
| Multi-provider support | Yes | Yes | Yes | Yes | Yes |
| Observability | Yes | Yes | Strong | Strong | Self-hosted |
| Caching | Yes | Yes | Yes | Yes | Yes |
| Best for | Cloudflare users + free / cheap | Vercel users | Enterprise observability | Pure observability | Self-hosted control |
For free observability + cost-control across AI providers, Cloudflare AI Gateway is hard to beat.
Privacy / data handling
- Cloudflare proxies your requests to providers; standard Cloudflare privacy
- Underlying AI providerβs privacy posture is what determines whether your data trains models
- Cloudflare can cache responses (configurable); cached data is encrypted at rest
- For sensitive data, prefer no-caching configuration + ensure provider has no-train tier
Recent changes
- 2026: Expanded provider catalog; deeper analytics
- 2024: Initial launch
Gotchas
- Caching has implications β for personalised responses, caching wrong things can leak user Aβs response to user B; configure cache keys carefully
- Cloudflare-as-intermediary is one more hop; latency adds (~50ms typically)
- For high-volume production with strict latency SLAs, direct provider calls or Vercel AI Gateway / Portkey may suit better
- Provider authentication still happens (your API keys to providers still required); Gateway is in addition, not a replacement for provider accounts
See also
- Cloudflare π© π¦
- Cloudflare Workers AI π© π¦
- Vercel AI Gateway π₯
- Vercel AI SDK π© π¦
- Portkey π₯
- Helicone π₯
- LiteLLM π₯
- OpenRouter π© π¦ β different concept (aggregator) but related
- OpenAI API π© π¦
- Claude API overview π© π¦