Skip to main content

GET /api-keys/

This endpoint returns detailed information about a single API key. For security, the full key value is never returned.

Path Parameters

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

Response

id
string
The unique identifier for the API key.
name
string
The user-defined name for the key.
keyPreview
string
A masked preview of the key (e.g., llm_1234...abcd).
isActive
boolean
Whether the key is active and can be used.
lastUsedAt
string
ISO 8601 timestamp of when the key was last used.
createdAt
string
ISO 8601 timestamp of key creation.
curl -X GET https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456 \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "id": "llm_1706123456_abc123def456",
  "name": "Production Key",
  "keyPreview": "llm_1706...f456",
  "description": null,
  "permissions": [],
  "isActive": true,
  "lastUsedAt": "2026-01-20T15:30:00.000Z",
  "expiresAt": null,
  "createdAt": "2026-01-01T10:00:00.000Z"
}