Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide will walk you through the essential steps to start using the LLMGenerator API. By the end, you’ll be able to generate your first llms.txt file.

1. Create an Account & Get API Key

Before you can use the API, you need to create an LLMGenerator account and obtain an API key.
  1. Sign Up: Create an account on the LLMGenerator dashboard.
  2. Navigate to API Keys: Go to Settings → API Keys.
  3. Create a Key: Generate a new API key. Copy it and store it securely — it’s only shown once.
Your API key will look like this: llmgen_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

2. Make Your First API Request

Now you can use your API key to make requests to the LLMGenerator API. The primary endpoint for creating llms.txt files is /api/v1/generate. You’ll need to send a POST request with your API key in the Authorization header as a Bearer token.
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": 10,
      "showFullText": true,
      "generationMethod": "simple"
    }
  }'
Remember to replace YOUR_API_KEY with the actual API key you obtained in the first step.

3. Check the Response

If your request is successful, you’ll receive a JSON response with the job result and file URL:
{
  "jobId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "progress": 100,
  "message": "Generation completed successfully",
  "fileTextUrl": "https://api.llmgenerator.com/api/v1/file/550e8400-e29b-41d4-a716-446655440000"
}
You can now access your llms.txt file at the provided fileTextUrl. The file is publicly accessible and cached for performance.

4. Access Your File

The generated file can be accessed in several ways. Use the siteId from the jobId response or look it up via GET /api/v1/sites:
# View in browser (returns llms.txt text)
curl https://api.llmgenerator.com/api/v1/file/YOUR_SITE_ID

# Download as file
curl https://api.llmgenerator.com/api/v1/file/YOUR_SITE_ID/download -o llms.txt

Next Steps

You’ve successfully generated your first llms.txt file! Here are a few things you can do next: