Cloudflare AI Gateway (2)
Last updated Apr 20, 2026 Observe and control your AI applications.
Available on all plans
Cloudflare's AI Gateway allows you to gain visibility and control over your AI apps. By connecting your apps to AI Gateway, you can gather insights on how people are using your application with analytics and logging and then control how your application scales with features such as caching, rate limiting, as well as request retries, model fallback, and more. Better yet - it only takes one line of code to get started.
Check out the Get started guide to learn how to configure your applications with AI Gateway.
Features
Explore all AI models available through AI Gateway, including OpenAI, Anthropic, Google, and more.
Browse models
View metrics such as the number of requests, tokens, and the cost it takes to run your application.
View Analytics
Gain insight on requests and errors.
View Logging
Serve requests directly from Cloudflare's cache instead of the original model provider for faster requests and cost savings.
Use Caching
Control how your application scales by limiting the number of requests your application receives.
Use Rate limiting
Improve resilience by defining request retry and model fallbacks in case of an error.
Use Request retry and fallback
Workers AI, Anthropic, Google Gemini, OpenAI, Replicate, and more work with AI Gateway.
Use Your favorite providers
Related products
Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network.
Build full-stack AI applications with Vectorize, Cloudflare's vector database. Adding Vectorize enables you to perform tasks such as semantic search, recommendations, anomaly detection or can be used to provide context and memory to an LLM.
More resources
Developer Discord
Connect with the Workers community on Discord to ask questions, show what you are building, and discuss the platform with other developers.
Use cases
Learn how you can build and deploy ambitious AI applications to Cloudflare's global network.
@CloudflareDev
Follow @CloudflareDev on Twitter to learn about product announcements, and what is new in Cloudflare Workers.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/ai-gateway/#page","headline":"Cloudflare AI Gateway","description":"Observe and control your AI applications with analytics, caching, rate limiting, and model fallback through AI Gateway.","url":"https://developers.cloudflare.com/ai-gateway/","inLanguage":"en","image":"https://developers.cloudflare.com/ai-gateway/og.png?v=d9b4c0d9dbab4986","dateModified":"2026-04-20","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["AI"]}
description: Set up AI Gateway and send your first request to observe and control AI API traffic. title: Getting started image: https://developers.cloudflare.com/ai-gateway/get-started/og.png?v=67edbeede27d6aa3
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/ai-gateway/llms.txt
Use this file to discover all available pages before exploring further.
Docs