Getting Started
Installation
Last updated March 3, 2026
Install the Cencori SDK in your project.
Install the official Cencori SDK for your preferred language.
TypeScript / Node.js
npm install cencori
# or: yarn add cencori
# or: pnpm add cencoriPython
pip install cencoriGo
go get github.com/cencori/cencori-goRequirements
- Node.js 18+
- TypeScript 5+ (optional, but recommended)
Configuration
import { Cencori } from 'cencori';
const cencori = new Cencori({
apiKey: process.env.CENCORI_API_KEY,
// Optional configuration
baseUrl: 'https://cencori.com', // Default
timeout: 30000, // 30 seconds
retries: 3 // Retry failed requests
});Environment Variables
# .env
CENCORI_API_KEY=csk_live_...The SDK automatically reads CENCORI_API_KEY if no apiKey is provided:
// Uses CENCORI_API_KEY from environment
const cencori = new Cencori();TypeScript Support
The SDK is written in TypeScript and includes full type definitions:
import { Cencori, ChatRequest, ChatResponse } from 'cencori';
const request: ChatRequest = {
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello' }]
};
const response: ChatResponse = await cencori.ai.chat(request);Next Steps
See Making Your First Request to start using the SDK.