Skip to main content

API Keys

API keys authenticate requests from your embedded Char AI widgets to the backend.

Key Types

TypePurposeVisibility
Site API KeyWidget authenticationClient-side (public)
Organization JWTAPI managementServer-side (private)

Creating API Keys

1

Select a Site

Navigate to the site you want to create a key for.
2

Generate Key

Click Create API Key and provide a descriptive name.
3

Copy Key

Copy the key immediately - it won’t be shown again.

Using API Keys

Include the API key when initializing the widget:
const widget = new CharWidget({
  apiKey: 'char_sk_live_...',
  containerId: 'chat-widget'
});

Key Rotation

Rotate keys periodically for security:
  1. Create a new API key
  2. Update your application to use the new key
  3. Monitor for any failed requests
  4. Delete the old key