Skip to content

DocsAPI reference

Credits

Check the balance of the account that owns your API key, for example before starting a batch job.

Get the balance

Request
curl https://api.avenro.tech/v1/credits -H "Authorization: Bearer $AVENRO_API_KEY"
200 OK
{
  "object": "credits",
  "currency": "USD",
  "balance": "42.5",
  "held": "0.031",
  "available": "42.469",
  "balance_nusd": "42500000000",
  "held_nusd": "31000000",
  "available_nusd": "42469000000"
}
  • balance is what the account holds; held is reserved by requests in flight; available is what new requests can reserve (never below zero).
  • Amounts are decimal strings in US dollars. The _nusd fields are the same values as integers in nano-dollars (1 USD = 1,000,000,000), the unit the ledger uses.
  • To add credits, go to Billing.