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, which can be selected based on your plan and needs:
- Simple Generation: A fast, cost-effective method using metadata. This is the only option for free plan users.
- Enhanced Generation: A premium method using AI for higher-quality titles and descriptions. This is available to paid plan users and offers more detailed results.
You can specify the method using the generationMethod parameter in the /generate 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 will contain information about your current rate limit status.
X-RateLimit-Limit: The maximum number of requests you are permitted to make per minute.
X-RateLimit-Remaining: The number of requests remaining in the current window.
X-RateLimit-Reset: The time at which the current rate limit window resets (in UTC epoch seconds).
Errors
The API uses standard HTTP status codes to indicate the success or failure of a request. In general, codes in the 2xx range indicate success, 4xx codes indicate a client-side error (e.g., a missing parameter), and 5xx codes indicate a server-side error.
When a request fails, the response body will contain a JSON object with more details about the error.
{
"success": false,
"error": "Invalid request",
"code": "BAD_REQUEST",
"details": {
"message": "The 'url' parameter is required."
}
}