Redeem an invite or credit code
Redeems a code for the account, as Creator Studio's Billing page
does. A code can add credits, let the account into v2 avatars (v2
is invite-only for now: GET /v1/account's v2Access), or both;
the answer says what it gave and where v2 access stands after it.
Each account redeems a code at most once.
Only a signed-in user may redeem (the MCP server's sign-in, or
atmee login); an API key gets 403 login_required, so a leaked
key cannot spend the account's codes. Once v2 is let in, v2 creates
work on the next request.
AuthorizationBearer <JWT>A signed-in Supabase user's access token -- from the project's OAuth
2.1 server (an MCP client) or a normal login -- sent as
Authorization: Bearer <token>, on the avatar routes and the API
session routes, where the deployment accepts user tokens. The user
acts for one of their accounts: their only one, or the one the
X-Account-Id header names (it must be theirs: otherwise 403 account_not_allowed); a user of several accounts who names none is
answered 409 account_ambiguous (the account is never guessed),
whose body also lists the accounts to choose from (accounts: each
id, and username when it has one). The user may read and write the account's avatars and start the account's
sessions, which are billed to that account; sponsoring and every
other money move take an API key only. An anonymous user, and a user
who is banned, deleted or no longer a member, is refused (401).
Sending this and X-Api-Key together is 400. An API key ignores
X-Account-Id.
application/json- body
code*stringThe code, as given (case and surrounding spaces do not matter).
1 <= length <= 64The code was redeemed.
application/json- response
microcreditsGranted*integerCredits the code added, in microcredits (100 = 1 credit); 0 for a code that only gives v2 access.
int64v2Access?stringThe account's v2 access after redeeming, as GET /v1/account reports it. Absent when it could not be read.
"granted""invite_required""unavailable"curl -X POST 'https://api.atmanity.us/v1/account/redeem' \ -H 'Content-Type: application/json' \ -d '{ "code": "string"}'{ "microcreditsGranted": 0, "v2Access": "granted"}The account's plan, limits, prices and capture quota GET
The plan the account is on (and the one it changes to at the end of the cycle, if any), the limits that apply to its API usage, what a session minute, a preview clip and (where generation is offered, pricing.generation) one generation call cost, and how many v2 captures are queued or running against the pending cap.
The credential making this call GET
For an API key (kind: api_key): its name, scopes, the avatar it is restricted to, its billing mode, its own session caps and how much of its spend cap the current window has used.

