Skip to main content

Balance

View the subscription and credit balance associated with the current API key's team, exposed through client.balance.

Get balance

balance = client.balance.get()

# override the request timeout for this call only
balance = client.balance.get(timeout=5)
{
"team": {
"uuid": "e7d5afd9-2373-47a6-a41b-764bda9015e6",
"name": "Sample Team",
"name_dv": "ސާމްޕަލް ޓީމް",
"used_seats": 2,
},
"subscription": {
"plan": {"slug": "team_medium", "name": "ޓީމް ބޮޑު", "duration_days": 30},
"start_at": "...",
"expire_at": "...",
"is_annual_billing": True,
"team_seats": 10,
"unlimited_seats": False,
},
"billing_period": {
"period_no": 1,
"credits": 5540,
"addon_credits": 0,
"total_credits": 5540,
"used_credits": 6.55,
"balance": 5533.45,
"start_at": "...",
"expire_at": "...",
},
}

subscription and billing_period are None when the team has no active subscription.