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

# Télécharger le fichier

> Ce point de terminaison permet de télécharger le fichier llms.txt généré.

## GET /file/{siteId}/download

Permet de télécharger le fichier `llms.txt` pour un site donné. Définit l'en-tête `Content-Disposition` pour proposer un téléchargement dans le navigateur. Point de terminaison public, sans authentification.

### Paramètres de chemin

<ParamField path="siteId" type="string" required>
  Identifiant du site.
</ParamField>

### Paramètres de requête

<ParamField query="full" type="boolean" default="false">
  Si `true`, télécharge la variante incluant le texte intégral de chaque page.
</ParamField>

### Réponse

Fichier `llms.txt` avec les en-têtes appropriés :

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

Le nom de fichier est dérivé automatiquement du nom d'hôte du site (ex. : `example-com-llms.txt` ou `example-com-llms-full.txt` pour la version texte intégral).

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