# Cloudflare AI Gateway
Cloudflare AI Gateway is [[Cloudflare]]'s managed [[AI Gateway]]. You put it in front of your existing provider calls by changing one URL, and you immediately get analytics, logging, caching, rate limiting and retries without touching the rest of your code.
Do not confuse it with Cloudflare Workers AI. Workers AI runs open-weight models on Cloudflare's own hardware. AI Gateway runs no models at all; it proxies your requests to [[OpenAI]], [[Anthropic]], Google Gemini, Workers AI, Replicate and a long list of others. Two different products, two different privacy stories, and people mix them up constantly.
## What you get
- **Analytics and logs**: requests, tokens, cost and errors per gateway, with the option to store full request and response bodies
- **Caching**: Cloudflare serves repeated responses from its own cache, which cuts both latency and your provider bill
- **Rate limiting**: throttle by requests over a time window before the traffic ever reaches the provider
- **Dynamic routing**: retries and model fallbacks when a provider misbehaves
- **Unified API**: one endpoint shape across providers, so switching models stays a config change
## Why it matters
If your app already runs on [[Cloudflare Workers]], this is the shortest path from "I have no visibility into my AI spend" to a dashboard that tells you exactly where the money goes. The setup cost is close to zero.
The part worth thinking about: caching and full-body logging both mean Cloudflare holds your prompts. That is the whole point of the product, and it is also a new custodian in your data path. Decide deliberately whether you want log storage on, rather than discovering it later.
## References
- Documentation: https://developers.cloudflare.com/ai-gateway/
- Supported providers: https://developers.cloudflare.com/ai-gateway/usage/providers/
- Caching configuration: https://developers.cloudflare.com/ai-gateway/configuration/caching/
- Pricing: https://developers.cloudflare.com/ai-gateway/reference/pricing/
- Changelog: https://developers.cloudflare.com/ai-gateway/changelog/
## Related
- [[AI Gateway]]
- [[Cloudflare]]
- [[Cloudflare Workers]]
- [[Model routing]]
- [[AI Observability]]
- [[Vercel AI Gateway]]
- [[OpenAI]]
- [[Anthropic]]