Skip to main content

GET /v1/account/balance

Get the current account balance.

  • Method: GET
  • Path: /v1/account/balance
  • Auth: Bearer token (provisioning key) in Authorization header
Provisioning Key Required

This endpoint requires authentication with a provisioning key, not a regular API key.

Description

Returns the current balance for the authenticated account. This allows you to monitor your account's available credits programmatically.

Example Request

import requests

response = requests.get(
"https://api.naga.ac/v1/account/balance",
headers={"Authorization": "Bearer YOUR_PROVISIONING_KEY"}
)

balance = response.json()
print(f"Current balance: ${balance['balance']}")

Response

{
"balance": "125.50"
}

Response Fields

  • balance (string): Current account balance in USD

Authentication

Provide your provisioning key as a Bearer token:

Authorization: Bearer YOUR_PROVISIONING_KEY

Use Cases

  • Monitor account balance before executing large batch operations
  • Set up automated alerts when balance falls below a threshold
  • Track spending patterns and budget allocation
  • Integrate balance checks into your billing workflows