API Endpoints

LLMs.txt Endpoints

API endpoints for generating AI-optimized LLMs.txt and LLMs-full.txt files.

Overview

LLMs.txt is a standard file format that helps AI assistants and large language models understand your website. AIO Radar generates two variants:

  • llms.txt - Concise overview with page summaries
  • llms-full.txt - Complete content for detailed AI analysis

Get LLMs.txt

Generate or retrieve the LLMs.txt file content for a site.

text
GET /sites/{id}/llms-txt

Request

Bash
curl -X GET "https://aioradar.vercel.app/api/sites/{id}/llms-txt" \
  -H "Authorization: Bearer aio_sk_your_api_key"

Response

JSON
{
  "data": {
    "content": "# Example Travel Tours\n\n> Costa Rica adventure specialists...\n\n## Pages\n\n- Costa Rica Tours: /costa-rica-tours\n...",
    "cached": true,
    "generated_at": "2024-01-15T10:30:00Z",
    "page_count": 25,
    "total_words": 3500
  }
}

Query Parameters

ParameterTypeDefaultDescription
force_regeneratebooleanfalseForce regeneration, bypass cache
providerstringopenaiLLM provider (openai, anthropic, google)
modelstringgpt-4oSpecific model to use

LLMs.txt Format

The generated file follows the llms.txt standard:

text
# Site Name

> Site description and value proposition

## Pages

- Page Title: /url-slug
  Summary of the page content...

- Another Page: /another-url
  Description of this page...

## Contact

- Email: contact@example.com
- Phone: +1 (555) 123-4567

Get LLMs-full.txt

Generate or retrieve the full-content version of the LLMs file.

text
GET /sites/{id}/llms-full-txt

Request

Bash
curl -X GET "https://aioradar.vercel.app/api/sites/{id}/llms-full-txt" \
  -H "Authorization: Bearer aio_sk_your_api_key"

Response

JSON
{
  "data": {
    "content": "# Example Travel Tours - Full Content\n\n## Costa Rica Tours\nURL: https://example.com/costa-rica-tours\nType: page\nWords: 1500\nModified: 2024-01-15\n\nFull page content here...\n\n---\n\n## Another Page\n...",
    "cached": true,
    "generated_at": "2024-01-15T10:30:00Z",
    "page_count": 25,
    "stats": {
      "has_full_content": 20,
      "has_excerpt_only": 5
    }
  }
}

LLMs-full.txt Format

text
# Site Name - Full Content

## Page Title
URL: https://example.com/page-slug
Type: page
Words: 1500
Modified: 2024-01-15

Full page content goes here. This includes all text content from the
page, formatted for AI consumption.

---

## Another Page
URL: https://example.com/another-page
Type: post
Words: 800
Modified: 2024-01-10

Content of the next page...

Caching Behavior

  • Content is cached after generation
  • Cache is invalidated when site inventory is synced
  • Use force_regenerate=true to bypass cache
  • Generated content includes cached flag in response

Generation Process

  1. Fetch site pages from database
  2. Filter pages with include_in_llm_txt: true
  3. Generate summaries if not already cached
  4. Format content according to llms.txt spec
  5. Cache the result
  6. Return formatted content

Error Responses

StatusErrorDescription
401Invalid API keyAuthentication failed
403Access deniedAPI key doesn't belong to this site
404Site not foundSite ID doesn't exist
500Generation failedError during content generation