GET /api-keys/:keyId
This endpoint returns detailed information about a single API key, including its metadata and usage statistics.
Path Parameters
The ID of the API key to retrieve.
Response
An object containing the key’s metadata.
An object containing usage statistics for the key.
An object containing security information about the key.
curl -X GET https://api.llmgenerator.com/api/v1/api-keys/key_xxxxxxxxxxxxx \
-H "Authorization: Bearer YOUR_API_KEY"
{
"metadata": {
"name": "Production Key",
"description": "Used for the main application",
"permissions": ["generate"]
},
"usage": {
"totalRequests": 1052,
"lastUsed": "2023-10-27T10:00:00Z"
},
"security": {
"lastUsedIp": "192.168.1.1"
}
}