Credits
Get Credit Balance
Fetch the current credit balance for all pools on a tenant’s active subscription.
GET
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
The external tenant ID from your application
Your public key (
pk_live_...). Alternative to the Authorization bearer header — use one or the other.Authentication
Requires one of:- Bearer header —
Authorization: Bearer sk_live_...(secret key, server-side) - Query param —
?publicKey=pk_live_...(public key, client-side)
Response
Returns an object keyed bypool_key.
The pool key (e.g.
api_calls, ai_tokens)Human-readable pool name
Credits remaining from the plan’s base allocation
Credits remaining from add-on purchases
Total remaining credits (
baseRemaining + addonRemaining)The pool’s
limit_per_period as defined on the planhard or soft — whether the pool blocks consumption at zero or allows overageISO timestamp of the earliest upcoming credit expiry, or
null if nonePercentage of credits consumed so far (
0–100)