Quick Start

Get started with Cencori in under 5 minutes. This guide will walk you through installation, initialization, and making your first secured AI request.

Prerequisites

Before you begin, make sure you have:

  • Node.js 18+ installed on your system
  • A Cencori account: Sign up at cencori.com/dashboard
  • An AI provider API key: From OpenAI, Anthropic, or Google

Step 1: Installation

Install the Cencori SDK using your preferred package manager:

JavaScript/TypeScript

terminal

Step 2: Get Your API Keys

Create a Project

  1. Log in to your Cencori dashboard
  2. Click "Create Project" and give it a name
  3. Navigate to "API Keys" in the project settings
  4. Click "Generate New Key" and copy it immediately (it won't be shown again)

Add Your AI Provider Key

In your project settings, add your AI provider's API key under "Provider Keys". Cencori will use this to make requests on your behalf.

Step 3: Initialize the SDK

Create a Cencori client instance with your API key:

JavaScript/TypeScript

lib/cencori.ts

Tip: Store your API keys in environment variables (.env file) and never commit them to version control.

Step 4: Make Your First Request

Replace your existing AI provider calls with Cencori's unified API:

JavaScript/TypeScript

app/api/chat/route.ts

Step 5: View Your Logs

After making your first request, visit your Cencori dashboard to see:

  • Request Logs: Every prompt and response with full metadata
  • Security Incidents: Any threats detected and blocked
  • Usage Analytics: Token consumption, costs, and latency metrics
  • Rate Limit Status: Current usage against your limits

Switching Between AI Providers

One of Cencori's key features is multi-provider support. Change the model parameter to switch providers without changing your code:

example.ts

All requests are logged and monitored the same way, regardless of the underlying provider.

What's Next?

Now that you have Cencori set up, explore these topics to unlock its full potential:

  • Configure Rate Limits: Set per-user or per-organization limits
  • Set Up Security Policies: Define custom rules for threat detection
  • Export Logs: Integrate with your data warehouse or compliance tools
  • Monitor Costs: Set budget alerts and spending caps