Get the balance
Returns the credits the account can spend on sessions, in microcredits
(100 microcredits = 1 credit). An avatar's sponsor pool is not included
(see GET /v1/avatars/{avatarId}/sponsor).
spendableMicrocreditsis what a session is admitted on: every bucket, for every key and signed-in user. There is one kind of credit: it pays for every model, each at its own rate.- Live sessions' reservations are already taken out, and reported as
heldByLiveSessionsMicrocredits. unlimitedis true when sessions are not charged, whatever the buckets say.nextExpirylists the credits that will expire, soonest first.- Readable by any key with
sessionsoravatars:read(an avatar-scoped key included), or a signed-in user of the account.
X-Api-Key<token>Your secret API key (sk_atmee_...; older keys start sk_live_),
sent as X-Api-Key. Keep it on your server and never send it to a
browser.
The balance.
application/json- response
wallet*"direct"The wallet API usage spends; always direct.
"direct"spendableMicrocredits*integerWhat a session is admitted on for this caller (see the operation).
int64planMicrocredits*integerCredits of the plan's cycle grant left. Negative when the bucket is in debt.
int64topupMicrocredits*integerPurchased credits left.
int64couponMicrocredits*integerCoupon credits left.
int64couponSpendable*booleanWhether coupon credits pay for this key's sessions. True for every key (one kind of credit); false only from older billing, for a metered key.
v2SpendableMicrocredits?integerNo longer reported (one kind of credit; Atmee V2 access decides who may build V2, GET /v1/account v2Access). Kept for older clients.
int64heldByLiveSessionsMicrocredits*integerReserved by sessions running now (already taken out of the buckets); what they do not use comes back when they end.
int64unlimited*booleanSessions are not charged (an unlimited plan, or billing switched off).
nextExpiry*array<>Credits that will expire, soonest first.
curl -X GET 'https://api.atmanity.us/v1/account/balance'{ "wallet": "direct", "spendableMicrocredits": 0, "planMicrocredits": 0, "topupMicrocredits": 0, "couponMicrocredits": 0, "couponSpendable": true, "v2SpendableMicrocredits": 0, "heldByLiveSessionsMicrocredits": 0, "unlimited": true, "nextExpiry": [ { "bucket": "string", "amountMicrocredits": 0, "expiresAt": "2019-08-24T14:15:22Z" } ]}
