API

Validate

Lint a file for structure and agent-readiness. Validate a served URL or raw content — handy in CI to check a file before you publish it.

Prefer a UI? The same checks run in the free web llms.txt validator — no API key needed.

text
POST /api/v1/validate

Request body

Provide either url or content:

FieldTypeDescription
urlstringFetch and lint the file served at this site.
contentstringLint raw text directly (max 500 KB). No network fetch.
checkLinksbooleanSample links for liveness. Defaults to true.
bash
# Validate a live file
curl https://llms-txt.io/api/v1/validate \
  -X POST -H "x-api-key: $LLMSTXT_KEY" -H "content-type: application/json" \
  -d '{ "url": "https://example.com" }'

# Validate content from a build step before publishing
curl https://llms-txt.io/api/v1/validate \
  -X POST -H "x-api-key: $LLMSTXT_KEY" -H "content-type: application/json" \
  -d '{ "content": "# Example\n\n> Summary…", "checkLinks": false }'

Response

json
{
  "mode": "url",
  "url": "https://example.com",
  "targetUrl": "https://example.com/llms.txt",
  "score": 92,
  "readinessScore": 80,
  "status": "ok",
  "health": "live",
  "checks": [
    { "id": "has-title", "tier": "structure", "pass": true, "label": "Has an H1 title" }
  ],
  "usesInstructionsPattern": true,
  "hasLlmsFull": true,
  "contentLength": 1843,
  "linkStats": { "checked": 12, "ok": 12, "dead": 0 }
}
FieldDescription
scoreStructure/compliance score (0–100).
readinessScoreAgent-readiness score (0–100) — the higher-value signal.
checksPer-check results, each tagged tier: "structure" or "readiness".
health"live", "degraded", or "dead" (URL mode only).
usesInstructionsPatternWhether the file includes an agent-instructions block.
hasLlmsFullWhether a companion llms-full.txt was found.
linkStatsSampled link-liveness results (when checkLinks is on).

In CI, validate the content you just generated with checkLinks: false for a fast, network-light gate, then fail the build if readinessScore drops below your threshold.

Validation is cheap, so quotas are generous — see Rate limits & errors.