GET /v1/account/balance
Get the current account balance.
- Method: GET
- Path: /v1/account/balance
- Auth: Bearer token (provisioning key) in Authorizationheader
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
- Python
- Node.js
- cURL
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']}")
const response = await fetch("https://api.naga.ac/v1/account/balance", {
  headers: {
    "Authorization": "Bearer YOUR_PROVISIONING_KEY"
  }
});
const balance = await response.json();
console.log(`Current balance: $${balance.balance}`);
curl https://api.naga.ac/v1/account/balance \
  -H "Authorization: Bearer YOUR_PROVISIONING_KEY"
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
Related Endpoints
- /v1/account/activity- Get detailed usage statistics and activity
- /v1/account/keys/list- List all API keys for your account