API Keys

Create an API key limited to projects

Changed on

Creates an API key limited to the projects in project_ids, owned by the same user as the calling key, and returns its secret token once: store it, since it cannot be read again. The key sees only those projects (any other project answers ERR_PROJECT_NOT_FOUND) and cannot act on the whole account, and the set of projects never changes. This endpoint never creates an account-wide key; create one in the app under API Keys. scope is read (default) or read_write. Every project must be one the caller can access: a project of another account, a deleted one or an unknown id answers ERR_PROJECT_NOT_FOUND and nothing is created. A user can hold up to 500 active keys; past that the request answers ERR_LIMIT_REACHED until a key is revoked. Requires an account-wide read_write scope API key on the Scale plan or above: a key limited to some projects answers ERR_KEY_PROJECT_SCOPED. A team member needs permission to create API keys and can only choose projects they can access.

post/api_keys

Request

  • Base URL
    https://api.llmpulse.ai/api/v1
  • URL
    https://api.llmpulse.ai/api/v1/api_keys
  • Auth
    API key in header Authorization

Request body

namestring required

A label to recognize the key, for example the customer it is for

scope'read' | 'read_write'

read (default) only reads data; read_write can also create, change and delete within the key's projects

project_idsinteger[] required

The projects the key is limited to, at least one

Response

Created. The key as GET /api_keys lists it, plus its secret token, returned only this once.

idinteger required
namestring required
prefixstring required

The visible start of the token, to recognize the key. Never the secret itself.

scope'read' | 'read_write' required
project_scopedboolean required

True when the key is limited to project_ids; false for an account-wide key.

project_idsinteger[] required

The projects the key is limited to; empty for an account-wide key.

created_atstring date-time required
last_used_atstring date-time nullable required

Updated at most once a minute.

revoked_atstring date-time nullable required
tokenstring required

The secret to send as Bearer token. Shown only in this response.

request_idstring

Changes