Legacy Credits API
Retrieve historical credit balance and usage summary records.
This endpoint is kept for legacy/internal integrations and historical audit trails. User-facing capacity is now managed by subscription plan entitlements such as active projects, active prompts, monitoring frequency, and history retention.
Required scope: credit:read
Get Credit Balance
GET /v1/credits/balance
Example Request
curl https://api.aivsrank.com/v1/credits/balance \
-H "Authorization: Bearer gly_your_key_here"
Response
{
"code": 200,
"message": "Success",
"data": {
"balance": 850.00,
"totalEarned": 5000.00,
"totalSpent": 4150.00,
"currentPlan": "Starter",
"discountRate": null,
"nextCreditAt": null
},
"success": true,
"timestamp": 1710154200000
}
Response Fields
| Field | Type | Description |
|---|---|---|
balance |
decimal | Current credit balance |
totalEarned |
decimal | Total credits ever received |
totalSpent |
decimal | Total credits consumed |
currentPlan |
string | Active plan at the time the legacy balance is reported |
discountRate |
decimal | Legacy discount rate, nullable for subscription-first plans |
nextCreditAt |
string | Legacy scheduled credit grant, nullable for subscription-first plans |
Error Responses
| Code | Description |
|---|---|
403 |
Missing credit:read scope |
Subscription Capacity
Credit balance is no longer the primary user-facing plan limit. Current subscription capacity is presented through plan entitlements:
| Plan | Active Projects | Active Prompts | Monitoring | History |
|---|---|---|---|---|
| Starter | 1 | 25 | Weekly | 365 days |
| Pro | 5 | 150 | Daily | 365 days |