The wallet
The alert is
low at 20 percent of granted, critical at 5 percent and exhausted when the balance is zero or less. ImpelLabs tells the workspace once for each level in a period.
You need the capability billing.view to read the wallet. A member does not hold it by default.
Use of credits
GET /api/v1/billing/ledger lists each entry: kind, credits, source, the member and agent, and created_at. A kind is grant, purchase, spend, gift or expire. Filter with days (30 by default, up to 365), kind, member and agent. Entries are paged.
GET /api/v1/billing/usage/{by} totals the same window by source, member or agent. Each row has id, name, credits and share.
source says what used the credits, such as a chat or a workflow.
When credits run out
When the balance is zero, the walletstate is empty and credit_alert is exhausted.