Skip to main content

Overview

This guide explains how to generate and manage API keys for authenticating requests to our API. Proper use of API keys is critical for securing your application and controlling access.

Generating an API Key

To generate API Key, navigate to Settings -> API Keys, and click the Generate New Key + button. create key You can assign fine-grained permissions to each key, allowing you to create multiple keys with specific scopes or roles. This enhances the security of your application by limiting each key’s responsibilities. Additionally, you can set an expiration date for each key. We strongly recommend always setting an expiration date to avoid using indefinitely valid keys.
Ensure that all API keys are stored securely and never shared in untrusted environments or with third-party applications.
Once a key is generated, you will be able to copy it for immediate use. copy key
The key value is displayed only once. If you lose it, you will not be able to retrieve it again.

Revoking an API Key

If you no longer need a particular API key go to Settings -> API Keys, find your key on the list and click on Remove button on the right side.

What a key can access

A key acts as the user who created it. Each request must pass two checks:
  1. Scope: the key has the permission the endpoint requires, read or write.
  2. Role: the user is allowed to do it. Team resources need team membership, and admin actions need the team admin role.
Scopes only narrow what the user can already do. A key never grants team membership or an admin role. A key is not tied to a single team. It can reach every team its user belongs to, within its scopes. To keep a key away from a team’s resources, give it no scope for them, or create it under a user who is not a member of that team. Each product’s resources are reached only through that product’s scope.

Permissions reference

These are the permissions shown when you create a key. The scope key is the name the API and CLI use. The Tokens permission (tokens) is not offered when you create a key in the dashboard.

Slurm cluster permissions

Model Factory Slurm clusters belong to a team. Access needs both the scope and the team role: Resizing uses factory:write, not slurm_clusters:write, so a key that manages cluster members cannot change how many nodes the team holds. factory:write can only be added to a key by a user who is an admin of at least one team. Renaming, deleting, sudo access and accounting are not available to API keys. Use the dashboard for those.

Inference deployment permissions

Managing dedicated endpoints requires Model Factory permissions, factory:read for listing the catalog and reading deployments, and factory:write for creating, scaling, and deleting deployments. Sending model requests requires Inference permission. A key’s scopes do not grant team membership or an admin role. See the deployment API reference.

Prime Traces permissions

For Traces SDK and CLI operations, create a key with the required Prime Traces read/write permissions. Confirm the personal or team workspace as well as the key permissions. See Traces authentication and workspace selection.