User
One wallet. One credit is one dollar. Article generate costs 1.5 credits. Social generate costs 0.6 per platform. Both GETs are free.
GET
/api/v1/user/creditsReturns your current credit balance, plan details, and billing period.
Request
curl https://www.brainpercent.app/api/v1/user/credits \
-H "Authorization: Bearer bp_your_key"200Response
{
"success": true,
"data": {
"available_credits": 52,
"subscription_credits": 60,
"purchased_credits": 0,
"credits_used_this_month": 8,
"plan": "Creator",
"current_period_end": "2026-03-01T00:00:00Z"
}
}GET
/api/v1/user/usageReturns API usage statistics including total requests, today's requests, rate limit info, and a 30-day daily breakdown.
Request
curl https://www.brainpercent.app/api/v1/user/usage \
-H "Authorization: Bearer bp_your_key"200Response
{
"success": true,
"data": {
"total_requests": 1250,
"today_requests": 42,
"rate_limit": {
"limit_per_minute": 1000,
"remaining_per_minute": 958,
"limit_per_day": 50000,
"remaining_per_day": 49958,
"reset": 1738368060
},
"daily_breakdown": [
{
"date": "2026-02-01",
"endpoint": "/api/v1/articles",
"total_requests": 25,
"avg_response_time_ms": 120.5,
"error_count": 0
},
{
"date": "2026-02-01",
"endpoint": "/api/v1/user/credits",
"total_requests": 17,
"avg_response_time_ms": 45.2,
"error_count": 0
}
]
}
}Credit fields
| Field | Type | Meaning |
|---|---|---|
| available_credits | number | Whole spendable balance. Check this first. |
| subscription_credits | number | Plan grant. Spent first. |
| purchased_credits | number | Top-ups. Never expire. Spent second. |
| credits_used_this_month | number | Used this period |
| plan | string | Internal name: Free, Creator, Professional, Business, Agency |
| current_period_end | datetime | ISO 8601 |
Daily breakdown
Last 30 days, per endpoint.
| Field | Type | Meaning |
|---|---|---|
| date | string | YYYY-MM-DD |
| endpoint | string | Path, e.g. /api/v1/articles |
| total_requests | integer | Count that day |
| avg_response_time_ms | float | Average milliseconds |
| error_count | integer | 4xx and 5xx |
Rate limit object
| Field | Type | Meaning |
|---|---|---|
| limit_per_minute | integer | Ceiling this minute |
| remaining_per_minute | integer | Left this minute |
| limit_per_day | integer | Daily ceiling. -1 is unlimited. |
| remaining_per_day | integer | Left today |
| reset | integer | UTC epoch seconds |
| Plan | Per minute | Per day |
|---|---|---|
| Free | 100 | 5,000 |
| Starter, Plus, Pro, Business | 1000 | 50,000 |
| Enterprise | 10000 | Unlimited |
Watching the wallet
- Low balance Poll GET /user/credits.
- Usage charts Aggregate daily_breakdown.
- Before a batch Read remaining_per_day.
- Errors Watch error_count.