API reference

API reference · Credits

This account's low balance line

GET/api/account/low-balanceSigned in session

The personal balance against the account's own line. Falling under it sends the credits.low_balance webhook event once; it re-arms when a deposit lifts the balance back to the line. Holds are not counted.

Answer 200

The line and where the balance stands.

Fields of the 200 answer
FieldTypeWhat it is
thresholdMicrosinteger or nullThe line, or null when none is set.
fundedbooleanFalse for an account on the house allowance, which has no balance to fall.
balanceMicrosinteger or nullThe settled balance, holds excluded; null when not funded.
lowbooleanThe balance is under the line right now.
armedbooleanThe next fall below the line will send credits.low_balance.
firedAtinteger or null
shortfallMicrosintegerWhat brings the balance back to the line, rounded up to the cent.
topUpPathstring/billing/top-up, with ?amount= set to the shortfall when there is one.

Errors

  • 401OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter