API Keys
Generate New API Key for Current User
POST
/api/identity/api-keys/meOverview
Creates a new personal API token or BYOK credential. The raw plaintext key secret is returned only once in this response.
Authentication & Headers
- Auth: Bearer Token
- Required Header:
API-Version: 1
Parameters & Request Body
name(string, required): Descriptive label for the key.is_byok(boolean, optional, default: false): Set to true if configuring personal third-party LLM key.expires_days(integer, optional, default: 90): Key expiration validity period in days.
Body permintaan
application/json
namestringwajibdescriptionstring | nullexpires_atstring (date-time) | null{
"name": "string",
"description": "string",
"expires_at": "2026-01-01T00:00:00Z"
} Respons
201 API key generated successfully
400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).
401 Unauthorized - Missing, invalid, or expired JWT Bearer token.
403 Forbidden - Insufficient role permissions or resource access denied by RBAC policy.
404 Not Found - The requested resource ID was not found.
422 Validation Error
detailobject[]detail[].locstring | integer[]wajibdetail[].msgstringwajibdetail[].typestringwajibdetail[].inputobjectdetail[].ctxobject{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Contoh
curl -X POST "$PINTER_URL/api/identity/api-keys/me" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","expires_at":"2026-01-01T00:00:00Z"}'