Skip to main content

Adding Support for llms.txt Generation in Developer Portals

· 2 min read

We’re excited to announce support for generating llms.txt and llms-full.txt files as part of your developer portal. It enables tools like Cursor, GitHub Copilot, ChatGPT, and Claude to quickly understand your documentation.

What is llms.txt?

LLMs.txt is a new web standard that makes your documentation AI-accessible. It provides AI tools with the structured, concise information they need to understand and work with your developer resources effectively. Like sitemap.xml or robots.txt, your llms.txt files generate and update automatically—no setup required.

llms.txt

This file contains a summary of your documentation. Each page gets a one-sentence description and a link. AI tools can quickly scan this file to understand what documentation you have and where to find it.

See it in action: https://apimatic-api-copilot.netlify.app/llms.txt

llms-full.txt

This file contains your complete documentation text. It includes everything from your docs, API references, and code examples. AI tools can read this file to get detailed information about your API.

See it in action: https://apimatic-api-copilot.netlify.app/llms-full.txt

note

Currently, this support is only available in portals generated via the Docs-as-Code workflow. llms.txt and llms-full.txt are generated for the default language, as specified in the initialPlatform setting of your build file configuration. If not explicitly set, the default language is HTTP.

How to Enable

In your APIMATIC-BUILD.json, configure the following under generatePortal:

{
"generatePortal": {
"baseUrl": "your-base-url",
"llmsContextGeneration": {
"enable": true
}
}
}

You can also enable it using the default settings:

{
"generatePortal": {
"baseUrl": "your-base-url",
"llmsContextGeneration": {}
}
}

By default, both llms.txt and llms-full.txt will be generated. You can customise this by toggling individual flags:

"llmsContextGeneration": {
"enable": true,
"generateLlmsTxt": false, // Disable llms.txt generation
"generateLlmsFullTxt": true // Enable llms-full.txt generation
}