Skip to main content
GET
Read the organization's remaining credit balance
Restituisce { available, plan_credits, topup_credits, period } per l’organizzazione della chiave — il saldo totale spendibile più la sua suddivisione in credits di abbonamento (piano) e di top-up, e il period di fatturazione corrente. Richiede lo scope usage.read. Per i dettagli sui prezzi, vedi Prezzi.

Autorizzazioni

Authorization
string
header
obbligatorio

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

Risposta

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
obbligatorio

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

Esempio:

1450

plan_credits
integer
obbligatorio

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).

Esempio:

1200

topup_credits
integer
obbligatorio

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

Esempio:

250

period
BillingPeriod · object
obbligatorio

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