Docs/Documentation

Getting Started

Quick Start

Last updated May 28, 2026

Get a real Cencori integration running in a new or existing product.

This guide gets a real Cencori request running. If you already have an app, use Add Cencori to an Existing Product for the dashboard-to-code path.

Cencori sits between your app and model providers, so there are two separate setup pieces:

  • Cencori project key: authenticates your app to Cencori. This is the CENCORI_API_KEY value your code uses.
  • Provider access: lets Cencori route to OpenAI, Anthropic, Google, or another provider. Use Cencori managed access when it is enabled for your project, or add your own provider key in Project > Providers.

If your first request says Provider 'openai' is not configured, your Cencori key is valid. You still need provider access for that model.

1. Create a Project

  1. Sign up at cencori.com/signup.
  2. Create an organization and project.
  3. Open the project, then go to API Keys.
  4. Generate a secret key for server-side use.

Store the key as an environment variable:

Codetext
# .env.local for Next.js, .env for most Node apps
CENCORI_API_KEY=csk_...

Keep csk_... keys on the server. Do not put them in browser code or NEXT_PUBLIC_* variables.

2. Choose a Working Model

Choose the model you want to call, then make sure your project can route to it:

  1. Open Models or Playground in your project.
  2. Pick one model ID for the first test.
  3. If a free, managed, or catalog model is enabled for your project, use that first.
  4. If you want BYOK or a custom provider, open Project > Providers and add the provider before testing.

For the fastest first test, use one known model such as gpt-4o, claude-sonnet-4.5, or gemini-2.5-flash.

3. New Product: Scaffold an App

If you are starting a new app, use the scaffolder:

Codetext
npx create-cencori-app my-ai-app --template nextjs
cd my-ai-app

Open .env.local, paste your Cencori project key, then run:

Codetext
npm run dev

4. Existing Product: Follow the Dashboard-to-Code Guide

If you already have a product, do not start with a blank scaffold. Follow Add Cencori to an Existing Product to wire Cencori into your current backend, OpenAI client, or framework.

The short version:

  1. Pick a model in the dashboard.
  2. Create a csk_... key in API Keys.
  3. Store it as CENCORI_API_KEY on your server.
  4. Change your SDK client or base URL.
  5. Send one request and confirm it appears in Logs.

5. Verify With cURL

This test removes your framework from the equation:

Codetext
curl https://cencori.com/api/ai/chat \
  -H "CENCORI_API_KEY: $CENCORI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'

For OpenAI-compatible clients:

Codetext
curl https://api.cencori.com/v1/chat/completions \
  -H "Authorization: Bearer $CENCORI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'

6. View in Dashboard

All requests are logged in your dashboard with:

  • Full prompt and response
  • Token usage and costs
  • Latency metrics
  • Security scan results

Common Setup Issues

SymptomWhat it usually meansFix
Missing API key or Invalid API keyYour Cencori project key is absent, revoked, or in the wrong headerSet CENCORI_API_KEY, restart your server, and use CENCORI_API_KEY for native endpoints or Authorization: Bearer ... for OpenAI-compatible clients
Provider 'openai' is not configuredCencori auth worked, but the project cannot route to that upstream providerAdd provider access in Project > Providers or choose a model whose provider is configured
No request appears in LogsYour app is still calling the provider directlyCheck the base URL, SDK import, and server route
Works locally but fails in productionThe production environment is missing CENCORI_API_KEYAdd the env var to Vercel, Render, Fly, or your host and redeploy
Browser bundle exposes csk_...Secret key was used client-sideMove Cencori calls into a server route; only use publishable keys for browser-specific flows

Next Steps

TopicDescription
Add Cencori to an Existing ProductStep-by-step dashboard-to-code setup
AI GatewayLearn about multi-provider routing
Cencori SDKExplore SDK methods
Vercel AI SDKUse Cencori with streamText() and useChat()
SecurityConfigure security rules