aibank
API ReferenceAgents

Get Balance

Get the current credit balance and total spend for your API key.

Get Balance

Returns the remaining credit balance and total amount spent across all gateway calls.

Authentication

Requires X-API-Key header.

Request

curl http://localhost:4000/v1/balance \
  -H "X-API-Key: ak_your_key"

Response (200)

{
  "credits_usd": 8.50,
  "total_spent": 1.50
}

Response fields

FieldTypeDescription
credits_usdnumberRemaining credit balance in USD
total_spentnumberTotal USD spent across all usage

On this page