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
}
}
}List all your API keys with usage stats and billing info.
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
}
}
}