Passer au contenu principal
GET
Get credit balance
La lecture ne coûte rien : un programme peut le vérifier avant chaque lot. remaining exclut déjà les crédits bloqués par vos tâches en file et en cours. Le sens de chaque champ figure dans Crédits et limites.

Autorisations

Authorization
string
header
requis

Your API key, sent as Authorization: Bearer <key>.

Réponse

Your account's credits.

success
boolean
requis
remaining
number
requis

Credits you can spend now, with up to two decimals. Tasks you already submitted hold their price in reserved, so it is not in this number. A submit that needs more returns 402 INSUFFICIENT_CREDITS.

perCycle
number | null
requis

Credits your plan grants each billing cycle. null without an active plan.

cycleResetsAt
string<date-time> | null
requis

When the current billing cycle ends. At renewal your balance becomes the next cycle's plan credits plus the top-up credits you still hold. null without an active plan.

reserved
number
requis

Credits your queued and running tasks hold. A completed task is charged from its hold, and a failed task's hold returns to remaining.

plan
enum<string>
requis

Your plan. free when no paid plan is active.

Options disponibles:
free,
basic,
pro,
scale,
max
topUpBalance
object | null
requis

Top-up credits within remaining. They last three months from purchase, carry over renewals, and are spent after your plan's credits. null when you have none.