Skip to content
On this page

API keys

Create, store, and revoke the credentials used by your applications.

Keys and account sign-in

API keys allow an application to access the model API. Account sign-in allows you to manage resources in the console. These credentials serve different purposes.

Create and store a key

Choose Create API key on the API keys page. Enter a name and submit. Copy and save the full key before closing the dialog; it cannot be shown again. The list shows each key's name, masked value, status, creation date, and last recorded use.

The page allows up to 50 keys. Once the limit is reached, you cannot create another key.

Use names such as Production and Development to identify each key. Avoid putting personal or secret information in a key name.

dotenv
# Configure on your server only.
SAND_API_KEY=your_api_key

Store the key in a server-side environment variable or a controlled secret management service. Browser code, mobile clients, and public source code are not suitable places for the full key.

Manage existing keys

Use the key name and your application's server configuration to identify where a key is used. You can rename a key, enable or disable it, or delete a key you no longer need. Applications using a disabled or deleted key can no longer access the API.

When replacing a key, create and save the new key if you have an available slot, then update your application's server configuration. Confirm that the new key works before disabling or deleting the old one.

Lost or exposed keys

SituationNext step
The dialog was closed before savingThe full key cannot be recovered. Delete the unsaved key, then create and save a new one.
A key appears in public code or logsDisable or delete the exposed key immediately, remove it from public content, and update the key in your application.
You do not know which application uses a keyCheck its name against your applications' server configurations.