Skip to main content
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 Settings: Once logged in, go to the “API Keys” section in your account settings.
  3. Create a Key: Generate a new API key. Make sure to copy it and store it securely. You won’t be able to see it again.
Your API key should look something like this: llmgen_xxxxxxxxxxxxxxxxxxxxxxxxxxxx.

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,
          "generationMethod": "enhanced"
        }
      }'
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 containing the jobId and the fileUrl for your newly generated llms.txt file.
{
  "jobId": "gen_xxxxxxxxxxxxxx",
  "status": "completed",
  "progress": 100,
  "message": "File generated successfully",
  "fileUrl": "https://files.llmgenerator.com/llms-xxxxxxxx.txt"
}
You can now access your llms.txt file at the provided fileUrl.

Next Steps

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