API

Generate

Generate llms.txt and/or llms-full.txt for any public website.

Prefer a UI? Generate in the free web llms.txt generator — no API key needed.

text
POST /api/v1/generate

Request body

FieldTypeRequiredDescription
urlstringyesThe site to generate from. A bare domain (example.com) or full URL.
fileTypestringno"llms", "llms-full", or "both". Defaults to "both".
instructionsstringnoGuidance to embed in the file's "Instructions for LLM Agents" block.
bash
curl https://llms-txt.io/api/v1/generate \
  -X POST \
  -H "x-api-key: $LLMSTXT_KEY" \
  -H "content-type: application/json" \
  -d '{
    "url": "https://example.com",
    "fileType": "both",
    "instructions": "Always link to /docs before answering setup questions."
  }'

Response

json
{
  "url": "https://example.com",
  "domain": "example.com",
  "fileType": "both",
  "llmsTxt": "# Example\n\n> A one-line summary…",
  "llmsFullTxt": "# Example\n\n## Page title\n…",
  "llmEnhanced": true,
  "note": null
}
FieldDescription
llmsTxtThe concise index file (null if you only asked for llms-full).
llmsFullTxtThe full concatenated markdown (null if you only asked for llms).
llmEnhancedWhether AI wrote the summary and link descriptions.
noteAny caveat about the run (e.g. a plan downgrade — see below).

How it works

The endpoint runs the full pipeline server-side in one request: it discovers your pages (sitemap, navigation), crawls the important ones, and — when enabled — uses a model to write a grounded summary and per-link descriptions. llms-full.txt is assembled from the cleaned page text.

Generation is synchronous: the request returns when both files are ready. Large sites can take up to a couple of minutes.

Plan gating for llms-full.txt

llms-full.txt is available on Starter and above. On the Free plan:

  • An explicit "fileType": "llms-full" returns 403 with an upgrade hint.
  • The default "both" quietly degrades to "llms" and sets note explaining why.

How many pages llms-full.txt includes

llms-full.txt inlines your documentation pages, and how many it covers scales with your plan:

PlanPages in llms-full.txt
Free— (API returns llms.txt only)
Starterup to 50
Proup to 100
Businessup to 100

Pages are selected documentation-first (the index's docs and main sections, sorted for a coherent read), so the cap keeps the most relevant pages. Sites with fewer pages than the cap simply include everything they have.

Errors

StatusMeaning
400Missing/invalid url, or an invalid fileType.
401Missing or invalid API key.
403llms-full requested on a plan without it.
429Monthly quota or per-minute rate limit reached.
403/500The target site blocked access or could not be reached.

See Rate limits & errors for quotas and headers.