Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Path Parameters

team_id
string
required

Body

application/json

Request to create an API key.

type
enum<string>
required

Type of the API key.

Available options:
PERSONAL,
WORKSPACE_MANAGE_ALL,
WORKSPACE_EXPORT_METRICS,
WORKSPACE_INVOKE
Examples:

"PERSONAL"

"WORKSPACE_EXPORT_METRICS"

"WORKSPACE_INVOKE"

"WORKSPACE_MANAGE_ALL"

name
string | null

Optional name for the API key

Example:

"my-api-key"

model_ids
string[] | null

List of model IDs to scope the API key to, only present if type is 'WORKSPACE_EXPORT_METRICS' or 'WORKSPACE_INVOKE'

Example:

Response

200 - application/json

Represents an API key.

api_key
string
required

The API key string