Skip to main content

GET /api-keys

This endpoint returns a list of all API keys associated with the authenticated user’s account. For security, the full API key value is never returned - only a preview.

Response

apiKeys
array
An array of API key objects.
total
number
Total number of API keys.
curl -X GET https://api.llmgenerator.com/api/v1/api-keys \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "apiKeys": [
    {
      "id": "llm_1706123456_abc123def456",
      "name": "Production Key",
      "keyPreview": "llm_1706...f456",
      "isActive": true,
      "lastUsedAt": "2026-01-20T15:30:00.000Z",
      "createdAt": "2026-01-01T10:00:00.000Z"
    },
    {
      "id": "llm_1706234567_xyz789abc012",
      "name": "Development Key",
      "keyPreview": "llm_1706...c012",
      "isActive": true,
      "lastUsedAt": null,
      "createdAt": "2026-01-15T09:00:00.000Z"
    }
  ],
  "total": 2
}