Check credit balance
GET /user/credits/info returns the authenticated team’s credit balance, a per-lot breakdown, active subscription details, and whether usage is allowed.
Use this endpoint to power billing widgets, usage dashboards, or pre-flight checks before running large jobs.
For API details see Get credit info.
Response
Each lot in
breakdown has a purchase_kind of Subscription, Top-up, Manual, Setup, or Pending.
Purchase a top-up
POST /user/purchase-topup charges a saved card on Stripe and buys credits in one step. There is no Checkout redirect or embedded payment UI.
Pass the credit amount in the request body:
Supported values: 10,000, 20,000, 80,000, and 100,000.
For API details see Purchase top-up.
Requirements
- The team must have a Stripe customer with at least one saved card.
- Only one purchase attempt is allowed every 60 seconds per team. If you hit the cooldown, the response is 429 with a
Retry-Afterheader.
Responses
200 — payment succeeded:Credits are issued by the Stripe webhook after payment confirmation, not directly from the HTTP response. Treat 200 as payment success; poll
GET /user/credits/info if you need to confirm the updated balance.