Skip to main content
POST
/
api
/
api-keys
Create API Key
curl --request POST \
  --url https://ninjachat.ai/api/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Production Key"
}
'
{
  "key": "<string>",
  "id": "<string>",
  "prefix": "<string>",
  "name": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API key starting with nj_sk_

Body

application/json
name
string
required

Key name. Alphanumeric characters, spaces, hyphens, and underscores.

Required string length: 1 - 64

Response

API key created. The full key is only returned once.

key
string

Full API key. Shown only once.

id
string
prefix
string
name
string
message
string