Skip to main content

GET /api-keys/:keyId

This endpoint returns detailed information about a single API key, including its metadata and usage statistics.

Path Parameters

keyId
string
required
The ID of the API key to retrieve.

Response

metadata
object
An object containing the key’s metadata.
name
string
description
string
permissions
array
usage
object
An object containing usage statistics for the key.
security
object
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"
  }
}