Wallet API
Credit wallet balance for the authenticated user.
Base Path
https://api.chainabit.com/api/v1/walletAuthentication
JWT Bearer token required. The user must also have an active entitlement that includes wallet access.
Environment Variables
Set these variables before running any example on this page:
export BASE_URL="https://api.chainabit.com/api/v1"
export TOKEN="your-access-token"Get your access token by calling POST /auth/login.
Endpoints
| Method | Path | Description | Auth | Rate Limit |
|---|---|---|---|---|
| GET | /wallet/me | Get credit wallet balance | Bearer token | 120/60s (user), 180/60s (account) |
| GET | /wallet/me/spend | Get your own spend for the current (or a given) period | Bearer token | 60/60s (user), 120/60s (account) |
GET /wallet/me
Returns the authenticated account's pooled credit wallet balance. This is the shared balance for the whole account, not a per-member figure — every member's usage draws from it.
Authentication: Bearer token (session or OAuth access token). Available on every plan, including free — there is no minimum-tier requirement to check your own balance.
Rate limit: 120 requests/60s per user, 180 requests/60s per account.
Request
No path or query parameters.
Response
Response Example
{
"data": {
"balanceCredits": "275",
"updatedAt": "2026-09-05T18:40:55.770Z",
"usedPercentage": 0,
"balanceStatus": "ok"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
balanceCredits | string | Credits currently available for AI usage |
updatedAt | string | null | ISO 8601 timestamp of the latest balance update |
usedPercentage | number | Percentage of the daily credit quota consumed today (0–100) |
balanceStatus | string | Balance health: ok (< 75% of quota used), warning (≥ 75%), critical (≥ 90%), or exhausted (100%) |
Code Example
curl https://api.chainabit.com/api/v1/wallet/me \
-H "Authorization: Bearer $TOKEN"const response = await fetch(`${BASE_URL}/wallet/me`, {
headers: {
'Authorization': `Bearer ${TOKEN}`,
},
});
const data = await response.json();import requests
response = requests.get(
f"{BASE_URL}/wallet/me",
headers={"Authorization": f"Bearer {TOKEN}"},
)
data = response.json()GET /wallet/me/spend
Returns what you personally have spent from the pooled account balance in a period — the number you can actually act on, as opposed to the pooled total. Every member can call this for themselves regardless of role.
Authentication: Bearer token. Available to every account member, on every plan.
Rate limit: 60 requests/60s per user, 120 requests/60s per account.
Request
| Query Parameter | Type | Required | Description |
|---|---|---|---|
since | string (ISO 8601) | No | Start of the period to measure. Defaults to the start of the current UTC calendar month. Values older than 400 days are floored to that horizon — check the response's periodStart for the window actually measured. |
Response
Response Example
{
"data": {
"periodStart": "2026-09-01T00:00:00.000Z",
"members": [
{ "chainerId": "...", "settledCredits": 120, "heldCredits": 5, "totalCredits": 125 }
],
"unattributedCredits": 0
}
}Response Fields
| Field | Type | Description |
|---|---|---|
periodStart | string | ISO 8601 start of the measured period |
members[].chainerId | string | The member's chainer ID — always the caller's own ID for this endpoint |
members[].settledCredits | number | Credits already charged (debits committed against the pooled balance) |
members[].heldCredits | number | Credits reserved by in-flight runs, not yet settled |
members[].totalCredits | number | settledCredits + heldCredits |
unattributedCredits | number | Spend the ledger recorded with no attributable member — reported separately rather than guessed at |
Code Example
curl "$BASE_URL/wallet/me/spend" \
-H "Authorization: Bearer $TOKEN"const response = await fetch(`${BASE_URL}/wallet/me/spend`, {
headers: { 'Authorization': `Bearer ${TOKEN}` },
});
const data = await response.json();import requests
response = requests.get(
f"{BASE_URL}/wallet/me/spend",
headers={"Authorization": f"Bearer {TOKEN}"},
)
data = response.json()Notes
- The balance is pooled at the account level, not per-member — it's the same figure regardless of which member of the account calls this endpoint.
usedPercentageandbalanceStatusdescribe today's consumption against your daily quota, not a running total against a subscription period.- This endpoint is available on every plan, including free — checking your own balance never requires an upgrade.