# The account's credit balance

URL: https://www.atmee.ai/docs/v2/api/reference/account/getAccountBalance

`GET /v1/account/balance`

What the calling key's account has to spend on sessions, from the
account's direct wallet (the only one API usage draws on). Every
amount is in microcredits (100 microcredits = 1 credit).

`spendableMicrocredits` is the amount a session is admitted on: every
positive bucket for a reserve-mode key or a signed-in user; the plan
and top-up buckets only for a metered key, which never spends coupon
credits (`couponSpendable: false`). Live sessions' reservations are
already taken out of the buckets and are reported on their own as
`heldByLiveSessionsMicrocredits`. `unlimited` is true when sessions
are not charged (an unlimited plan, or billing switched off), whatever
the buckets say. `nextExpiry` lists the credits that will expire,
soonest first. An avatar's sponsor pool is not part of this balance
(`GET /v1/avatars/{avatarId}/sponsor`).

Any key with the `sessions` or `avatars:read` scope may read it, an
avatar-scoped key included, and so may a signed-in user acting for the
account.

## Responses

| Status | Description | Schema |
| --- | --- | --- |
| `200` | The balance. | `AccountBalance` |
| `401` | Missing or invalid API key -- or a user token that is invalid, anonymous, or of a user who may act for no account (invalid_login) | none |
| `403` | insufficient_scope (a key with neither sessions nor avatars:read) \| account_not_allowed (a user token whose X-Account-Id names an account the user may not act for) | `ApiErrorResponse` |
| `409` | account_ambiguous -- a user token of a user who may act for several accounts, without an `X-Account-Id` header naming one. | `ApiErrorResponse` |

## `200` response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `wallet` | string (`direct`) | yes | The wallet API usage spends; always `direct`. |
| `spendableMicrocredits` | integer | yes | What a session is admitted on for this caller (see the operation). |
| `planMicrocredits` | integer | yes | Credits of the plan's cycle grant left. Negative when the bucket is in debt. |
| `topupMicrocredits` | integer | yes | Purchased credits left. |
| `couponMicrocredits` | integer | yes | Coupon credits left. |
| `couponSpendable` | boolean | yes | False for a metered key, which never spends coupon credits. |
| `heldByLiveSessionsMicrocredits` | integer | yes | Reserved by sessions running now (already taken out of the buckets); what they do not use comes back when they end. |
| `unlimited` | boolean | yes | Sessions are not charged (an unlimited plan, or billing switched off). |
| `nextExpiry` | array of `CreditExpiry` | yes | Credits that will expire, soonest first. |
