Docs/Documentation

Getting Started

Introduction

Last updated May 28, 2026

Cencori sits between your app and AI providers. One SDK for routing, security, and billing.

Cencori sits between your application and AI model providers like OpenAI, Anthropic, and Google. You send requests through Cencori instead of directly to the provider. Cencori routes them, scans them for security issues, logs everything, and bills your end users automatically.

One SDK. One API key. You stop building proxy servers, PII filters, and billing pipelines — and start shipping your product.


Who it's for

You're building an AI product that real people pay to use — a SaaS with chat, a coding tool, a customer support agent, anything that calls an LLM on behalf of your users.

You need to:

  • Call multiple model providers without managing separate API keys and failover logic
  • Stop sensitive data (names, emails, credentials) from leaking into prompts
  • Charge your users based on how much AI they actually consume

Cencori does all three. You add one package and move on.


What you get

AI Gateway

One endpoint, 100+ models. Send a request with any supported model ID and Cencori routes it to the right provider.

  • Routing & failover — if a provider is down, requests are rerouted automatically
  • Security scanning — PII is masked and prompt injections are blocked before the request leaves Cencori
  • Logs — every request is logged with the full prompt, response, token count, cost, and latency

End-User Billing

Meter AI usage per user and charge them for it. Cencori tracks every token, applies your markup, and handles payments through Stripe Connect.

  • Prepaid wallets — users load credits, spend them on AI calls, and get cut off when they run out
  • Spend caps — set hard limits so one user can't blow through your provider budget
  • Flexible pricing — percentage markups, flat fees, or custom tiers per plan

How it works

Your App
csk_project_key
Cencori
Route
Pick model, failover, cache
Scan
Block PII, injections
Bill
Meter tokens, charge user
response
Your Users

Try it

Install the SDK, add your project key, and make a request:

Codetext
import { Cencori } from 'cencori';
 
const cencori = new Cencori({
  apiKey: process.env.CENCORI_API_KEY,
});
 
const response = await cencori.ai.chat({
  model: 'claude-sonnet-4.5',
  messages: [{ role: 'user', content: 'Summarize this document.' }],
  billing: {
    userId: 'user_123',
  },
});
 
console.log(response.content);
console.log(response.usage); // tokens tracked and billed to user_123

That's it. The request is routed, scanned, logged, and billed — in one call.


Next steps

Quick StartGet a key and make your first request.
Add to an existing appWire Cencori into a Next.js or Python backend you already have.
AI GatewaySee all supported models, routing, and failover options.
End-User BillingSet up Stripe Connect, wallets, and pricing.
SecurityConfigure PII masking and prompt injection rules.