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-txtRequest
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
| Parameter | Type | Default | Description |
|---|---|---|---|
force_regenerate | boolean | false | Force regeneration, bypass cache |
provider | string | openai | LLM provider (openai, anthropic, google) |
model | string | gpt-4o | Specific 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-4567Get LLMs-full.txt
Generate or retrieve the full-content version of the LLMs file.
text
GET /sites/{id}/llms-full-txtRequest
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=trueto bypass cache - Generated content includes
cachedflag in response
Generation Process
- Fetch site pages from database
- Filter pages with
include_in_llm_txt: true - Generate summaries if not already cached
- Format content according to llms.txt spec
- Cache the result
- Return formatted content
Error Responses
| Status | Error | Description |
|---|---|---|
| 401 | Invalid API key | Authentication failed |
| 403 | Access denied | API key doesn't belong to this site |
| 404 | Site not found | Site ID doesn't exist |
| 500 | Generation failed | Error during content generation |