> ## 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 (Standard) theme={null}
  curl -X GET https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000/download \
    -o llms.txt
  ```

  ```bash cURL (Full Text) 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>
