Cloudflare AI Gateway website screenshot

Cloudflare AI Gateway

Cloudflare AI Gateway is a managed LLM proxy that sits in front of 23+ AI providers (OpenAI, Anthropic, Google AI Studio, Google Vertex AI, Amazon Bedrock, Azure OpenAI, Workers AI, Mistral, Cohere, Groq, DeepSeek, Cerebras, xAI, Perplexity, Replicate, HuggingFace, OpenRouter, ElevenLabs, Deepgram, Cartesia, Ideogram, Fal AI, Baseten, Parallel) and provides analytics, request and error logging, response caching, rate limiting, request retries, model fallback, guardrails, and evaluations. A unified REST API launched May 21, 2026 lets developers call any model through a single endpoint. The gateway integrates with Workers AI, the Secrets Store, and Cloudflare CASB's Claude Compliance API support. This is a standalone product profile; the broader Cloudflare provider profile lives at github.com/api-evangelist/cloudflare.

4 APIs 10 Features
AI GatewayLLMObservabilityCachingRate LimitingWorkers AICloudflare

APIs

Cloudflare AI Gateway Proxy

The AI Gateway proxy endpoint accepts requests in each provider's native API format and forwards them through Cloudflare's edge with analytics, caching, retries, rate limiting, ...

Cloudflare AI Gateway Unified REST API

Unified REST API launched May 21, 2026 that lets developers call any supported model through a single endpoint instead of formatting requests for each provider individually. Sit...

Cloudflare AI Gateway Management API

The Cloudflare API surface for managing AI Gateway resources — creating gateways, listing them, retrieving request logs, and configuring caching, rate limiting, and authenticati...

AI Gateway MCP Server

Cloudflare-hosted remote MCP server that exposes AI Gateway control-plane operations to MCP-compatible AI agents.

Collections

Pricing Plans

Rate Limits

Cloudflare Ai Gateway Rate Limits

2 limits

RATE LIMITS

FinOps

Features

23+ Provider Coverage

OpenAI, Anthropic, Google AI Studio, Google Vertex AI, Amazon Bedrock, Azure OpenAI, Workers AI, Mistral, Cohere, Groq, DeepSeek, Cerebras, xAI, Perplexity, Replicate, HuggingFace, OpenRouter, ElevenLabs, Deepgram, Cartesia, Ideogram, Fal AI, Baseten, Parallel.

Unified REST API

Single endpoint that can call any supported model (launched May 21, 2026), alongside provider-native pass-through mode.

Analytics and Logging

Per-request analytics for tokens, cost, latency, and error rates with full request and response logging.

Edge Caching

Cache LLM responses at Cloudflare's edge to cut latency and provider spend.

Rate Limiting

Enforce request and token rate limits per gateway, per application.

Retries and Model Fallback

Automatically retry failing calls and fall back to alternate models or providers.

Guardrails and Evaluations

Apply guardrails to prompts and responses and run evaluations against captured traffic.

BYOK and Unified Billing

Bring your own provider keys per gateway or route spend through Cloudflare's Unified Billing.

Workers AI Integration

Native integration with Cloudflare Workers AI models via the cf-aig-gateway-id header.

Secrets Store Integration

Provider keys can be sourced from Cloudflare's Secrets Store rather than embedded in client code.

Use Cases

Observe LLM Traffic

Capture per-request tokens, latency, and cost across every provider in one place.

Cut LLM Costs

Cache repeated responses at the edge and rate limit runaway workloads.

Fail Over Between Providers

Configure retries and model fallback so a single provider outage does not take down the app.

Govern Prompts and Responses

Apply guardrails and run evaluations against production AI traffic.

Unify Multi-Provider Access

Use a single REST endpoint to address any supported model from any provider.

Integrations

Workers AI

First-class integration with Cloudflare Workers AI inference catalog.

Cloudflare Workers

Call AI Gateway directly from Workers using AI bindings configured in wrangler.jsonc.

Cloudflare Secrets Store

Store and rotate provider API keys without redeploying.

Cloudflare CASB - Claude Compliance API

CASB support for Anthropic's Claude Compliance API announced May 2026.

Claude Managed Agents on Cloudflare

Partnership offering announced May 19, 2026 that runs Anthropic-managed Claude agents on Cloudflare with AI Gateway in the path.

MCP Server

Remote MCP server at ai-gateway.mcp.cloudflare.com/mcp for AI agent access to AI Gateway control plane.

Resources

🌐
Portal
Portal
🔗
Documentation
Documentation
🚀
GettingStarted
GettingStarted
🔗
APIReference
APIReference
🔑
Authentication
Authentication
📄
ChangeLog
ChangeLog
📰
Blog
Blog
📝
Signup
Signup
🌐
Console
Console
💰
Pricing
Pricing
📦
SDKs
SDKs
📦
SDKs
SDKs
📦
SDKs
SDKs
🔗
CLI
CLI
🔗
MCPServer
MCPServer
👥
GitHubOrganization
GitHubOrganization
🟢
StatusPage
StatusPage
💬
Support
Support
🔗
LlmsText
LlmsText

Sources

apis.yml Raw ↑
opencollection: 1.0.0
info:
  name: Cloudflare AI Gateway API
  version: 1.0.0
request:
  auth:
    type: bearer
    token: '{{bearerToken}}'
items:
- info:
    name: Gateways
    type: folder
  items:
  - info:
      name: List AI Gateways
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/:account_id/ai-gateway/gateways
      params:
      - name: account_id
        value: ''
        type: path
      - name: page
        value: ''
        type: query
      - name: per_page
        value: ''
        type: query
      - name: search
        value: ''
        type: query
    docs: List AI Gateways
  - info:
      name: Create AI Gateway
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/accounts/:account_id/ai-gateway/gateways
      params:
      - name: account_id
        value: ''
        type: path
      body:
        type: json
        data: '{}'
    docs: Create AI Gateway
  - info:
      name: Get AI Gateway
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/:account_id/ai-gateway/gateways/:gateway_id
      params:
      - name: account_id
        value: ''
        type: path
      - name: gateway_id
        value: ''
        type: path
    docs: Get AI Gateway
  - info:
      name: Update AI Gateway
      type: http
    http:
      method: PUT
      url: https://api.cloudflare.com/client/v4/accounts/:account_id/ai-gateway/gateways/:gateway_id
      params:
      - name: account_id
        value: ''
        type: path
      - name: gateway_id
        value: ''
        type: path
    docs: Update AI Gateway
  - info:
      name: Delete AI Gateway
      type: http
    http:
      method: DELETE
      url: https://api.cloudflare.com/client/v4/accounts/:account_id/ai-gateway/gateways/:gateway_id
      params:
      - name: account_id
        value: ''
        type: path
      - name: gateway_id
        value: ''
        type: path
    docs: Delete AI Gateway
- info:
    name: Logs
    type: folder
  items:
  - info:
      name: List request logs for an AI Gateway
      type: http
    http:
      method: GET
      url: https://api.cloudflare.com/client/v4/accounts/:account_id/ai-gateway/gateways/:gateway_id/logs
      params:
      - name: account_id
        value: ''
        type: path
      - name: gateway_id
        value: ''
        type: path
    docs: List request logs for an AI Gateway
- info:
    name: Proxy
    type: folder
  items:
  - info:
      name: Proxy a request to a single AI provider
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/v1/:account_id/:gateway_id/:provider
      params:
      - name: account_id
        value: ''
        type: path
      - name: gateway_id
        value: ''
        type: path
      - name: provider
        value: ''
        type: path
    docs: 'Accepts the provider''s native request shape and forwards it through

      AI Gateway. The remainder of the upstream path is appended after the

      provider segment (e.g. /v1/{account}/{gateway}/openai/chat/completions).

      '
  - info:
      name: Unified AI Gateway request (universal endpoint)
      type: http
    http:
      method: POST
      url: https://api.cloudflare.com/client/v4/v1/:account_id/:gateway_id
      params:
      - name: account_id
        value: ''
        type: path
      - name: gateway_id
        value: ''
        type: path
    docs: 'Accepts a JSON body that selects the provider and model and forwards

      the request, applying fallback across providers if configured.

      '
bundled: true