GET /credits/history
This endpoint returns a list of the authenticated user’s credit transactions, including purchases, usage, and refunds. Requires session-based authentication (JWT access token).
For third-party integrations: Use GET /credits/history/api with API Key authentication instead.
Query Parameters
Number of transactions to return (max 100).
Number of transactions to skip for pagination.
Filter by transaction type: purchase, usage, or refund.
Response
An array of transaction objects. Show transaction properties
The unique identifier for the transaction.
The type of transaction: purchase, usage, or refund.
The number of credits (positive for additions, negative for usage).
A description of the transaction.
The associated site ID (for usage transactions).
ISO 8601 timestamp of the transaction.
Total number of transactions.
Whether there are more transactions to fetch.
curl -X GET "https://api.llmgenerator.com/api/v1/credits/history?limit=10" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"transactions" : [
{
"id" : "txn_abc123" ,
"type" : "purchase" ,
"amount" : 500 ,
"description" : "Purchased Professional Pack" ,
"siteId" : null ,
"createdAt" : "2026-01-15T10:00:00.000Z"
},
{
"id" : "txn_def456" ,
"type" : "usage" ,
"amount" : -50 ,
"description" : "llms.txt generation for example.com (enhanced)" ,
"siteId" : "550e8400-e29b-41d4-a716-446655440000" ,
"createdAt" : "2026-01-20T14:30:00.000Z"
},
{
"id" : "txn_ghi789" ,
"type" : "usage" ,
"amount" : -25 ,
"description" : "llms.txt generation for another-site.com (simple)" ,
"siteId" : "660e8400-e29b-41d4-a716-446655440001" ,
"createdAt" : "2026-01-22T09:15:00.000Z"
}
],
"total" : 47 ,
"hasMore" : true
}
GET /credits/history/api
This endpoint returns the user’s credit transaction history using API Key authentication. Ideal for third-party integrations.
Authentication
Requires API Key authentication. Include your API key in the Authorization header:
Authorization: Bearer llmgen_your_api_key_here
Query Parameters
Same as /credits/history above.
Response
Same as /credits/history above.
curl -X GET "https://api.llmgenerator.com/api/v1/credits/history/api?limit=10" \
-H "Authorization: Bearer llmgen_your_api_key_here"