resourcepack.ai
DOCS

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.

GET/account

Response · 200

The account as this key sees it.

accountobjectrequired

The plan, the balance and the limits.

planstringrequired

The plan whose limits apply: starter, creator, studio, team, or mates for the mates rate.

teamstringrequired

The team this key acts for. Null for a personal key.

creditsobjectrequired

The balance.

balanceintegerrequired

Spendable right now.

neverExpiresintegerrequired

Of the balance, how much never expires: everything but the free monthly credits.

nextExpiryobjectrequired

The soonest-expiring credits, as {credits, expiresAt}. Null when nothing expires.

monthlyintegerrequired

Credits the plan grants each month.

usedThisPeriodintegerrequired

Spent this billing period, refunds taken off.

restrictedarray of valuerequired

Of the balance, credits that may only be spent on some asset types, as {assetTypes, credits}. Usually empty.

limitsobjectrequired

What the plan allows. Null is unlimited.

packsintegerrequired

Packs the account may hold.

assetsPerPackintegerrequired

Assets one pack may hold.

distributionPlayersintegerrequired

Players a month distribution may serve.

Error codes

Branch on error.code, never on the message.

invalid_api_key401

The key isn't one of ours, or it has been revoked.

missing_api_key401

No Authorization: Bearer header was sent.

wrong_key_kind401

An MCP key sent to the REST API, or an API key sent to the MCP server. Each only opens its own.

account_suspended403

The account is suspended, so its keys open nothing. message says until when, if the suspension has an end date.

plan_required403

The key is valid, but its account's plan does not include the API.

not_found404

No such pack, asset or job.