> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API-Schlüsseldetails abrufen

> Dieser Endpunkt liefert die Details eines bestimmten API-Schlüssels.

## GET /api-keys/{keyId}

Dieser Endpunkt gibt detaillierte Informationen zu einem einzelnen API-Schlüssel zurück. Aus Sicherheitsgründen wird der vollständige Schlüsselwert nicht zurückgegeben.

### Pfadparameter

<ParamField path="keyId" type="string" required>
  Kennung des abzurufenden API-Schlüssels.
</ParamField>

### Antwort

<ResponseField name="id" type="string">
  Eindeutige Kennung des API-Schlüssels.
</ResponseField>

<ResponseField name="name" type="string">
  Vom Nutzer vergebener Name des Schlüssels.
</ResponseField>

<ResponseField name="keyPreview" type="string">
  Maskierte Vorschau des Schlüssels (z. B. `llm_1234...abcd`).
</ResponseField>

<ResponseField name="isActive" type="boolean">
  Ob der Schlüssel aktiv und verwendbar ist.
</ResponseField>

<ResponseField name="lastUsedAt" type="string">
  ISO-8601-Zeitstempel der letzten Nutzung des Schlüssels.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO-8601-Zeitstempel der Schlüsselerstellung.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/api-keys/llm_1706123456_abc123def456',
    {
      headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
    }
  );

  const key = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "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"
  }
  ```

  ```json Not Found (404) theme={null}
  {
    "message": "API key not found"
  }
  ```

  ```json Forbidden (403) theme={null}
  {
    "message": "Access denied to this API key"
  }
  ```
</ResponseExample>
