Skip to main content
GET
/
api
/
public
/
credits
/
balance
curl "https://app.crovver.com/api/public/credits/balance?tenantId=workspace_123&publicKey=pk_live_..."
{
  "success": true,
  "data": {
    "api_calls": {
      "poolKey": "api_calls",
      "displayName": "API Calls",
      "baseRemaining": 850,
      "addonRemaining": 500,
      "total": 1350,
      "limit": 1000,
      "limitBehavior": "soft",
      "nextExpiry": "2025-02-01T00:00:00Z",
      "usagePercent": 15
    }
  }
}
Returns a breakdown of base (plan-included) and add-on credits remaining per pool, along with expiry and limit info. Returns an empty object {} if the tenant has no active subscription.

Query Parameters

tenantId
string
required
The external tenant ID from your application
publicKey
string
Your public key (pk_live_...). Alternative to the Authorization bearer header — use one or the other.

Authentication

Requires one of:
  • Bearer headerAuthorization: Bearer sk_live_... (secret key, server-side)
  • Query param?publicKey=pk_live_... (public key, client-side)

Response

Returns an object keyed by pool_key.
data.[poolKey].poolKey
string
The pool key (e.g. api_calls, ai_tokens)
data.[poolKey].displayName
string
Human-readable pool name
data.[poolKey].baseRemaining
integer
Credits remaining from the plan’s base allocation
data.[poolKey].addonRemaining
integer
Credits remaining from add-on purchases
data.[poolKey].total
integer
Total remaining credits (baseRemaining + addonRemaining)
data.[poolKey].limit
integer
The pool’s limit_per_period as defined on the plan
data.[poolKey].limitBehavior
string
hard or soft — whether the pool blocks consumption at zero or allows overage
data.[poolKey].nextExpiry
string | null
ISO timestamp of the earliest upcoming credit expiry, or null if none
data.[poolKey].usagePercent
integer
Percentage of credits consumed so far (0–100)
curl "https://app.crovver.com/api/public/credits/balance?tenantId=workspace_123&publicKey=pk_live_..."
{
  "success": true,
  "data": {
    "api_calls": {
      "poolKey": "api_calls",
      "displayName": "API Calls",
      "baseRemaining": 850,
      "addonRemaining": 500,
      "total": 1350,
      "limit": 1000,
      "limitBehavior": "soft",
      "nextExpiry": "2025-02-01T00:00:00Z",
      "usagePercent": 15
    }
  }
}