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

指定サイトの `llms.txt` の本文を返します。公開エンドポイントのため認証不要で、サイトにファイル URL を直接埋め込めます。

<Note>
  レスポンスにはクロスオリジン用ヘッダー（`Access-Control-Allow-Origin: *`）が含まれ、5 分間キャッシュされます。
</Note>

### パスパラメーター

<ParamField path="siteId" type="string" required>
  ファイルを取得するサイトの ID。
</ParamField>

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

<ParamField query="full" type="boolean" default="false">
  `true` の場合、各ページの全文を含んだ版を返します。AI のコンテキストウィンドウ向けです。
</ParamField>

### レスポンス

`llms.txt` のプレーンテキストが返ります。

* Content-Type: `text/plain; charset=utf-8`
* Cache-Control: `public, max-age=300`

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

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

  ```javascript JavaScript theme={null}
  // Fetch and display llms.txt content
  const response = await fetch(
    'https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000'
  );
  const content = await response.text();
  console.log(content);
  ```
</RequestExample>

<ResponseExample>
  ```text 標準版 llms.txt theme={null}
  # Example Domain
  > An example domain for use in documentation and examples.

  ## Pages

  - [Home](https://example.com/): The main landing page for Example Domain.
  - [About](https://example.com/about): Learn more about Example Domain and its purpose.
  - [Contact](https://example.com/contact): Get in touch with the Example Domain team.
  ```

  ```text 全文版 theme={null}
  # Example Domain
  > An example domain for use in documentation and examples.

  ## Pages

  ### Home
  URL: https://example.com/

  Welcome to Example Domain. This domain is for use in illustrative examples in documents...

  ---

  ### About
  URL: https://example.com/about

  Example Domain was established to provide a safe space for documentation examples...
  ```
</ResponseExample>
