Skip to main content
Welcome to the LLMGenerator API documentation. Our API provides programmatic access to the core features of LLMGenerator, allowing you to integrate llms.txt generation and management directly into your applications.

Base URL

All API endpoints are relative to the following base URL:
https://api.llmgenerator.com/api/v1

Authentication

The LLMGenerator API uses API keys to authenticate requests. You can create and manage your API keys in the dashboard. All authenticated requests must include an Authorization header with your API key as a Bearer token.
Authorization: Bearer YOUR_API_KEY
Keep your API keys secure. Do not share them in publicly accessible areas such as GitHub, client-side code, etc.

Generation Methods

The API supports two distinct generation methods:
MethodDescriptionCredit Cost
SimpleFast generation using page metadata. Best for quick results.1x
EnhancedAI-powered generation with improved titles and descriptions.2x
You can specify the method using the generationMethod parameter in the /generate endpoint. Free plan users can only use the simple method.

Credit System

API usage is tracked through credits:
  • Simple generation: Base credit cost per URL processed
  • Enhanced generation: 2x credit multiplier for AI processing
  • Full text: Additional credits for including full page content
Check your balance using the /credits/balance endpoint.

Rate Limiting

API requests are rate-limited based on your subscription plan. If you exceed the rate limit, you will receive a 429 Too Many Requests response. The response headers contain rate limit information:
  • X-RateLimit-Limit: Maximum requests per minute
  • X-RateLimit-Remaining: Requests remaining in current window
  • X-RateLimit-Reset: Time when the window resets (UTC epoch seconds)

CORS Support

Public file endpoints (/file/:siteId) support CORS and can be accessed directly from browsers. These endpoints don’t require authentication.

Errors

The API uses standard HTTP status codes:
CodeDescription
200Success
201Resource created
400Bad request (validation error)
401Unauthorized (invalid/missing API key)
403Forbidden (insufficient permissions)
404Resource not found
429Rate limit exceeded
500Internal server error
Error responses include a JSON body:
{
  "message": "Validation error: URL is required"
}

Webhooks

For long-running operations, you can configure webhook URLs to receive notifications when jobs complete. Contact support to enable webhooks for your account.