Hosted edge AI gateway · Verified August 16, 2026

TrustedRouter vs Cloudflare AI Gateway

Cloudflare AI Gateway is a closed-source control plane on Cloudflare's global edge whose core features are free, with caching, Dynamic Routing, and unified billing, merged with Workers AI in August 2026. TrustedRouter is a source-available gateway attested on three clouds that keeps realtime prompt content out of durable logs by default.

Compare details
8decision dimensions
7official sources
1base URL to try TR
Choose Cloudflare AI Gateway when

Its operating model is the feature.

Choose Cloudflare AI Gateway when you already run on Cloudflare and want a free gateway: caching, rate limiting, analytics, and DLP scanning cost nothing on any plan, Dynamic Routing gives no-code A/B splits and budget-triggered fallbacks, and since August 2026 Workers AI shares the same control plane and billing.

Choose TrustedRouter when

Privacy needs evidence.

Choose TrustedRouter when prompt handling needs proof rather than configuration: the gateway build is attested live on GCP, AWS, and Azure, realtime inference keeps prompt and output content out of durable logs by default, and privacy routes enforce a per-request floor (zdr, e2e) and trustedrouter/eu pins an EU-focused provider set.

DimensionCloudflare AI GatewayTrustedRouter
DeploymentClosed-source hosted service on Cloudflare's global edge; core gateway free on all plansHosted control plane, source-available (BUSL-1.1), with an attested API path
API surfaceREST /ai/run, OpenAI Chat and Responses, Anthropic Messages; old compat path deprecatedOpenAI Chat Completions and Responses plus Anthropic Messages
Model access24 named providers including Workers AI, unified into one control plane on 2026-08-07500+ models across ~50 providers: prepaid, BYOK, and direct
RoutingDynamic Routing: conditional branches, A/B splits, budget quotas, retries, rollbackProvider fallback plus auto, cheap, fast, free, ZDR, E2E, and EU routes with composable privacy and jurisdiction preferences
ObservabilityPersistent logs (100k free, 10M/gateway paid), Logpush export, User InsightsMetadata analytics and opt-in external broadcast
Prompt contentLogs prompts and responses by default; opt out per gateway or per-request headerNo durable prompt or output logs on realtime inference; batch is opt-in encrypted retention
VerificationCorporate SOC 2 Type II and ISO 27001; gateway is closed source, no attestationLive gateway attestation on three clouds, bound to published source and release evidence
BillingCore free; Unified Billing +5% on credit purchases, 6 providers; BYOK via Secrets StorePrepaid at provider price + 5.5% ($0.01/M floor), or BYOK

What Cloudflare AI Gateway actually is

Cloudflare AI Gateway is a hosted control plane that sits between your application and model providers, running on Cloudflare's global edge network. Cloudflare operates it; there is nothing to self-host, and the gateway's source is not published (peripheral SDK packages in cloudflare/ai are MIT). Integration is a base-URL change, and the core product is free on every plan: analytics, caching, rate limiting, request logging, and DLP scanning cost nothing.

The product is moving fast. A REST API shipped on 2026-05-21 with a universal /ai/run endpoint plus OpenAI Chat, OpenAI Responses, and Anthropic Messages schemas. On 2026-08-07 Cloudflare merged Workers AI and AI Gateway into a single control plane with shared endpoints and billing. The providers page lists 24 named providers, Workers AI among them, including dedicated speech and media vendors such as Deepgram, ElevenLabs, and Fal.

Where Cloudflare is the right choice

Three things are genuinely strong. Price: the core gateway is free, and Unified Billing adds a 5% fee on credit purchases (a $100 purchase charges $105) with inference passed through at provider price. Routing: Dynamic Routing is a versioned visual editor with conditional branches, percentage splits for A/B tests, budget and rate-limit quotas that switch to fallbacks, and automatic retries on provider failures. Compliance: Cloudflare has held SOC 2 Type II since 2019 and carries ISO 27001, 27701, and 27018. If your stack already fronts through Cloudflare and procurement wants a large public company with a long audit history, it is a defensible default.

Prompt logging is the fork in the road

Cloudflare's logging is on by default and stores the user prompt and model response along with tokens, cost, and duration. Logs persist until you delete them or hit the storage cap: 100,000 logs total on free accounts, 10 million per gateway on Workers Paid ($5/month base). You can opt out per gateway or per request (cf-aig-collect-log). Since November 2025 there is also an opt-in Zero Data Retention mode that routes Unified Billing traffic to provider endpoints that do not retain content; Cloudflare's docs state it does not apply to BYOK.

TrustedRouter inverts the default. Ordinary synchronous and streaming inference does not write prompt or output content to persistent storage; what we keep is metadata: request ids, model and provider, token counts, latency, cost, region, and an API-key hash (privacy page). Batch is a separate opt-in mode with enclave-encrypted artifacts retained up to 30 days. Privacy is also routable per request: trustedrouter/zdr restricts to providers with cited zero-retention terms, trustedrouter/e2e restricts to confidential-compute providers with provider-side end-to-end encryption (currently tinfoil and phala), and trustedrouter/eu pins an EU-focused provider set. See /models for every route.

Verification: what can you actually check?

With Cloudflare, assurance is documentation and audits. Those are real, and the SOC 2 report is available under NDA, but the gateway's code is not published, so "logging is off" is a setting you take on trust.

Our gateway's source is public under BUSL-1.1 (source-available, converting to Apache-2.0 four years after each release; the SDKs are Apache-2.0 or MIT), and the running build is attested on three clouds: GCP Confidential Space, AWS Nitro Enclaves, and Azure Confidential Containers. Anyone can fetch a live attestation from the endpoints on trust.trustedrouter.com and check the measurement against published release digests with one script. The boundary is precise and worth stating plainly: attestation covers the gateway build, not downstream model providers. Provider retention on zdr routes is a contractual and policy tier, cited per provider; on the e2e routes the provider's own confidential-compute and E2EE mechanisms apply. Details are on /security.

Pricing, on stated bases

The two fee numbers look similar and sit on different bases. Cloudflare charges 5% when you purchase Unified Billing credits, then passes inference through at provider price; the mode covers 6 providers and is limited to 200 requests per 60 seconds per gateway, and the free core gateway adds no fee to traffic on your own provider keys. TrustedRouter charges the provider's token price plus 5.5% on each prepaid request, with a $0.01 per million token floor on free and near-zero routes; video is the provider quote plus 20%; there is no monthly fee (pricing). BYOK is supported on both sides; we do not publish a separate BYOK fee, while Cloudflare's core gateway adds no fee to BYOK traffic — compare against your own quote.

What we do not claim

We are young. Our repos have been public since late April 2026 and public benchmark history starts June 2026; Cloudflare's audit trail goes back years. We publish a DPA, BAA, and subprocessor list, but as of August 2026 we have no published SOC 2 or HIPAA certification. Our published pricing covers text, embeddings, and video generation; if you rely on Cloudflare's speech vendors (Deepgram, ElevenLabs, Cartesia), check /models for equivalents before committing. Our availability number is a published 99.99% target with live burn rates on the status page, and our on-page uptime history is short.

Moving over

If you call Cloudflare's OpenAI-compatible endpoints, the change is the base URL, the auth (Cloudflare API token to TrustedRouter key), and model naming. Everything configured in the Cloudflare dashboard stays there: dynamic routes, caching rules, spend limits, Guardrails and DLP policies, and Logpush jobs have no importable equivalent, and prepaid credits do not transfer. The code change is small; the config rebuild is the real work. Start with one streamed request and compare output, latency, and billed usage before moving traffic.

Migration shape

Start with one real request.

OpenAI-compatible clients swap the Cloudflare base URL and API token for the TrustedRouter base URL and key, then map provider-prefixed model ids; dynamic/{route} pseudo-models have no direct equivalent and must be rebuilt as routing preferences. Cloudflare-side config does not carry over: dynamic routes, caching rules, spend limits, Guardrails and DLP policies, and Logpush jobs stay behind, and prepaid Unified Billing credits do not transfer. BYOK keys in Secrets Store must be re-provisioned as direct provider keys or TrustedRouter BYOK.

Keep the first test small, stream the response, and compare output, latency, provider selection, and billed usage before moving production traffic.

Agent setup Run a small eval

TrustedRouter sideOpenAI SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://api.trustedrouter.com/v1",
    api_key="sk-tr-v1-...",
)

with client.chat.completions.create(
    model="trustedrouter/zdr",
    messages=[{"role": "user", "content": "Reply PONG"}],
    stream=True,
) as response:
    for chunk in response:
        print(chunk.choices[0].delta.content or "", end="")
Official evidence

Sources checked August 16, 2026

Report a change
All gateways

Questions

Isn't Cloudflare AI Gateway free while TrustedRouter charges a fee?

Yes. Cloudflare's core gateway (caching, rate limiting, analytics, logging, DLP) is free on every plan, and traffic on your own provider keys carries no Cloudflare per-token fee; Unified Billing adds 5% only when you purchase credits. TrustedRouter bills prepaid text and embeddings at the provider's token price plus 5.5% with a $0.01/M floor. If the free tier's defaults fit your privacy posture, Cloudflare is cheaper; the 5.5% pays for an attested gateway path with no durable prompt logs.

Both offer zero data retention. How do the two ZDR modes differ?

Cloudflare's ZDR (added November 2025) is opt-in and scoped: it routes Unified Billing traffic to provider endpoints that do not retain content, and Cloudflare's docs state it does not apply to BYOK; separately, gateway logging of prompts and responses is on by default until you turn it off. TrustedRouter's realtime path keeps prompt and output bodies out of durable storage for every request by default, and trustedrouter/zdr adds a per-request floor restricted to providers with cited zero-retention terms. Our attestation covers the gateway build, not downstream providers.

We need SOC 2 for procurement. Which one passes review?

Cloudflare. It has held SOC 2 Type II since 2019 and carries ISO 27001, 27701, and 27018 company-wide. As of August 2026 TrustedRouter has no published SOC 2 or HIPAA certification; we publish a DPA, BAA, and subprocessor list, plus live attestation evidence at trust.trustedrouter.com. If a certification checkbox is mandatory today, Cloudflare clears that bar and we do not.

Workspace access

Sign in

Choose a sign in method to access your TrustedRouter workspace.

By signing in you agree to the terms of service and privacy policy.