Skip to main content
GET
Read the organization's remaining credit balance
Gibt { available, plan_credits, topup_credits, period } für die Organisation des Keys zurück — den gesamten verfügbaren Stand plus seine Aufteilung in Abo- (Plan-) und Top-up-Credits sowie den aktuellen Abrechnungszeitraum period. Erfordert den usage.read Scope. Für Preisdetails siehe Preise.

Autorisierungen

Authorization
string
header
erforderlich

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

Antwort

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
erforderlich

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

Beispiel:

1450

plan_credits
integer
erforderlich

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

Beispiel:

1200

topup_credits
integer
erforderlich

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

Beispiel:

250

period
BillingPeriod · object
erforderlich

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