Docs
A unified API gateway between your app and frontier model providers.
CaiAI provides a single OpenAI-compatible entry point with authentication, routing, metering, and operational controls layered around model traffic.
Request flow
Client applications send OpenAI-style requests to the CaiAI gateway. The gateway authenticates the API key, applies usage and budget controls, selects an enabled routing group, forwards the request to the upstream provider, and records token, latency, and cost data.
Routing and failover
Routing policies can distribute traffic across enabled model channels and account groups. Operators can use health, quota, and limit signals to avoid exhausted or unavailable routes.
Security model
User API keys are scoped per project, can be disabled or rotated, and are designed to keep upstream provider credentials on the server side. Sensitive provider credentials are never exposed to client applications.
Usage analytics
The dashboard records requests, tokens, cache-related token fields where supported, latency, RPM/TPM indicators, and cost summaries so teams can understand spend before it becomes a surprise.
Abuse prevention
Operators can combine registration, key scoping, payment limits, pending-order limits, rate limits, and manual review for higher-volume usage. This keeps small tests easy while protecting production systems.
Billing lifecycle
Users can top up balance or purchase available plans. Orders are created, verified through provider webhooks, and then settled into balance or subscription access once payment is confirmed.