> ## 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 키 목록

> 사용자의 모든 API 키 목록을 반환하는 엔드포인트입니다.

## GET /api-keys

인증된 사용자 계정에 연결된 모든 API 키를 반환합니다. 보안상 전체 키 값은 절대 노출되지 않고 미리보기만 제공됩니다.

### 응답

<ResponseField name="apiKeys" type="array">
  API 키 객체 배열입니다.

  <Expandable title="apiKey 속성">
    <ResponseField name="id" type="string">
      API 키 고유 식별자입니다.
    </ResponseField>

    <ResponseField name="name" type="string">
      사용자가 지정한 키 이름입니다.
    </ResponseField>

    <ResponseField name="keyPreview" type="string">
      마스킹된 키 미리보기입니다(예: `llm_1234...abcd`).
    </ResponseField>

    <ResponseField name="isActive" type="boolean">
      키가 활성화되어 사용 가능한지 여부입니다.
    </ResponseField>

    <ResponseField name="lastUsedAt" type="string">
      마지막 사용 시각(ISO 8601)입니다.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      생성 시각(ISO 8601)입니다.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number">
  API 키 총 개수입니다.
</ResponseField>

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

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

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

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