メインコンテンツへスキップ

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

認証済みユーザーの現在のクレジット残高と利用統計を返します。セッション認証(JWT アクセストークン)が必要です。
サードパーティ連携の場合: API キー認証の GET /credits/balance/api を利用してください。

レスポンス

balance
number
現在利用可能なクレジット残高。
totalPurchased
number
アカウント存続期間中に購入したクレジットの累計。
totalUsed
number
アカウント存続期間中に消費したクレジットの累計。
recentTransactions
array
直近のクレジット取引の配列。
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

API キー認証でユーザーの現在のクレジット残高を返します。サードパーティ連携や外部アプリ向けです。

認証

API キー認証が必要です。Authorization ヘッダーに API キーを付与します。
Authorization: Bearer llmgen_your_api_key_here

レスポンス

/credits/balance と同一です。
curl -X GET https://api.llmgenerator.com/api/v1/credits/balance/api \
  -H "Authorization: Bearer llmgen_your_api_key_here"