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, duration, 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, duration, 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.
Start sending requests in minutes
CaiAI exposes an OpenAI-compatible endpoint. Authenticate with your API key, send a standard chat completion request, and traffic is routed to an enabled upstream provider automatically.
1. Get your API key
Create a project key from the API Keys page. Keys are scoped per project and can be rotated or disabled at any time.
2. Point your client at CaiAI
Use the endpoint below as the base URL in any OpenAI-compatible client or SDK — no provider-specific setup is required.
3. Send a chat completion
Call /v1/chat/completions with a model from your routing group. Responses follow the standard OpenAI shape.
Example request
curl https://api.caiaiu.com/v1/chat/completions \
-H "Authorization: Bearer $CAIAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "Hello"}]
}'Model names follow the OpenAI convention. Before hardcoding a model ID, confirm the live list on the Channels page — new models may be added and unavailable ones removed.