Credits

Get the org credit balance

Returns the organization's credit position — what it can still spend, and what it has spent to date. Takes no parameters.

The response always carries the same fields. Branch on dedicated_balance: an organization that holds its own credit balance is not governed by a spend limit, while any other organization spends against an optional credit_limit.

get/org/credits/balance

Request

  • Base URL
    https://apiv2.senso.ai/api/v1
  • Auth
    API key in header X-API-Key

Response

The organization's credit balance and usage.

org_idstring uuid required
dedicated_balanceboolean required

Whether the organization holds its own credit balance. Branch on this.

credit_limit_setboolean required

Whether a spend limit governs the organization. Always false when dedicated_balance is true — spend limits do not apply to an organization that holds its own balance.

credit_limitnumber nullable required

The spend allowance in credits, or null when no limit governs the organization. Since total_usage is a lifetime figure, this is a total allowance that does not reset.

total_usagenumber required

Credits spent over the organization's lifetime — not spend within the current billing period.

credits_availablenumber nullable required

Credits still spendable — the organization's own balance when dedicated_balance is true, otherwise the spend limit minus lifetime usage, floored at zero. Never negative: an organization past its limit reports 0. It is null only when no limit governs an organization that has no balance of its own — that means unmetered, not exhausted, so do not read null as zero.

Example response

{
  "credit_limit": 100,
  "total_usage": 30,
  "credits_available": 70
}

Changes

No recorded changes to this operation across all 1 revision of this API.