API

Generate and validate llms.txt from code

One key, two endpoints. Drop llms.txt generation and validation into your CI, scripts, or your own product — no browser, no clicking, fully unattended.

Terminal
curl https://llms-txt.io/api/v1/generate \
  -X POST \
  -H "x-api-key: $LLMSTXT_KEY" \
  -H "content-type: application/json" \
  -d '{ "url": "example.com", "fileType": "both" }'

Key-based auth

Pass an x-api-key header or a bearer token. Create and revoke keys from your dashboard.

Quotas & rate limits

Per-key monthly allowances and a per-minute burst limit, with X-RateLimit headers on every response.

llms-full.txt included

Generate the full concatenated file too, on the Starter plan and above.

Fully unattended

No browser, no session — built to run from CI, cron jobs, and your own backend.

Both files, one request

Send a URL, get back clean llms.txt and llms-full.txt as strings — ready to write to disk or commit.

Request

generate.sh
curl https://llms-txt.io/api/v1/generate \
  -X POST \
  -H "x-api-key: $LLMSTXT_KEY" \
  -H "content-type: application/json" \
  -d '{
    "url": "example.com",
    "fileType": "both"
  }'

Response

200 OK
{
  "domain": "example.com",
  "fileType": "both",
  "llmsTxt": "# Example\n\n> A one-line summary…",
  "llmsFullTxt": "# Example\n\n## Page title\n…",
  "llmEnhanced": true,
  "note": null
}

Validating in CI? Lint a file before you publish with POST /api/v1/validate — by URL or raw content.

Quotas that scale with you

Every key gets a free monthly allowance of generations and validations, plus a per-minute rate limit. Paid plans raise both and unlock managed sites. See the exact numbers in rate limits & errors.

Compare plans

Start building

Create a key and make your first call in under a minute.