Account Balance
Get Balance
curl https://billing.aimlapi.com/v1/billing/balance \
-H "Authorization: Bearer <YOUR_AIMLAPI_KEY>" \
-H "Content-Type: application/json"GET /v1/billing/balance HTTP/1.1
Host: billing.aimlapi.com
Authorization: Bearer <YOUR_AIMLAPI_KEY>
Content-Type: application/jsonimport requests
import json
def main():
response = requests.get(
"https://billing.aimlapi.com/v1/billing/balance",
headers={
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
"Content-Type": "application/json",
})
data = response.json()
print(json.dumps(data, indent=2, ensure_ascii=False))
if __name__ == "__main__":
main()async function main() {
const response = await fetch("https://billing.aimlapi.com/v1/billing/balance", {
headers: {
"Authorization": "Bearer <YOUR_AIMLAPI_KEY>",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(JSON.stringify(data, null, 2));
}
main();Response
{
"balance": 551564495,
"lowBalance": false,
"lowBalanceThreshold": 10000,
"lastUpdated": "2025-11-10T10:01:56.824Z",
"autoDebitStatus": "disabled",
"status": "current",
"statusExplanation": "Balance is current and up to date"
}Response Schema
Field
Description
balance
The total credits associated with the provided API key.
lowBalance
True if the balance is below the threshold.
lowBalanceThreshold
Threshold for switching to low balance status.
lastUpdated
The date of the request — i.e., the current date.
autoDebitStatus
Indicates whether auto top-up is enabled for the plan.
status
The status of the plan associated with the provided API key.
statusExplanation
A more detailed explanation of the plan status.
Last updated
Was this helpful?