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_KEYvalue 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
- Sign up at cencori.com/signup.
- Create an organization and project.
- Open the project, then go to API Keys.
- Generate a secret key for server-side use.
Store the key as an environment variable:
# .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:
- Open Models or Playground in your project.
- Pick one model ID for the first test.
- If a free, managed, or catalog model is enabled for your project, use that first.
- 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:
npx create-cencori-app my-ai-app --template nextjs
cd my-ai-appOpen .env.local, paste your Cencori project key, then run:
npm run dev4. 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:
- Pick a model in the dashboard.
- Create a
csk_...key in API Keys. - Store it as
CENCORI_API_KEYon your server. - Change your SDK client or base URL.
- Send one request and confirm it appears in Logs.
5. Verify With cURL
This test removes your framework from the equation:
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:
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
| Symptom | What it usually means | Fix |
|---|---|---|
Missing API key or Invalid API key | Your Cencori project key is absent, revoked, or in the wrong header | Set 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 configured | Cencori auth worked, but the project cannot route to that upstream provider | Add provider access in Project > Providers or choose a model whose provider is configured |
| No request appears in Logs | Your app is still calling the provider directly | Check the base URL, SDK import, and server route |
| Works locally but fails in production | The production environment is missing CENCORI_API_KEY | Add the env var to Vercel, Render, Fly, or your host and redeploy |
Browser bundle exposes csk_... | Secret key was used client-side | Move Cencori calls into a server route; only use publishable keys for browser-specific flows |
Next Steps
| Topic | Description |
|---|---|
| Add Cencori to an Existing Product | Step-by-step dashboard-to-code setup |
| AI Gateway | Learn about multi-provider routing |
| Cencori SDK | Explore SDK methods |
| Vercel AI SDK | Use Cencori with streamText() and useChat() |
| Security | Configure security rules |