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
string
required
The external tenant ID from your application
string
Scope the lookup to the tenant’s active subscription for this product (e.g.
ats). A tenant holds at most one active subscription per product, so this is the recommended way to disambiguate multi-product tenants. Without it, the most recently created active subscription is used.string
Scope the lookup to an exact subscription ID. Takes effect together with
productSlug if both are passed (they must refer to the same subscription).string
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.
string
The pool key (e.g.
api_calls, ai_tokens)string
Human-readable pool name
integer
Credits remaining from the plan’s base allocation
integer
Credits remaining from add-on purchases
integer
Total remaining credits (
baseRemaining + addonRemaining)integer
The pool’s
limit_per_period as defined on the planstring
hard or soft — whether the pool blocks consumption at zero or allows overagestring | null
ISO timestamp of the earliest upcoming credit expiry, or
null if noneinteger
Percentage of credits consumed so far (
0–100)