Compare gateways

Experiential vs Cloudflare AI Gateway

Cloudflare proxies each provider's own API at the edge, while Experiential is one API across every model with failover and data controls on every lane.

このページはまだ翻訳されていません。英語版を表示しています。

Summary

Cloudflare AI Gateway sits in front of each provider's own API: a per-provider path on gateway.ai.cloudflare.com, plus an OpenAI-compatible chat endpoint that Cloudflare now marks deprecated for single-model calls. Caching, rate limiting and analytics are free. Unified Billing adds a 5% fee on credits, and its ZDR applies only to that billing mode. Experiential is one API for every model, with routing and data controls that cover your own keys too.

import os

from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.ai.cloudflare.com/v1/ACCOUNT/GATEWAY/compat",
    api_key=os.environ["OPENAI_API_KEY"],
    default_headers={"cf-aig-authorization": f"Bearer {os.environ['CF_AIG_TOKEN']}"},
)
client.chat.completions.create(
    model="openai/gpt-6-luna",
    messages=[{"role": "user", "content": "Hello"}],
)

Side by side

ExperientialCloudflare AI Gateway
HostingHostedHosted on Cloudflare
APIsChat, Responses, Messages, Gemini generateContent, embeddings, batches, for every modelEach provider's native API passed through; OpenAI-compatible chat (/compat)
Model access980 listed models on credits, or your keysYour keys, stored keys, or Unified Billing credits
PricingList price on tokens, no markupCore features free; 5% fee on Unified Billing credits; logs and guardrails billed separately
FailoverOrdered waterfall across providers; slow lanes demotedRetries, model fallback, dynamic routes
Zero data retentionPro: org switch, per request, every lane including your keysUnified Billing requests only; not BYOK
Spend limitsPer-key caps, budgets, tier rate limitsSpend limit per gateway; request rate limits
Content guardrailsStandard pack or your own classifierLlama Guard (billed as Workers AI inference); DLP profiles
Response cacheNoneYes
SSONot yet availableNot documented for AI Gateway

Where Experiential is better

  • One API for every model. Call Claude with the OpenAI SDK, or GPT with the Anthropic SDK. You do not switch paths per provider. See Models and the catalog.
  • Zero data retention on every lane, your own keys included, with the verdict in x-gateway-zdr on each response. See Data controls.
  • No fee on credits and no per-gateway log quotas. See Plans and pricing.
  • Provider failover inside one model, with slow providers demoted. See Routing and failover.

When Cloudflare may fit better

Your app runs on Workers and you want the AI binding. Or you want response caching and DLP at the edge, in front of providers you call directly.

Migration notes

WhatCloudflare AI GatewayExperiential
Base URLhttps://gateway.ai.cloudflare.com/v1/{account}/{gateway}/{provider} or /compathttps://api.experientiallabs.ai/v1 (Anthropic SDK: https://api.experientiallabs.ai)
AuthProvider key, plus cf-aig-authorization on an authenticated gatewayAuthorization: Bearer YOUR_API_KEY only
Model ids{provider}/{model} on /compat, provider ids on native pathsPlain slug from GET /v1/models; never just strip the prefix, map it
cf-aig-* cache and metadata headersCache, custom metadataRemove them; tags go in X-Explabs-Tags
Dynamic routesdynamic/{route}Per-model waterfall (automatic)
Stored keys (BYOK)Gateway key storeConnect the same accounts in Settings, Connections

Switch with an agent

Paste this into your coding agent. It inventories the project first and asks before anything it cannot map.

POST/v1/chat/completions
curl https://gateway.ai.cloudflare.com/v1/ACCOUNT/GATEWAY/anthropic/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "cf-aig-authorization: Bearer $CF_AIG_TOKEN" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5", "max_tokens": 256,
       "messages": [{"role": "user", "content": "Hello"}]}'

Sources, checked 2026-11-19

  1. AI Gateway overview: caching, rate limiting, retries and fallback, dynamic routes, logging.
  2. Pricing: free core features, log limits, Unified Billing 5% fee, guardrails billed as Workers AI inference, DLP.
  3. Unified Billing: providers, spend limits, ZDR only on Cloudflare-managed credentials.
  4. OpenAI-compatible endpoint: URL, model format, auth, deprecation note, providers. Anthropic: native Messages path.
  5. Experiential: /llms.txt, GET /api/models.