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

# Download File

> This endpoint downloads the generated llms.txt file.

## GET /file/{siteId}/download

This endpoint allows you to download the `llms.txt` file for a given site. It sets the `Content-Disposition` header to prompt a download in the browser. This is a public endpoint and does not require authentication.

### Path Parameters

<ParamField path="siteId" type="string" required>
  The ID of the site.
</ParamField>

### Query Parameters

<ParamField query="full" type="boolean" default="false">
  If `true`, downloads the version of the file that includes the full text of each page.
</ParamField>

### Response

The response will be the `llms.txt` file with appropriate headers:

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

The filename will be automatically generated based on the site's hostname (e.g., `example-com-llms.txt` or `example-com-llms-full.txt` for full text version).

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