Cloudflare AI Gateway
"Connect to any model, dynamically route requests, and manage usage, billing, and logs from one unified gateway." [1]
Cloudflare AI Gateway is a unified proxy layer for teams routing requests across multiple LLM providers, offering automatic fallback, response caching, rate limiting, spend controls, and centralized observability from a single endpoint. Core features including analytics, caching, and rate limiting are free on all plans with 100,000 logs per account; paid plans expand log capacity and gateway count, and an enterprise tier adds HIPAA coverage and Logpush. The gateway is OpenAI and Anthropic API-compatible, supports bring-your-own-key management, and holds SOC 2 Type II, ISO 27001, PCI DSS, and GDPR certifications. A 5% fee applies to credits purchased through Unified Billing, while provider inference pricing passes through without markup.
Best for / Avoid if
Best for: Prototypes and side projects - free to start, no sales call; Regulated or enterprise workloads - compliance attestations and an enterprise plan; AI agents and automation - an agent-ready surface (MCP / llms.txt)
Pricing & procurement
- Pricing model
- Hybrid (base + usage) [2]
- Published pricing
- ✓ Yes
- Free tier
- ✓ Yes [3]
- Free tier details
- Core features (dashboard analytics, caching, rate limiting) are free on all Cloudflare plans. Workers Free plan includes 100,000 logs per account across all gateways. DLP scanning is free on all plans (2 predefined profiles without Zero Trust subscription). [4]
- Self-serve signup
- ✓ Yes
- Requires sales call
- ✗ No
- Enterprise plan
- ✓ Yes [5]
| Plan | Item | Per | Amount | Source |
|---|---|---|---|---|
| Workers Free | Gateway core features (analytics, caching, rate limiting) | month | $0 | source |
| Workers Free | Persistent log storage | 100,000 logs total across all gateways | $0 | source |
| Workers Paid | Persistent log storage | 10,000,000 logs per gateway | $0 | source |
| Workers Paid | Logpush base allowance | 10,000,000 requests/month | $0 | source |
| Workers Paid | Logpush overage | 1,000,000 requests | $0.05 | source |
| Unified Billing credit purchase fee | % of credits purchased | 5% | source |
Capabilities
- Supported actions
- unified_chat_completions, openai_compatible_api, anthropic_compatible_api, model_routing, automatic_fallback, dynamic_routing, rate_limiting, exact_match_caching, prompt_caching, spend_limits, budgets, observability_logging, analytics, cost_tracking, guardrails, pii_redaction, dlp_scanning, byo_provider_keys, custom_costs, custom_metadata, opentelemetry_tracing, workers_logpush, websocket_support, evaluations, audit_logs, graphql_analytics_api [6]
- Input types
- chat completions, text completions, image generation, text-to-speech, automatic speech recognition, embeddings, agentic workflows (responses API)
- Output types
- streaming (SSE), JSON, OpenAI-compatible response, Anthropic-compatible response
- Webhooks
- ✗ No [7]
- Sandbox / test mode
- ✗ No
- SDK languages
- JavaScript/TypeScript, JavaScript/TypeScript (OpenAI SDK drop-in) [8]
- MCP server
- ✓ Yes [9]
Trust & compliance
- SOC 2
- SOC 2 Type II [10]
- HIPAA
- ✓ Yes [11]
- GDPR
- ✓ Yes [12]
- ISO 27001
- ✓ Yes [13]
- PCI DSS
- ✓ Yes [14]
- Published SLA
- ✓ Yes [15]
- Rate limits
- Free plan: 100,000 logs per account; Paid plan: 10,000,000 logs per gateway; log storage rate: 500 logs per second per gateway; individual log size: 10 MB; Unified Billing request rate: 200 requests per 60 seconds per gateway; cacheable request size: 25 MB per request; cache TTL max: 1 month; free plan: 10 gateways per account; paid plan: 20 gateways per account [16]
- Known restrictions
- AI Gateway is not compatible with Cloudflare Regional Services or Geo Key Manager (no data residency controls), HIPAA BAA only available for Enterprise customers, Logpush only available on Workers Paid plan, Guardrails pricing scales with token usage via Workers AI inference, Unified Billing applies a 5% fee to all credits purchased (inference pricing from providers is passed through with no markup), Free plan DLP limited to 2 predefined profiles (full suite requires Zero Trust subscription), Cache applies exact-match only; semantic caching not yet available (planned for future release), AI Gateway token permissions cannot be restricted to a single gateway - tokens grant access to all gateways in an account [17]
Developer surface
Integration
Adoption & maturity
- Launched
- 2023-09-27
- GA
- 2024-05-22
- Notable customers
- RightBlogger
Other AI Gateway & LLM Routing APIs
Vercel AI Gateway
"AI Gateway provides a unified API to access hundreds of AI models through a single endpoint, with built-in budgets, usage monitoring, and fallbacks."
Portkey
"Production Stack for Gen AI Builders"
Bifrost (Maxim AI)
"The fastest, most resilient, enterprise-grade LLM, MCP, and agent gateway."
TrueFoundry AI Gateway
"A unified AI gateway to securely manage and govern AI across 1600+ models with policy control, real-time monitoring, and up to 30% cost reduction."
Helicone
"Open-source LLM observability and monitoring platform for developers" - routes, debugs, and analyzes AI applications with access to 100+ models through one API with built-in observability, automatic fallbacks, and zero markup pricing.
OpenRouter
"The Unified Interface For LLMs" - OpenRouter scouts for the best prices, the lowest latencies, and the highest throughput across dozens of providers, offering a single OpenAI-compatible API with automatic fallback, model routing, and unified billing.
References
- ↑Description: cloudflare.com · developers.cloudflare.com
- ↑Pricing model: developers.cloudflare.com
- ↑Free tier: developers.cloudflare.com
- ↑Free tier details: developers.cloudflare.com · developers.cloudflare.com
- ↑Enterprise plan: developers.cloudflare.com
- ↑Supported actions: developers.cloudflare.com · developers.cloudflare.com
- ↑Webhooks: blog.cloudflare.com
- ↑SDK languages: developers.cloudflare.com
- ↑MCP server: developers.cloudflare.com
- ↑SOC 2: cloudflare.com · blog.cloudflare.com
- ↑HIPAA: blog.cloudflare.com
- ↑GDPR: blog.cloudflare.com
- ↑ISO 27001: blog.cloudflare.com
- ↑PCI DSS: blog.cloudflare.com
- ↑Published SLA: cloudflare.com
- ↑Rate limits: developers.cloudflare.com
- ↑Known restrictions: developers.cloudflare.com · developers.cloudflare.com
Change history
- 2026-06-21 Capabilities: {} → {"guardrails":true,"observability":true,"spend_controls":true,"fallback_routing…
- 2026-06-21 Summary Md: (none) → Cloudflare AI Gateway is a unified proxy layer for teams routing requests acros…
- 2026-06-21 Score Pricing Transparency: (none) → 75
- 2026-06-21 Score Setup Speed: (none) → 80
- 2026-06-21 Score Docs Quality: (none) → 55
- 2026-06-21 Score Procurement Friction: (none) → 90
- 2026-06-21 Score Trust Readiness: (none) → 100
- 2026-06-21 Best For: (none) → Prototypes and side projects - free to start, no sales call, Regulated or enter…
- 2026-06-21 Scoring Methodology: (none) → Scores are computed deterministically from this profile's published, sourced fi…
- 2026-06-21 Score Agent Friendliness: (none) → 65
- 2026-06-21 Llms Txt Present: (none) → Yes
- 2026-06-21 Rendering: (none) → static
- 2026-06-21 Has Structured Data: (none) → Yes
- 2026-06-21 Robots Allows Agents: (none) → Yes
- 2026-06-21 API Reference URL: (none) → https://developers.cloudflare.com/fundamentals/api/reference/sdks/
- 2026-06-21 Changelog URL: (none) → https://developers.cloudflare.com/changelog
- 2026-06-21 Docs URL: (none) → https://developers.cloudflare.com/api/
- 2026-06-21 Llms Txt URL: (none) → https://developers.cloudflare.com/llms.txt
- 2026-06-21 Free Tier Available: set to Yes
- 2026-06-21 Versioning Scheme: set to url
- 2026-06-21 Free Tier Details: set to Core features (dashboard analytics, caching, rate limiting) are free on all Clo…
- 2026-06-21 Self Serve Signup: set to Yes
- 2026-06-21 Requires Sales Call: set to No
- 2026-06-21 Enterprise Plan Available: set to Yes
- 2026-06-21 SOC 2: set to type_2
- 2026-06-21 HIPAA: set to Yes
- 2026-06-21 GDPR: set to Yes
- 2026-06-21 ISO 27001: set to Yes
- 2026-06-21 PCI DSS: set to Yes
- 2026-06-21 SLA Published: set to Yes
- 2026-06-21 SLA URL: set to https://www.cloudflare.com/business-sla/
- 2026-06-21 Data Retention Policy URL: set to https://www.cloudflare.com/privacypolicy/
- 2026-06-21 Documented Rate Limits: set to Free plan: 100,000 logs per account; Paid plan: 10,000,000 logs per gateway; lo…
- 2026-06-21 Rate Limit Requests: set to 200
- 2026-06-21 Rate Limit Window: set to minute
- 2026-06-21 Known Restrictions: set to AI Gateway is not compatible with Cloudflare Regional Services or Geo Key Manag…
- 2026-06-21 Auth Methods: set to api_key
- 2026-06-21 Auth Docs URL: set to https://developers.cloudflare.com/ai-gateway/configuration/authentication/
- 2026-06-21 API Style: set to rest
- 2026-06-21 Base URL: set to https://api.cloudflare.com/client/v4/accounts/{account_id}/ai
- 2026-06-21 API Version: set to v1
- 2026-06-21 Stability: set to ga
- 2026-06-21 Deprecation Policy URL: set to https://developers.cloudflare.com/fundamentals/api/reference/deprecations/
- 2026-06-21 MCP URL: set to https://ai-gateway.mcp.cloudflare.com/mcp
- 2026-06-21 Quickstart URL: set to https://developers.cloudflare.com/ai-gateway/get-started/
- 2026-06-21 Error Format: set to vendor-specific
- 2026-06-21 Slug: set to cloudflare-ai-gateway
- 2026-06-21 Free Tier Limit: set to Core features (analytics, caching, rate limiting) free on all plans; 100,000 lo…
- 2026-06-21 Launched At: set to 2023-09-27
- 2026-06-21 GA Date: set to 2024-05-22
Suggest an edit / leave a review
Leave a review or comment
curl -X POST https://apio.sh/api/feedback/cloudflare-ai-gateway \
-H 'Content-Type: application/json' \
-d '{"kind":"review","rating":5,"body":"Your experience with this API…"}'Suggest a correction to a field (cite a source)
curl -X POST https://apio.sh/api/suggest/cloudflare-ai-gateway/FIELD \
-H 'Content-Type: application/json' \
-d '{"value":"corrected value","citations":[{"url":"https://source.example/page","excerpt":"supporting quote"}],"note":"what changed and why"}'