Generate an API key
Target Audience: Developers & Non technical users
Goal
Obtain an API key to securely authenticate server-side requests to Toucan AI.
Prerequisites
A Toucan AI account with active access.
Permissions to modify user profile and security settings.
Steps
1. Open security settings
Locate the user profile icon (containing your initials) in the bottom-left corner of the Toucan AI interface.
Click the icon and select the Account settings from the navigation menu.
2. Navigate to API keys
Scroll to the API Keys section.
This area displays existing keys and allows for the creation of new credentials.
3. Generate the key
Click the Create API Key button.
Toucan AI will generate and display a new unique string.
4. Secure the credential
Copy the key immediately and save it in a secure environment, such as a password manager or your application’s environment variables (
.env).
Security Alert: Never expose this key in client-side code, public repositories, or frontend scripts, as it grants administrative access to generate session tokens.

API key functionality
The API key acts as a master credential for the following backend operations:
Token Generation: Requesting signed session tokens for embedded dashboards and the AI assistant.
Access Control: Defining user permissions and roles within the generated tokens.
Data Filtering: Passing attributes for Row-Level Security (RLS) enforcement.
Conclusion
The API key is now active and stored for backend use. This credential serves as the foundation for authenticating your users and delivering personalized analytics experiences.
Suggested Next Step: How-to: Generate a token
Last updated
Was this helpful?
