Model service vs cloud control layer
KeepRouter vs Cloudflare AI Gateway: model service, control layer, or both
KeepRouter is a customer-facing managed model service with public model prices, prepaid credit, scoped keys, and route-specific APIs. Cloudflare AI Gateway is a Cloudflare control and observability layer whose current docs cover logging, analytics, caching, rate limiting, spend limits, retries, fallbacks, dynamic routing, provider-native paths, and a Cloudflare-authenticated REST API with Unified Billing. Cloudflare marks its legacy Universal Endpoint as deprecated and its /compat/chat/completions Unified API as deprecated for standard single-model calls, while retaining the latter for dynamic routes. The products solve different jobs and can be layered only with an explicit architecture and billing boundary. [1] [2] [10] [11]
Last reviewed 2026-08-15 · Editorial review: KeepRouter Editorial
Short answer
KeepRouter is a managed model-access product. Cloudflare AI Gateway is a Cloudflare platform product for observing and controlling AI application traffic, and its newer REST API can also provide Cloudflare-authenticated access to supported models through Unified Billing. KeepRouter itself runs on Cloudflare infrastructure, but that does not mean every KeepRouter request uses the Cloudflare AI Gateway product, and this page does not disclose any private upstream route.
For new standard single-model calls, Cloudflare's current REST API exposes /ai/run, /ai/v1/chat/completions, /ai/v1/responses, and /ai/v1/messages. The legacy Universal Endpoint is deprecated. The older /compat/chat/completions Unified API is deprecated for standard single-model calls but remains required for Cloudflare dynamic routes, so that exception should not be mistaken for a default integration path.
Choose KeepRouter when you want a ready customer account, public model catalog, prepaid balance, scoped API keys, and supported model endpoints. Choose Cloudflare AI Gateway when you want Cloudflare-native logs, caching, rate limits, spend limits, retries, fallbacks, dynamic routing, security controls, or REST API billing around AI traffic you configure. Use both only when each layer has a distinct owner and source of truth.
Decision table
| Decision | KeepRouter | Cloudflare AI Gateway |
|---|---|---|
| Primary role | Managed model access, customer authentication, catalog, prepaid balance, and final customer charge | AI traffic observability and policy; current REST API also offers Cloudflare-authenticated model access through Unified Billing |
| Credentials | Application sends a KeepRouter key; KeepRouter manages its private upstream channels | The current REST API requires a Cloudflare API token with Workers AI Read permission; provider-native paths have their own documented credential rules |
| API formats | KeepRouter OpenAPI lists Chat Completions, Responses, Messages, count tokens, models, embeddings, image, and speech routes, with per-model availability | Current REST docs list /ai/run, /ai/v1/chat/completions, /ai/v1/responses, and /ai/v1/messages, with endpoint-specific model support |
| Routing and policy | Public users choose a model and compatible endpoint; upstream routing is private and operator-managed | Official docs describe retries, model fallback, dynamic routing, rate limiting, spend limits, DLP, guardrails, and related policy features |
| Observability | User Usage view exposes request metadata, status, tokens, customer cost, cache state, and latency; prompt and completion bodies are not written to request logs | Official docs describe analytics and logging across configured AI Gateway traffic, with plan and feature-specific limits |
| Pricing source | Live KeepRouter catalog and prepaid ledger are authoritative for the KeepRouter customer charge | Cloudflare's current pricing page, provider charges, Workers AI terms, feature charges, and Unified Billing rules may all be relevant |
When KeepRouter is the better fit
KeepRouter is the more direct product when an application wants to create an account, select an existing catalog model, fund prepaid credit, create a restricted key, and make a measured request without first configuring Cloudflare gateways or provider accounts. Current customer prices and price units are published in the model catalog, and the OpenAPI document defines the public routes.
KeepRouter is not a replacement for Cloudflare AI Gateway's documented customer-configurable policy surface. It does not promise equivalent DLP, guardrails, dynamic routing, provider BYOK, Cloudflare log storage, or Cloudflare account controls.
When Cloudflare AI Gateway is the better fit
Cloudflare AI Gateway is the more natural option for teams already operating on Cloudflare that need to observe and control AI calls across providers or Cloudflare model services. Its official overview and feature pages document logging, analytics, caching, rate limiting, retries, fallbacks, dynamic routing, spend limits, DLP, authentication, and other controls. Its current REST API adds Cloudflare-authenticated access to several API shapes and uses Unified Billing for supported third-party models.
Endpoint age matters during implementation. Do not start an ordinary single-model integration on the deprecated legacy Universal Endpoint or the deprecated single-model use of /compat/chat/completions. Cloudflare's current documentation still requires /compat/chat/completions for dynamic/{route}; the REST API does not currently cover that dynamic-routing call path.
Data controls also have separate scopes. Cloudflare documents ZDR only for Unified Billing traffic that uses Cloudflare-managed credentials; it does not apply to BYOK or other AI Gateway requests. ZDR does not disable AI Gateway logging, which is enabled by default and must be configured separately.
Cloudflare's pricing cannot be reduced to a single free-or-paid label. The official pricing page distinguishes core features, log storage, paid-platform dependencies, Workers AI usage, guardrail inference, Logpush, and Unified Billing. Consult the current page rather than copying a fee or allowance into architecture documentation.
Migrate from Cloudflare AI Gateway to KeepRouter
- Identify whether the application uses provider-specific proxy URLs, the Cloudflare REST API, Workers AI bindings, Unified Billing, custom headers, caching, retries, fallbacks, spend limits, DLP, or dynamic routes.
- Match only the required models and operations to KeepRouter's live catalog and OpenAPI. Cloudflare model identifiers and route paths are not KeepRouter IDs.
- Replace Cloudflare authentication with a scoped KeepRouter key and use the KeepRouter endpoint listed for the selected model.
- Rebuild any Cloudflare policy that remains a requirement outside KeepRouter rather than assuming the managed model service provides it.
- Validate payloads, stream events, tools, usage, error and retry behavior, customer charges, and data handling before removing the Cloudflare path.
Migrate from KeepRouter to Cloudflare AI Gateway
Choose the current Cloudflare REST API or a documented provider-native path; they have different credentials, URLs, billing, and model support. Do not build a new standard single-model integration on the legacy Universal Endpoint or /compat/chat/completions. Keep /compat/chat/completions only when the documented requirement is a dynamic route. Create the Cloudflare account resources and provider credentials or Unified Billing balance required by the selected path, map every KeepRouter public ID to a documented Cloudflare model identifier, and recreate spend, rate, cache, routing, logging, and security policy explicitly. KeepRouter credit and private route mappings do not transfer.
Use both without confusing the ledgers
An operator can place Cloudflare AI Gateway on a selected outbound provider path while KeepRouter remains the application-facing account, key, catalog, prepaid balance, and final customer ledger. Cloudflare can then apply the logging or policy configured for that outbound path. This is an operator architecture, not a self-serve promise that a KeepRouter customer can insert an arbitrary Cloudflare gateway into private routing.
Keep the two sources of truth separate: Cloudflare cost analytics may estimate or report its layer, while KeepRouter's transaction and usage records determine the KeepRouter customer charge. Avoid enabling overlapping caches, retries, fallbacks, or spend blockers without testing which layer handled an attempt and how a cached or failed request is recorded.
Related paths
Start with best AI gateways and managed versus self-hosted gateways to confirm the operating model. Then use the AI gateway evaluation guide, API observability, model routing, usage-based billing, and security before adopting a layered design.
Cloudflare facts on this page were reviewed on 15 August 2026 against the official AI Gateway Overview, Features, Pricing, REST API, legacy endpoint, Unified Billing, Logging, and Limits documentation. Recheck those pages because features, limits, billing, and endpoint support change independently.
Frequently asked questions
Is KeepRouter the same product as Cloudflare AI Gateway?
No. KeepRouter is an independently operated managed model service running on Cloudflare infrastructure. Cloudflare AI Gateway is a separate Cloudflare product with its own account, configuration, features, and billing paths.
Does KeepRouter use Cloudflare AI Gateway upstream?
This page does not disclose or infer current private upstream routing. It describes a possible operator-layered architecture, not a statement about production channels.
Can I use Cloudflare AI Gateway and KeepRouter together?
An operator can layer Cloudflare AI Gateway on a selected outbound path, but the credentials, retries, caches, policies, analytics, and billing ledgers must have explicit ownership and separate validation.
Which product owns the final customer charge in a layered setup?
For a KeepRouter customer request, KeepRouter's prepaid ledger and usage record determine the KeepRouter charge. Cloudflare cost analytics or billing describe the Cloudflare layer and must not be substituted for that ledger.
Is Cloudflare AI Gateway free?
Use the current official pricing page. It distinguishes core features, plan-dependent log limits, feature-specific charges, Workers AI usage, Logpush, and Unified Billing instead of one universal price statement.
Sources reviewed
Sources last reviewed 2026-08-15
- [1] Cloudflare AI Gateway Overview
- [2] Cloudflare AI Gateway Features
- [3] Cloudflare AI Gateway Pricing
- [4] Cloudflare AI Gateway REST API
- [5] Cloudflare AI Gateway Unified Billing
- [6] Cloudflare AI Gateway Logging
- [7] Cloudflare AI Gateway Limits
- [8] Cloudflare legacy Universal Endpoint (deprecated)
- [9] Cloudflare Unified API (single-model use deprecated)
- [10] KeepRouter OpenAPI
- [11] KeepRouter models and pricing
- [12] KeepRouter security and data handling