Credits

Credits and budget

Read the balance, the amount held by requests in flight, the amount available now, the current period spend and the spend cap behind the API key. Read-only, charges nothing, never cached.

get/credits

Response

Credits and budget

objectstring required
balance_centsinteger required

Stored ledger balance in US cents. Open holds are already taken out of it. Negative when the workspace owes for usage that settled after the balance ran out. The same number a 402 reports as details.current_balance_cents.

held_centsinteger required

Cents reserved by requests currently in flight. Informational: already inside balance_cents, never subtract it again.

available_centsinteger required

balance_cents floored at zero. What a new request can be settled against now.

currency'usd' required
plan_tierstring required

The entitled workspace tier, the same value X-RateLimit-Tier carries.

as_ofstring date-time required

Example response

{
  "object": "credits",
  "balance_cents": 5476,
  "held_cents": 34,
  "available_cents": 5476,
  "plan_tier": "pro"
}

Changes

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