Skip to main content
GET
/
api
/
api-keys
List API Keys
curl --request GET \
  --url https://ninjachat.ai/api/api-keys \
  --header 'Authorization: Bearer <token>'
{
  "keys": [
    {
      "id": "<string>",
      "name": "<string>",
      "keyPrefix": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "lastUsedAt": "2023-11-07T05:31:56Z",
      "revokedAt": "2023-11-07T05:31:56Z",
      "usageCount": 123
    }
  ],
  "stats": {
    "activeKeys": 123,
    "totalUsage": 123
  },
  "billing": {
    "hasCredits": true,
    "balanceCents": 123,
    "balanceFormatted": "$42.50",
    "rateLimit": {
      "requests": 60,
      "windowSeconds": 60
    },
    "usage": {
      "chat": {
        "count": 123,
        "costCents": 123
      },
      "search": {
        "count": 123,
        "costCents": 123
      },
      "images": {
        "count": 123,
        "costCents": 123
      },
      "totalSpentCents": 123
    }
  }
}

Authorizations

Authorization
string
header
required

API key starting with nj_sk_

Response

API key list with billing info.

keys
object[]
stats
object
billing
object