Essence
API Reference

LLMs.txt

POST /api/v1/llmstxt — generate llms.txt and llms-full.txt for a website

Generate llms.txt files from any website. Discovers pages via sitemap and in-page links, scrapes each page, and produces a structured index plus optional full-text output.

Endpoint

POST /api/v1/llmstxt

Parameters

ParameterTypeDefaultDescription
urlstringRequired. Website URL to generate llms.txt for
maxUrlsinteger20Maximum number of pages to process (max: 500)
showFullTextbooleantrueAlso generate llms-full.txt with full page markdown
enginestring"auto""auto", "http", or "browser"
maxConcurrentScrapesinteger10Parallel scrape concurrency
ignoreSitemapbooleanfalseSkip sitemap.xml during URL discovery
includeSubdomainsbooleantrueInclude subdomain pages in discovery
llmBaseUrlstringOpenAI-compatible API base URL for generating descriptions
llmModelstring"gpt-4o-mini"LLM model name for description generation
llmApiKeystringAPI key for the LLM service

Example Request

curl -X POST http://localhost:8080/api/v1/llmstxt \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://docs.example.com",
    "maxUrls": 50
  }'

Response

{
  "success": true,
  "llmstxt": "# Example Docs\n\n> Documentation for Example\n\n## Pages\n\n- [Getting Started](https://docs.example.com/getting-started): Setup guide\n- [API Reference](https://docs.example.com/api): Full API docs\n",
  "llmsFulltxt": "# Example Docs\n\n> Documentation for Example\n\n## Getting Started\n\nFull page content here...\n\n## API Reference\n\nFull page content here...\n",
  "urlsProcessed": 12,
  "urlsDiscovered": 45
}

How It Works

  1. Discover URLs — Uses sitemap.xml and in-page link crawling to find pages on the site
  2. Prioritize — Same-host pages ranked first, limited to maxUrls
  3. Scrape — Each page scraped in parallel using the selected engine
  4. Generate — Produces llmstxt (index with titles and descriptions) and optionally llmsFulltxt (full markdown of all pages concatenated)

LLM-Generated Descriptions

By default, page descriptions come from HTML metadata (<meta name="description">). For higher-quality descriptions, provide an OpenAI-compatible LLM endpoint:

{
  "url": "https://docs.example.com",
  "llmBaseUrl": "https://api.openai.com/v1",
  "llmApiKey": "sk-...",
  "llmModel": "gpt-4o-mini"
}

The LLM generates a one-line description for each page based on its content.

On this page