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.

GET /credits/balance

This endpoint returns the authenticated user’s current credit balance and usage statistics. Requires session-based authentication (JWT access token).
For third-party integrations: Use GET /credits/balance/api with API Key authentication instead.

Response

balance
number
The user’s current available credit balance.
totalPurchased
number
Total credits purchased over the account lifetime.
totalUsed
number
Total credits used over the account lifetime.
recentTransactions
array
Array of recent credit transactions.
curl -X GET https://api.llmgenerator.com/api/v1/credits/balance \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
  "balance": 450,
  "totalPurchased": 1000,
  "totalUsed": 550,
  "recentTransactions": [
    {
      "id": "txn_abc123",
      "type": "purchase",
      "amount": 500,
      "description": "Purchased Pro Pack",
      "createdAt": "2026-01-15T10:00:00Z"
    },
    {
      "id": "txn_def456",
      "type": "usage",
      "amount": -50,
      "description": "API LLMs.txt generation (enhanced) for example.com (25 URLs)",
      "createdAt": "2026-01-20T14:30:00Z"
    }
  ]
}

GET /credits/balance/api

This endpoint returns the authenticated user’s current credit balance using API Key authentication. Ideal for third-party integrations and external applications.

Authentication

Requires API Key authentication. Include your API key in the Authorization header:
Authorization: Bearer llmgen_your_api_key_here

Response

Same as /credits/balance above.
curl -X GET https://api.llmgenerator.com/api/v1/credits/balance/api \
  -H "Authorization: Bearer llmgen_your_api_key_here"