AccountGet balance

Account

Get balance API

Read the workspace's USD balance, recent top-ups and current discount.

GEThttps://serastudio.app/api/v1/balance

Usage notes

  • The key needs the read permission.
  • Funds are added in the console, not through the API. See Billing.

Response

{
  "object": "balance",
  "currency": "usd",
  "balance_usd": 48,
  "topped_up_28d_usd": 50,
  "discount_pct": 5,
  "top_up_url": "https://serastudio.app/developers/billing"
}
balance_usdnumber

Available balance, after current holds.

topped_up_28d_usdnumber

Funds added in the last 28 days.

discount_pctnumber

The discount applied to new generations.

top_up_urlstring

The console page where funds are added.

Errors

StatusCodeWhen it happensRetry
401api_key_missingNo Bearer key was sent in the Authorization header.No
401api_key_invalidThe key is malformed or unknown.No
401api_key_revokedThe key was deleted in the console.No
401api_key_disabledThe key is disabled in the console.No
401api_key_expiredThe key is past its expiration date.No
403insufficient_scopeThe key lacks the read permission. Keys created in the console have it.No
403workspace_forbiddenThe account that owns the workspace is suspended or scheduled for deletion.No
503temporarily_unavailableThe request could not be completed just now.Yes
500internal_errorSomething failed on our side. The request_id identifies the request.Yes
503api_unavailableThe API is turned off.No