Account
Check your credits
The AI Credits this key spends from and the limits it works within, as the Studio's billing page shows them. A team key answers the team's shared pool and the team's limits; a personal key answers your own.
Check it before a run of generations rather than finding out from insufficient_credits halfway through: every generation reserves its price up front, so a balance under it is refused before anything starts. Free, and not recorded in the key's history.
/accountResponse · 200
The account as this key sees it.
accountobjectrequiredThe plan, the balance and the limits.
planstringrequiredThe plan whose limits apply: starter, creator, studio, team, or mates for the mates rate.
teamstringrequiredThe team this key acts for. Null for a personal key.
creditsobjectrequiredThe balance.
balanceintegerrequiredSpendable right now.
neverExpiresintegerrequiredOf the balance, how much never expires: everything but the free monthly credits.
nextExpiryobjectrequiredThe soonest-expiring credits, as {credits, expiresAt}. Null when nothing expires.
monthlyintegerrequiredCredits the plan grants each month.
usedThisPeriodintegerrequiredSpent this billing period, refunds taken off.
restrictedarray of valuerequiredOf the balance, credits that may only be spent on some asset types, as {assetTypes, credits}. Usually empty.
limitsobjectrequiredWhat the plan allows. Null is unlimited.
packsintegerrequiredPacks the account may hold.
assetsPerPackintegerrequiredAssets one pack may hold.
distributionPlayersintegerrequiredPlayers a month distribution may serve.
Error codes
Branch on error.code, never on the message.
invalid_api_key401The key isn't one of ours, or it has been revoked.
missing_api_key401No Authorization: Bearer header was sent.
wrong_key_kind401An MCP key sent to the REST API, or an API key sent to the MCP server. Each only opens its own.
account_suspended403The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.
plan_required403The key is valid, but its account's plan does not include the API.
not_found404No such pack, asset or job.