API Key Management
Create API Key
Create a new API key. The plaintext key is only returned once. Requires an active developer subscription - the API key will match your current plan.
Authorization
BearerAuth AuthorizationBearer <token>
JWT token authentication for API key management
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
name*string
User-defined name for the API key
Response Body
application/json
application/json
curl -X POST "https://api.brainus.lk/api/v1/dev/keys" \ -H "Content-Type: application/json" \ -d '{ "name": "Production API Key" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"api_key": "sk_live_abc123...",
"created_at": "2019-08-24T14:15:22Z"
}Empty
{
"detail": "No active plan found. Please subscribe to a Free or paid plan before creating API keys."
}Empty