Choose an API key type
You can create the following types of API keys:- Personal keys are associated with individual users. You can view and copy the key value only during key creation.
- Organization keys are owned by a service account and are intended for automations. Anyone in the organization can view and copy the key value at any time.
Choose access scopes
Grant each API key only the access that it needs. You can select one or both of the following scopes:- Model access grants access to the inference APIs, allowing the key to run inference on any model available to your organization.
- Developer access grants access to the deployment and management APIs, allowing the key to access organization resources and manage infrastructure. Some operations such as running benchmarks also require your organization to have the corresponding features enabled.
Create an API key
To create an API key:- Open the API keys page.
- Next to Personal keys or Organization keys, click + Create.
-
Enter the following information:
- Name: Enter a short, descriptive name for the key.
- Description: Optionally, describe how the key is used.
- Model access: Enable this option for keys that call inference endpoints.
- Developer access: Enable this option for keys that manage infrastructure programmatically.
- Expires: Select when the key expires. You can’t use the key after this date.
- Click Submit.
- If you created a personal key, copy the API key and store it in a secure location. You can’t access the value of a personal key after you close the dialog.
You can’t regenerate an API key. To replace a key while preserving its name,
delete the existing key and create a new key with the same name.