> ## 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.

# 로그아웃

> 사용자의 현재 액세스 및 리프레시 토큰을 무효화하는 엔드포인트입니다.

## POST /auth/logout

해당 사용자의 모든 리프레시 토큰을 폐기해 세션을 종료합니다. `Authorization` 헤더에 유효한 액세스 토큰이 필요합니다.

<Warning>
  액세스 토큰은 만료될 때까지(15분) 유효할 수 있습니다. 즉시 완전히 로그아웃하려면 클라이언트에서 액세스 토큰도 삭제하세요.
</Warning>

### 요청 헤더

<ParamField header="Authorization" type="string" required>
  Bearer 토큰입니다. 형식: `Bearer YOUR_ACCESS_TOKEN`
</ParamField>

### 응답

<ResponseField name="success" type="boolean">
  로그아웃 성공 여부입니다.
</ResponseField>

<ResponseField name="message" type="string">
  확인 메시지입니다.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.llmgenerator.com/api/v1/auth/logout \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.llmgenerator.com/api/v1/auth/logout', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

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

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "message": "Logout successful. All refresh tokens have been revoked."
  }
  ```

  ```json Unauthorized (401) theme={null}
  {
    "message": "Authorization header required"
  }
  ```
</ResponseExample>
