Getting Started with Cencori
0/9 completeStep 4 of 9
Generate API Key
Now let's create a Cencori API key that your application will use to make requests.
API Key Types
Cencori uses prefixed API keys to help you identify their type:
| Prefix | Type | Use Case |
|---|---|---|
| csk_ | Secret | Server-side only, full access |
| cpk_ | Publishable | Browser-safe, domain-restricted |
| csk_test_ | Test | Development environment |
Create a Secret Key
For this tutorial, we'll create a secret key for server-side use:
- 1
Go to API Keys
In your project sidebar, click API Keys
- 2
Click "Generate New Key"
Choose "Secret" as the key type
- 3
Copy the key immediately
It will only be shown once!
Copy your key now! For security, we only show the full key once. If you lose it, you'll need to generate a new one.
Store Your Key Safely
Save your key in a .env.local file:
CENCORI_API_KEY=csk_your_key_here
Make sure .env.local is in your .gitignore!