The unified infrastructure for AI production.
Ship AI with built-in security, observability, and scale. One platform for everything — from gateway to compute to workflows.
Building a demo is easy. Building a production-grade AI business is hard.
Most teams spend 80% of their time building "the boring stuff"—security, cost controls, orchestration, and reliable storage—instead of their core product. Cencori is the unified infrastructure that handles all of that for you.
- Stop Building Scaffolding — Skip the 12-month build cycle for internal AI security and reliability layers.
- Unified Logic — Route, execute, and store AI data through a single, secure infrastructure.
- Production-Ready by Default — Built-in compliance, observability, and scale from your first request.
- Future-Proof Infrastructure — Switch models, add compute, or chain workflows without rewriting your entire stack.
Cencori is the "Production Button" for AI.
Cencori provides the five foundational building blocks required to ship and scale AI.
The secure, unified API for all your AI models.
- Multi-Provider Support — One API for OpenAI, Anthropic, Gemini, Llama, and more.
- Opt-in Security — PII detection and prompt injection blocking when you enable it in Project > Security (off by default; identical for BYOK and managed keys).
- Streaming & SSE — Real-time responses with built-in token counting and cost tracking.
- Global Observability — Complete audit logs and analytics for every request.
Serverless execution for AI agents and logic.
- Secure Sandboxing — Execute vibe-coded logic and agent steps in an isolated environment.
- Edge Inference — Run lightweight models and functions closer to your users.
- Auto-Scaling — Scale from prototype to millions of requests without managing servers.
Visual orchestration for complex AI pipelines.
- Multi-Step Agents — Chain multiple AI calls, logic steps, and human-in-the-loop approvals.
- Safety Circuit Breakers — Prevent cascading failures and runaway loops in autonomous agents.
- State Management — Native persistence for long-running AI processes.
AI-native storage for context and integrity.
- Vector Sync — Seamlessly manage and query vector embeddings for RAG.
- Immutable Audit Logs — Guaranteed traceability for compliance and behavioral analysis.
- Semantic Caching — Reduce costs and latency by caching similar AI responses.
Connect your AI to the tools your business already uses.
- Business Connectors — Native integration with Salesforce, Slack, GitHub, and internal databases.
- Credential Management — Securely store and inject third-party API keys into your AI workflows.
- Event Triggers — Start AI workflows based on external system events.
JavaScript/TypeScript:
npm install cencoriPython:
pip install cencoriGo:
go get github.com/cencori/cencori-go- Sign up at cencori.com
- Create a project
- Generate a project API key in Project > API Keys
- Confirm provider access in Project > Providers for the model you want to call
Your Cencori key (csk_...) authenticates your app to Cencori. Provider access controls where Cencori routes the upstream model request.
JavaScript/TypeScript:
import { Cencori } from 'cencori';
const cencori = new Cencori(); // reads CENCORI_API_KEY
const response = await cencori.ai.chat({
messages: [{ role: 'user', content: 'Hello!' }],
model: 'claude-opus-5-5' // flagship, default for most workloads; also 'claude-sonnet-5', 'gemini-3.1-pro-preview'
});
console.log(response.content);Python:
from cencori import Cencori
cencori = Cencori() # reads CENCORI_API_KEY
response = cencori.ai.chat(
messages=[{"role": "user", "content": "Hello!"}],
model="claude-opus-5-5" # flagship, default for most workloads; also "claude-sonnet-5", "gemini-3.1-pro-preview"
)
print(response.content)Go:
package main
import (
"context"
"fmt"
"os"
"github.com/cencori/cencori-go"
)
func main() {
client, _ := cencori.NewClient(
cencori.WithAPIKey(os.Getenv("CENCORI_API_KEY")),
)
resp, _ := client.Chat.Create(context.Background(), &cencori.ChatParams{
Model: "claude-opus-5-5",
Messages: []cencori.Message{
{Role: "user", Content: "Hello!"},
},
})
fmt.Println(resp.Choices[0].Message.Content)
}JavaScript/TypeScript:
const stream = cencori.ai.chatStream({
messages: [{ role: 'user', content: 'Tell me a story' }],
model: 'gpt-4o',
stream: true
});
for await (const chunk of stream) {
process.stdout.write(chunk.delta);
}Python:
for chunk in cencori.ai.chat_stream(
messages=[{"role": "user", "content": "Tell me a story"}],
model="gpt-4o"
):
print(chunk.delta, end="", flush=True)Go:
stream, _ := client.Chat.Stream(context.Background(), &cencori.ChatParams{
Model: "gpt-4o",
Messages: []cencori.Message{
{Role: "user", Content: "Tell me a story"},
},
})
for chunk := range stream {
if len(chunk.Choices) > 0 {
fmt.Print(chunk.Choices[0].Delta.Content)
}
}That's it! Cencori handles logging and cost tracking automatically. Security scanning is opt-in in Project > Security.
Store and search memories for RAG applications:
// Store a memory
await cencori.memory.store({
namespace: 'docs',
content: 'Refund policy allows returns within 30 days',
metadata: { category: 'policy' }
});
// Semantic search
const results = await cencori.memory.search({
namespace: 'docs',
query: 'what is our refund policy?',
limit: 5
});
// RAG with context
const response = await cencori.ai.rag({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'What is our refund policy?' }],
namespace: 'docs'
});Using Vercel AI SDK (ai package)? Cencori is a drop-in provider:
npm install cencori aiimport { cencori } from 'cencori/vercel';
import { streamText } from 'ai';
const result = await streamText({
model: cencori('gemini-2.5-flash'),
messages: [{ role: 'user', content: 'Hello!' }]
});
return result.toUIMessageStreamResponse();Works with everything in Vercel AI SDK:
streamText()/generateText()- Server-side text generationuseChat()/useCompletion()- React hooks for chat UIsstreamUI()- Generative UI with React Server Components
Same Cencori benefits: Opt-in safety filtering (enable in Project > Security), analytics, cost tracking, multi-provider support.
Access multiple AI providers with one API:
- OpenAI - GPT-4, GPT-4 Turbo, GPT-3.5 Turbo
- Anthropic - Claude 3 Opus, Claude 3 Sonnet, Claude 3 Haiku
- Google Gemini - Gemini 2.5 Flash, Gemini 2.0 Flash
- Custom Providers - Bring your own OpenAI/Anthropic-compatible endpoints
Switch models with a single parameter - no code changes needed.
Generate images from text prompts across providers:
const response = await cencori.ai.generateImage({
prompt: "A futuristic city at sunset",
model: "gpt-image-1.5", // or "gpt-image-1-mini", "gemini-3-pro-image"
size: "1024x1024",
});
console.log(response.images[0].b64_json);Supported Models:
| Provider | Models |
|---|---|
| OpenAI | GPT Image 2, GPT Image 1.5, GPT Image 1, GPT Image 1 Mini |
| Gemini 3 Pro Image, Imagen 3 |
Get AI responses as they're generated:
- Server-Sent Events (SSE) support
- Works with all providers (OpenAI, Anthropic, Gemini)
- Async generator pattern for easy integration
- Automatic token counting and cost tracking
For latency-sensitive calls, opt into the speed profile:
{
"model": "gpt-4o",
"messages": [{ "role": "user", "content": "Answer briefly." }],
"stream": true,
"routing_profile": "speed"
}Speed mode uses the deployment's CENCORI_SPEED_MODEL when configured, caps
input/output size, and starts a fallback only if the primary misses the
configured first-token threshold. Normal requests retain balanced behavior.
Transparent, prepaid pricing model:
- Track costs in real-time
- Set spending limits
- Get alerts for low balances
- Transparent markup on provider costs
- Detailed cost breakdown by provider
Enable per project in Project > Security (off by default). When on:
- PII Detection - Blocks emails, phone numbers, SSNs, credit cards on inputs (
403 security_violation) - Content Safety - Scores injection / jailbreak heuristics against your Safety Threshold
- Safety Scores - Blocked requests log safety scores and incidents for compliance
Output blocking additionally requires a governance policy or custom data rule — the master switch alone does not block outputs. passthrough: true / fast_lane: true skips all guards. Behavior is identical for BYOK and managed keys.
Track everything across all primitives in your dashboard:
- Unified Analytics — One view for Gateway, Compute, and Workflow performance.
- Cost Integrity — Real-time tracking per project, provider, and primitive.
- Safety Monitoring — Instant visibility into filtered requests and security events.
- Latency Heatmaps — Monitor performance across the globe and between providers.
Two types of API keys for different use cases:
| Type | Prefix | Use Case |
|---|---|---|
| Secret | csk_ |
Server-side only, never expose in client |
| Publishable | cpk_ |
Browser-safe, requires domain whitelisting |
| Test | csk_test_ / cpk_test_ |
Development environment |
| Legacy | cen_ |
Existing keys, treated as secret |
Database-backed rate limiting prevents abuse and controls costs.
Cencori works with any OpenAI-compatible agent framework:
- CrewAI - Set
OPENAI_API_BASE=https://api.cencori.com/v1 - AutoGen - Use
base_urlin config - LangChain - Pass
base_urlto ChatOpenAI - OmniCoreAgent - Configure in model_config
One line change → full observability, failover, and security for all agent calls.
Note: Add your provider keys (OpenAI, Anthropic, etc.) in Cencori first—we route to providers using your keys.
Every request is logged with:
- Timestamp and user
- Request/response payloads
- Token usage and cost breakdown
- Provider and model used
- Safety scores and filter results
Security scanner for AI apps. Runs in your terminal:
npx @cencori/scanFeatures:
- Detects 50+ types of secrets (OpenAI, Anthropic, Stripe, AWS, etc.)
- Finds PII, exposed routes, SQL injection, XSS vulnerabilities
- A-F security scoring with detailed reports
- AI-powered auto-fix - automatically fixes issues with your API key
npx @cencori/scan --json # CI/CD mode
npx @cencori/scan --quiet # Score onlySee the full documentation for details.
Building with Cursor, Lovable, Bolt, v0, or Windsurf?
Cencori helps you:
- Ship AI features faster with security built-in
- Catch issues AI-generated code might miss
- Move from prototype to production safely
- Avoid vendor lock-in with multi-provider support
AI design tools, coding assistants, chatbots, content generators?
Cencori provides:
- Enterprise-grade security your customers demand
- Ready-made compliance story for B2B sales
- Infrastructure so you can focus on product
- Cost optimization across multiple providers
| Provider | Models | Streaming |
|---|---|---|
| OpenAI | GPT-5, GPT-4o, GPT-4o Mini, o3, o1 | ✅ |
| Anthropic | Claude Opus 5, Sonnet 5, Opus 4.8 | ✅ |
| Gemini 3 Pro, 2.5 Flash, 2.0 Flash | ✅ | |
| xAI | Grok 4, Grok 4.1, Grok 3 | ✅ |
| Mistral | Mistral Large 3, Codestral, Devstral | ✅ |
| DeepSeek | V3.2, Reasoner, Coder V2 | ✅ |
| Meta | Llama 4 Maverick, Llama 3.3 70B | ✅ |
| + 7 more | Groq, Cohere, Perplexity, Together, Qwen, OpenRouter, HuggingFace | ✅ |
| Custom | Any OpenAI/Anthropic compatible | ✅ |
| Endpoint | Description | Providers |
|---|---|---|
/api/ai/chat |
Chat completions (streaming) | OpenAI, Anthropic, Google, xAI, Mistral, DeepSeek |
/api/ai/embeddings |
Vector embeddings | OpenAI, Google, Cohere |
/api/ai/images/generate |
Image generation | OpenAI (GPT Image), Google (Imagen) |
/api/ai/audio/transcriptions |
Speech-to-text | OpenAI (Whisper) |
/api/ai/audio/speech |
Text-to-speech | OpenAI (TTS-1, TTS-1-HD) |
/api/ai/moderation |
Content moderation | OpenAI |
/api/ai/completions |
Legacy completions | OpenAI |
Cencori is built on a modern, scalable stack:
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Next.js 16 (App Router) | Full-stack platform |
| Auth & Database | Supabase | Authentication & data |
| Language | TypeScript | Type-safe development |
| Deployment | Vercel | Hosting & CI/CD |
| AI Providers | OpenAI, Anthropic, Google | Multi-provider support |
POST /api/ai/chat
Headers: { "CENCORI_API_KEY": "csk_..." }
Body: {
"model": "gpt-4o",
"messages": [
{ "role": "user", "content": "Hello!" }
],
"temperature": 0.7,
"maxTokens": 1000
}POST /api/ai/chat
Headers: { "CENCORI_API_KEY": "csk_..." }
Body: {
"model": "claude-sonnet-4.5",
"messages": [
{ "role": "user", "content": "Tell me a story" }
],
"stream": true
}{
"content": "Hello! How can I help you?",
"model": "gpt-4o",
"provider": "openai",
"usage": {
"prompt_tokens": 10,
"completion_tokens": 15,
"total_tokens": 25
},
"cost_usd": 0.000025,
"finish_reason": "stop"
}import { Cencori } from 'cencori';
const cencori = new Cencori({ apiKey: process.env.CENCORI_API_KEY });
const response = await cencori.ai.chat({
messages: [{ role: 'user', content: 'Explain quantum computing' }],
model: 'gpt-4o',
temperature: 0.7
});
console.log(response.content);const stream = cencori.ai.chatStream({
messages: [
{ role: 'system', content: 'You are a helpful assistant' },
{ role: 'user', content: 'Write a poem about AI' }
],
model: 'claude-sonnet-4.5'
});
for await (const chunk of stream) {
process.stdout.write(chunk.delta);
if (chunk.finish_reason) {
console.log('\\nDone!', chunk.finish_reason);
}
}JavaScript/TypeScript:
import {
Cencori,
AuthenticationError,
RateLimitError,
SafetyError
} from 'cencori';
try {
const response = await cencori.ai.chat({...});
} catch (error) {
if (error instanceof AuthenticationError) {
console.error('Invalid API key');
} else if (error instanceof RateLimitError) {
console.error('Rate limit exceeded');
} else if (error instanceof SafetyError) {
console.error('Content blocked:', error.reasons);
}
}Python:
from cencori import (
Cencori,
AuthenticationError,
RateLimitError,
SafetyError
)
try:
response = cencori.ai.chat(messages=[...])
except AuthenticationError:
print("Invalid API key")
except RateLimitError:
print("Rate limit exceeded")
except SafetyError as e:
print(f"Content blocked: {e.reasons}")Go:
import "errors"
_, err := client.Chat.Create(ctx, params)
if errors.Is(err, cencori.ErrInvalidAPIKey) {
// Handle invalid key
} else if errors.Is(err, cencori.ErrRateLimited) {
// Handle rate limit
} else if errors.Is(err, cencori.ErrContentFiltered) {
// Handle safety filter
}- Node.js 18+
- A Supabase project (free tier works)
- API keys for providers (OpenAI, Anthropic, Google)
-
Clone the repository:
git clone https://github.com/bolaabanjo/cencori.git cd cencori -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile from your internal configuration template and provide:- Supabase project credentials
- Provider API credentials (OpenAI, Anthropic, Google)
- Cache infrastructure credentials (Redis)
- Encryption secret
-
Run database migrations:
# Apply migrations in database/migrations/ to your Supabase project -
Run the development server:
npm run dev
Open http://localhost:3000 to see the dashboard.
Cencori uses a prepaid credits system with transparent markup on provider costs:
- Plans: Free to build and test; Pro ($29/mo) and Team ($99/mo) unlock security, failover, caching, observability, and higher limits
- Credits: All managed AI usage bills to prepaid credits; BYOK calls bill your provider directly
- Transparent Pricing: See exact provider cost + markup
View detailed pricing at cencori.com/pricing
Phase 1 ✅ (Complete)
- Basic AI gateway with Gemini
- Security monitoring
- Dashboard and analytics
Phase 2 ✅ (Complete)
- Multi-provider support (OpenAI, Anthropic)
- Streaming responses
- Credits system
- Custom providers
Phase 3 ✅ (Complete)
- Bring Your Own Keys (BYOK)
- Vercel AI SDK provider (
cencori) - Provider failover and circuit breaker
- Enhanced analytics with provider breakdowns
Phase 4 ✅ (Complete)
- Cencori Scan CLI (
@cencori/scan) - AI-powered auto-fix with Llama 4 Scout
- Security telemetry and analytics
- 50+ detection patterns (secrets, PII, vulnerabilities)
Phase 5 🚧 (In Progress)
- Cencori Scan web UI (scan.cencori.com)
- Unified 5-Primitive Suite (Gateway, Compute, Workflow, Storage, Integration)
- Advanced cost optimization
- Payment integration for credit top-ups
- Additional providers (Cohere, Together.ai, Groq)
Future
- A/B testing infrastructure
- Model performance comparison
- Fine-tuning support
We love contributions! Please see our Contributing Guide for details.
- Documentation: docs.cencori.com
- Dashboard: cencori.com/dashboard
- GitHub: github.com/bolaabanjo/cencori
- Issues: Report a bug
MIT © FohnAI
Built by developers, for developers. Ship AI features with confidence.
