Skip to content

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/credits

Returns 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/usage

Returns 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

FieldTypeMeaning
available_creditsnumberWhole spendable balance. Check this first.
subscription_creditsnumberPlan grant. Spent first.
purchased_creditsnumberTop-ups. Never expire. Spent second.
credits_used_this_monthnumberUsed this period
planstringInternal name: Free, Creator, Professional, Business, Agency
current_period_enddatetimeISO 8601

Daily breakdown

Last 30 days, per endpoint.

FieldTypeMeaning
datestringYYYY-MM-DD
endpointstringPath, e.g. /api/v1/articles
total_requestsintegerCount that day
avg_response_time_msfloatAverage milliseconds
error_countinteger4xx and 5xx

Rate limit object

FieldTypeMeaning
limit_per_minuteintegerCeiling this minute
remaining_per_minuteintegerLeft this minute
limit_per_dayintegerDaily ceiling. -1 is unlimited.
remaining_per_dayintegerLeft today
resetintegerUTC epoch seconds
PlanPer minutePer day
Free1005,000
Starter, Plus, Pro, Business100050,000
Enterprise10000Unlimited

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.

Recipes live in Workflows and Zapier.