Guides / llms.txt

How to add llms.txt to your site

llms.txt tells AI agents what your product does, where your API docs are, and how to get started. Here is how to create one.

What is llms.txt?

llms.txt is a plain text file at the root of your domain that helps AI agents understand your product. Think of it as a README for machines — it describes what your product does, links to your API docs, and tells agents how to get started.

When an AI agent evaluates tools in your category, it looks for /llms.txt first. Without one, the agent has to parse your entire marketing site to figure out what you do.

Template

Create a file at /llms.txt in your site root. Here is a template you can adapt:

text
# [Your Product Name]

## What we do
[One paragraph describing your product and its core value proposition]

## API
- Documentation: https://your-domain.com/docs
- OpenAPI spec: https://your-domain.com/openapi.json
- Base URL: https://api.your-domain.com/v1

## Authentication
- Type: API key / OAuth 2.0
- Docs: https://your-domain.com/docs/auth

## SDKs
- Python: pip install your-sdk
- JavaScript: npm install your-sdk

## Links
- Pricing: https://your-domain.com/pricing
- Status: https://status.your-domain.com
- Support: https://your-domain.com/support

What to include

  1. Product description — What your product does in 2-3 sentences. Be specific: "Stripe processes payments for internet businesses" not "We provide solutions."
  2. API documentation URL — Direct link to your API reference. Not a marketing page.
  3. Authentication method — How agents should authenticate (API key, OAuth, etc.).
  4. OpenAPI spec location — If you have one, link it. This is the most machine-readable format.
  5. SDK links — If you publish SDKs, list them with install commands.
  6. Pricing page — Agents (and their operators) need to understand cost.

Where to host it

The file must be accessible at https://your-domain.com/llms.txt. Most static site generators and web frameworks can serve a static file from the root:

  • Next.js: Place in public/llms.txt
  • Rails: Place in public/llms.txt
  • Django: Serve via urls.py or place in static files root
  • Static sites: Place in the build output root
  • Nginx/Apache: Place in the document root

Verify it works

  1. Visit https://your-domain.com/llms.txt in your browser — you should see the raw text
  2. Check the Content-Type header is text/plain
  3. Run a Serge scan to confirm the check passes

The scanner looks for 3+ lines of meaningful content and checks whether the file mentions your API.

Check your score

After implementing this, scan your domain to verify the check passes and see how your score changes.

Scan your domain