Skip to main content
GET
/
account
/
balance
Get Account Balance
curl --request GET \
  --url https://api.legnext.ai/api/account/balance \
  --header 'x-api-key: <api-key>'

Overview

Check your account balance, available credits, points, and low balance alert settings.

Request

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key for authentication

Example Request

curl --location 'https://api.legnext.ai/api/account/balance' \
  --header 'x-api-key: YOUR_API_KEY'

Response

Response Fields

FieldTypeDescription
codeintegerResponse status code (200 for success)
messagestringResponse message
dataobjectAccount balance data
data.account_idintegerYour account identifier
data.balance_usdfloatCurrent balance in USD
data.available_creditsintegerAvailable credits for API usage
data.available_pointsintegerAvailable points
data.alert_thresholdintegerLow balance alert threshold in USD
data.low_balance_alertbooleanWhether low balance alert is triggered
data.updated_atstringLast update timestamp (ISO 8601 format)

Example Response

{
  "code": 200,
  "data": {
    "account_id": 1,
    "balance_usd": 72.048,
    "available_credits": 71000,
    "available_points": 1048,
    "alert_threshold": 10,
    "low_balance_alert": false,
    "updated_at": "2025-11-05T08:22:37.784663288Z"
  },
  "message": "success"
}

Understanding Your Balance

  • balance_usd: Your current account balance in US dollars
  • available_credits: Credits that can be used for API operations
  • available_points: Bonus points or promotional credits
  • alert_threshold: You’ll receive alerts when balance falls below this amount
  • low_balance_alert: Indicates if your balance is currently below the threshold

Notes

  • Check your balance regularly to ensure uninterrupted service
  • Set up webhook notifications for low balance alerts
  • Credits are deducted based on the API operations you perform

Authorizations

x-api-key
string
header
required

API key for authentication

Response

200

Balance retrieved successfully