> ## 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 成功 (200) theme={null}
  {
    "success": true,
    "message": "Logout successful. All refresh tokens have been revoked."
  }
  ```

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