Account

Get current credit balance

Returns the wallet balance for the user the token belongs to. If the calling token has a per-token daily cap configured, also returns rolling-24h spend through that token (token_daily_spent) and remaining headroom (token_daily_remaining). When the cap is hit, generation requests start returning HTTP 402 with code token_cap_exceeded even though the wallet itself isn't empty — useful as a leak-mitigation for tokens that get stolen and discovered hours later.

get/v1/account/credits

Request

  • Base URL: https://nanostudiopro.com/api
  • URL: https://nanostudiopro.com/api/v1/account/credits
  • Auth: HTTP bearer

Response

Credit balance plus optional cap fields

balanceinteger

Credits remaining in the user's wallet.

token_daily_capinteger nullable

If the calling token has a daily-spend cap configured, this is its value. Absent otherwise.

token_daily_spentinteger nullable

Credits spent through the calling token in the last 24 hours.

token_daily_remaininginteger nullable

token_daily_cap minus token_daily_spent, floored at 0.

Example response

{
  "balance": 1240
}

Changes

No recorded changes to this operation across all 3 revisions of this API.