v1

latestOpenAPI 3.1.02026-07-26157321426.3 KB

Creates an API key

Creates an API key with the provided name and type. The API key is returned in the response.

post/v1/api_keys

Request body

namestring nullable

Optional name for the API key

type'PERSONAL' | 'WORKSPACE_MANAGE_ALL' | 'WORKSPACE_EXPORT_METRICS' | 'WORKSPACE_INVOKE' | 'WORKSPACE_MANAGE_API_KEYS' required

Enum representing the category of an API key.

model_idsstring[] nullable

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

Example request

{
  "name": "my-api-key",
  "model_ids": [
    "aaaaaaaa"
  ]
}

Response

api_keystring required

The API key string