AI gateway on the Cloudflare developer platform
INFRO vs Cloudflare AI Gateway
Cloudflare AI Gateway puts a proxy in front of 23 providers and their own Workers AI, and its core — analytics, logging, caching and rate limiting — is free on any Cloudflare account. Through 2026 it became considerably more than a proxy: dollar spend limits evaluated before the provider is called — counting requests on your own keys too, for models with known pricing — spend attributed per identity, custom metadata, a visual routing builder with versioned deploys and instant rollback, OpenTelemetry export, guardrails and data-loss prevention in both directions. If your traffic already passes through Cloudflare, adopting it costs an afternoon and nothing else — and for a great many teams that is where the evaluation should end, which is the honest summary of this page.
- Free is the requirement. The core costs nothing on an account you already hold, and no paid control plane is worth buying to replace something that is already doing the job.
- You are already on Cloudflare. It sits beside the Workers, storage and DNS you already run, under contracts you have already signed, with no new vendor to review and no second invoice. For a lot of teams that is the entire evaluation, and it is a good answer rather than a lazy one.
- You want caching beyond chat completions. Both caches answer exact repeats only, but Cloudflare's covers text and image responses and serves them from its own network; INFRO's response cache covers chat completion requests only, keyed per project and key environment.
- You need guardrails or data-loss prevention on the request path, on both the prompt and the response. Those are theirs. INFRO has pattern-based guardrails for PII, secrets and your own terms on chat completions, and classifier checks for prompt injection, jailbreaks and harmful or off-topic requests that read prompts only, run on your own decision-model connection, and come with the Business plan.
- You run Workers AI. Calling Cloudflare's own models and third-party providers through one gateway is a real advantage of buying it from the company hosting both.
- Proven directory-driven user provisioning is a hard requirement. Cloudflare documents dashboard SCIM provisioning for Enterprise customers against Okta, Microsoft Entra ID and Authentik. INFRO includes SAML/OIDC SSO and SCIM 2.0 from the Business plan, but they are new and have not yet run in production against a customer's identity provider, so we set up the first connection with you rather than calling it self-serve.
- You need it this week. AI Gateway is generally available and self-serve; INFRO is in private early access.
This section is not a courtesy. If one of these describes you, pick Cloudflare AI Gateway — a customer who adopts the wrong layer on our advice is worse for us than one we never had.
Where the two actually diverge.
- What happens after the estimate
- Both products price every request from token counts and a model rate, and both are honest that the result is an estimate — Cloudflare's spend-limit documentation says cost tracking is best-effort and to refer to your provider's dashboard for exact billing amounts. That is a fair description of what any gateway knows on its own, and INFRO's per-request number is an estimate on the same terms. The difference is what happens next: a daily pass reads your own OpenAI and Anthropic cost APIs using a separate admin credential you grant deliberately, stores what the provider reported beside what INFRO estimated for the same UTC days, and states the variance. It covers those two providers, on the Business plan, and a provider with no adapter shows no variance rather than a variance of zero — because a zero would read as agreement nobody checked. What a finance conversation needs is not a spend dashboard; it is a number that has been checked against an invoice.
- Where your negotiated rate lives
- Both can price against the rates your contracts actually carry. Cloudflare takes them per request, in a cf-aig-custom-cost header the caller sends. INFRO stores them in the console, per model and optionally per provider kind — because the same model bills differently on a direct vendor account than through a cloud reseller — and applies them to every request that matches, whether or not the caller knew anything. The difference is operational rather than technical: if the rate travels in a header, every service that calls a model carries a copy of your commercial terms, and renegotiating means a deploy across all of them. If it lives in the control plane it is one edit by whoever owns the contract, and last month's requests keep the rate that was in force when they ran. Every INFRO record also says which rate answered — your negotiated rate, the vendor's published rate, or unpriced — and a request nobody can price is recorded as unpriced rather than as free.
- Which requests the routing applies to
- Cloudflare's dynamic routes are composed in a visual editor, versioned as drafts, deployed with instant rollback, and — per their documentation — accept the OpenAI chat completions request shape only; other formats return a 400. That is a genuinely nice way to build a routing flow, and it is scoped to chat. INFRO's routes are priority or weighted target lists that apply to whatever the route serves, including image, video and audio requests, which is where a media-heavy product's money actually goes. Neither shape is better in the abstract. Which one fits depends on whether your routing problem stops at text.
- One gateway, or an organization
- Cloudflare's unit is the gateway: access to it is Cloudflare account roles, and per-request identity comes from custom metadata — up to five entries — or from Access. INFRO's unit is the organization, and underneath it sit projects, environments, keys with their own scope, five roles, model allowlists at organization, project and key level, and an audit log of who changed which policy and when, on every plan including the entry one. The distinction that matters is what a control is attached to: a ceiling or an allowlist holds here because of which key made the call, not because the caller labelled itself correctly. Metadata is the more flexible of the two and the easier to get wrong. While one team runs AI, a gateway is enough. Once several do, the question stops being what a request cost and becomes which team may call this model, who approved that, and what did they spend — which is a different object model rather than a bigger dashboard.
- Part of a platform, or a product of its own
- This is the real fork, and it favours them for most readers. Their gateway is one surface of the Cloudflare developer platform, which is why it is free, why it is one line of code, and why it will keep gaining features on somebody else's roadmap — this product ships faster than this page does, so check their docs against ours before you decide. INFRO is a standalone control plane: one more vendor to review, one more subscription, and accountable to nothing except operating AI across whoever runs it. Which trade is right depends on how much of your stack is already Cloudflare's, and that is a question about you rather than about either product.
Side by side.
Our column carries dashes too. A comparison where one side is all checks is one nobody believes, and rightly.
| Capability | Cloudflare AI Gateway | INFRO |
|---|---|---|
| One API across many providers | yes23 providers, plus Workers AI | yeswhatever your connected providers serve |
| Free core | yesanalytics, logging, caching, rate limiting | nopaid plans, with a trial |
| Your own provider keys | yesstored in Secrets Store, per gateway, with aliases | yesconnected per environment |
| Routing, retries and failover | yesvisual routes, chat completions shape only | yespriority or weighted targets, any modality |
| Response caching | yesexact match; text and image, from their network | partialexact match, chat completions only |
| Guardrails and data-loss prevention | yestheir specialism; prompt and response | partialchat patterns plus prompt classifiers; Business plan |
| Request logging and traces | yeson by default | yespayload capture off by default |
| Budgets that refuse before the provider is called | yes429 at the cap, or a fallback model; BYOK counted for priced models | yes402, four scopes |
| Cost attributed to a team, feature or end user | yescustom metadata and identity | yesproject, key, user id |
| Estimates at your negotiated rates | partiala header the caller sends | yesstored per organization; Team plan |
| Reconciliation against the provider's own bill | notheir docs point to the provider's dashboard | partialOpenAI and Anthropic, Business plan; variance stated |
| Model allowlists | partialachievable with routing conditions | yesorganization, project and key |
| Projects, roles and an audit log | partialCloudflare account roles | yesevery plan |
| Request history | partiala storage cap per gateway | yes7 to 90 days by plan |
| Image, video, and audio | partialproxied in each provider's own shape | yesone request shape each |
| First-party inference | yesWorkers AI | noroutes to your providers |
| Available today | yesfree core features | noprivate early access |
Our reading of each product's public documentation as of October 2026. We do not quote competitors' prices — theirs change and a wrong number about someone else's business is worse than none. Think a row is wrong? Tell us and we will fix it.
Work out what the difference is worth
Estimate what your current model mix costs at your providers' list rates and the plan it needs, or have us read your real usage and tell you where we would and would not help.