API keys are essential for authenticating your applications and scripts when interacting with Mistral AI services programmatically.
API keys created within a specific Workspace are scoped to that Workspace, meaning they grant access only to the resources associated with it and will be considered separately for Usage Monitoring purposes.
Steps to create a Workspace-scoped API key
1. Navigate to API keys for the Workspace
🔑 Ensure you have the desired Workspace selected as your active context.
In the left-hand navigation menu for that Workspace, click on API Keys
under the Workspace
settings section.
Click on API Keys
on the left menu
2. Initiate new API key creation
On the Your API keys
page, click the Create new key
button.
Click the Create new key
button
3. Configure API key details
A Create new key
modal window will appear:
Key name (Optional): You may provide a descriptive name (1) for your API key (e.g., "My Project X Integration", "Data Pipeline Key"). This helps you identify its purpose later.
Expiration (Optional): You may set an automatic expiration date for the key (2). If set, the key will cease to function after this date.
🔑 We strongly recommend setting an expiration date for your API keys and regularly rotating them (creating a new key and deleting the old one).
Once configured, click the Create new key
button at the bottom of the modal.
Configuring the API key: (1) Optional name, (2) Optional expiration date
4. Securely store uour API key
An API key created
modal will immediately display your new API key in clear text.
🚨 Important: This is the only time your API key will be shown in its entirety. Copy the key immediately and store it in a secure location (e.g., a password manager or secrets vault). You will not be able to retrieve the full key again after closing this modal.
After copying the key, click Done
.
Modal displaying the newly created API key
Your new API key will now be listed on the API Keys
page (though only a portion of it will be visible for security).
Deleting an API Key
If an API key is compromised or no longer needed, you should delete it immediately:
Navigate to the
API Keys
page for the relevant Workspace.Locate the key you wish to delete in the list.
Click the "trash" icon twice associated with that key to confirm deletion.
Click on the trash icon do delete your API key
📌 You can also create API keys from the Admin Platform interface. However, API keys cannot be scoped at the Organization level. Even when creating a key via the Admin Platform, you will still need to select a specific Workspace for which the key will be generated and scoped.