Skip to main content

POST /generate

This endpoint initiates the generation of an llms.txt file. It supports both “simple” and “enhanced” generation methods, depending on the user’s plan.

Request Body

url
string
required
The URL of the website to generate the file for.
options
object
An object containing generation options.
maxUrls
number
The maximum number of URLs to include.
showFullText
boolean
Whether to include the full text of each page in the output.
generationMethod
string
Can be simple or enhanced. Paid plan users can choose. Defaults to enhanced for paid users.

Response

jobId
string
A unique identifier for the generation job.
status
string
The status of the job. Since generation is synchronous, this will usually be completed.
fileUrl
string
The URL where the generated llms.txt file can be accessed.
curl -X POST https://api.llmgenerator.com/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "url": "https://www.example.com",
        "options": {
          "maxUrls": 25,
          "generationMethod": "enhanced"
        }
      }'
{
  "jobId": "gen_xxxxxxxxxxxxx",
  "status": "completed",
  "progress": 100,
  "message": "File generated successfully",
  "fileUrl": "https://files.llmgenerator.com/llms-xxxxxxxx.txt"
}