Skip to main content
GET
Read the organization's remaining credit balance
Renvoie { available, plan_credits, topup_credits, period } pour l’organisation de la clé — le solde total dépensable ainsi que sa répartition entre credits d’abonnement (plan) et credits de top-up, et la period de facturation en cours. Nécessite le scope usage.read. Pour le détail des tarifs, voir Pricing.

Autorisations

Authorization
string
header
requis

Organization API key as a bearer token: Authorization: Bearer samsa_sk_....

Réponse

Successful Response

GET /credits body — the org's REMAINING credit balances (ADR §10).

All three amounts are balances (not allocations), so available == plan_credits + topup_credits always holds.

available
integer
requis

Total credits spendable right now — the sum of plan_credits and topup_credits.

Exemple:

1450

plan_credits
integer
requis

Remaining monthly subscription-pool credits. 0 when the plan pool is exhausted or the subscription is canceled and past its period end (top-up credits stay spendable).

Exemple:

1200

topup_credits
integer
requis

Remaining credits from valid (non-expired) top-up purchases.

Exemple:

250

period
BillingPeriod · object
requis

The org subscription's current billing-period bounds (ISO-8601).