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

# ファイルのダウンロード

> 生成された llms.txt をダウンロードするエンドポイントです。

## GET /file/{siteId}/download

指定サイトの `llms.txt` をダウンロードできるよう返します。`Content-Disposition` を付与しブラウザで保存ダイアログを促します。公開エンドポイントで認証は不要です。

### パスパラメーター

<ParamField path="siteId" type="string" required>
  サイトの ID。
</ParamField>

### クエリパラメーター

<ParamField query="full" type="boolean" default="false">
  `true` の場合、各ページの全文を含んだ版をダウンロードします。
</ParamField>

### レスポンス

`llms.txt` と適切なヘッダーが返ります。

* Content-Type: `text/plain; charset=utf-8`
* Content-Disposition: `attachment; filename="{hostname}-llms.txt"`
* Cache-Control: `public, max-age=300`

ファイル名はサイトのホスト名から自動生成されます（例: `example-com-llms.txt`、全文版は `example-com-llms-full.txt`）。

<RequestExample>
  ```bash cURL（標準） theme={null}
  curl -X GET https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000/download \
    -o llms.txt
  ```

  ```bash cURL（全文） theme={null}
  curl -X GET "https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000/download?full=true" \
    -o llms-full.txt
  ```

  ```javascript JavaScript theme={null}
  // Trigger download in browser
  const downloadUrl = 'https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000/download';
  window.location.href = downloadUrl;
  ```
</RequestExample>
