Getting Started with Cencori

0/9 complete
Step 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:

PrefixTypeUse Case
csk_SecretServer-side only, full access
cpk_PublishableBrowser-safe, domain-restricted
csk_test_TestDevelopment environment

Create a Secret Key

For this tutorial, we'll create a secret key for server-side use:

  1. 1

    Go to API Keys

    In your project sidebar, click API Keys

  2. 2

    Click "Generate New Key"

    Choose "Secret" as the key type

  3. 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!