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
| Experiential | Cloudflare AI Gateway | |
|---|---|---|
| Hosting | Hosted | Hosted on Cloudflare |
| APIs | Chat, Responses, Messages, Gemini generateContent, embeddings, batches, for every model | Each provider's native API passed through; OpenAI-compatible chat (/compat) |
| Model access | 980 listed models on credits, or your keys | Your keys, stored keys, or Unified Billing credits |
| Pricing | List price on tokens, no markup | Core features free; 5% fee on Unified Billing credits; logs and guardrails billed separately |
| Failover | Ordered waterfall across providers; slow lanes demoted | Retries, model fallback, dynamic routes |
| Zero data retention | Pro: org switch, per request, every lane including your keys | Unified Billing requests only; not BYOK |
| Spend limits | Per-key caps, budgets, tier rate limits | Spend limit per gateway; request rate limits |
| Content guardrails | Standard pack or your own classifier | Llama Guard (billed as Workers AI inference); DLP profiles |
| Response cache | None | Yes |
| SSO | Not yet available | Not 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-zdron 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
| What | Cloudflare AI Gateway | Experiential |
|---|---|---|
| Base URL | https://gateway.ai.cloudflare.com/v1/{account}/{gateway}/{provider} or /compat | https://api.experientiallabs.ai/v1 (Anthropic SDK: https://api.experientiallabs.ai) |
| Auth | Provider key, plus cf-aig-authorization on an authenticated gateway | Authorization: Bearer YOUR_API_KEY only |
| Model ids | {provider}/{model} on /compat, provider ids on native paths | Plain slug from GET /v1/models; never just strip the prefix, map it |
cf-aig-* cache and metadata headers | Cache, custom metadata | Remove them; tags go in X-Explabs-Tags |
| Dynamic routes | dynamic/{route} | Per-model waterfall (automatic) |
| Stored keys (BYOK) | Gateway key store | Connect 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/completionscurl 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
- AI Gateway overview: caching, rate limiting, retries and fallback, dynamic routes, logging.
- Pricing: free core features, log limits, Unified Billing 5% fee, guardrails billed as Workers AI inference, DLP.
- Unified Billing: providers, spend limits, ZDR only on Cloudflare-managed credentials.
- OpenAI-compatible endpoint: URL, model format, auth, deprecation note, providers. Anthropic: native Messages path.
- Experiential: /llms.txt, GET /api/models.