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.
Enhanced generation uses AI for higher-quality titles and descriptions. It costs 2x the credits of simple generation.

Request Body

url
string
required
The URL of the website to generate the file for. Must be a valid URL with http/https protocol.
options
object
An object containing generation options.

Response

jobId
string
A unique identifier for the generation job.
status
string
The status of the job: queued, processing, completed, or failed.
progress
number
Progress percentage (0-100).
message
string
Human-readable status message.
fileUrl
string
The URL where the generated llms.txt file can be accessed.
fullTextUrl
string
The URL for the full-text version of the llms.txt file (if showFullText was enabled).
siteId
string
The ID of the site created or updated for this generation.
creditsUsed
number
The number of credits deducted for this generation.
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",
          "showFullText": true
        }
      }'
{
  "jobId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "progress": 100,
  "message": "File generated successfully",
  "fileUrl": "https://api.llmgenerator.com/api/v1/file/site_xxxxx",
  "fullTextUrl": "https://api.llmgenerator.com/api/v1/file/site_xxxxx?full=true",
  "siteId": "site_xxxxx",
  "creditsUsed": 50
}