API reference
Get balance
Reference for GET /api/v1/balance, which returns your credit balance.
This page is the reference for the balance endpoint of the Management API. It is intended for developers who monitor their credit balance.
Endpoint
GET https://engy.ai/api/v1/balanceAuthentication
Send your account token in the Authorization header as a bearer token. For details, see Management API overview.
Parameters
This endpoint takes no parameters.
Response
Response fields
| Field | Type | Description |
|---|---|---|
data.balance_micro | Integer | The total balance, in micro-USD. |
data.balance_usd | String | The total balance, in USD, with two decimal places. |
data.available_micro | Integer | The balance minus holds for requests in progress, in micro-USD. |
data.available_usd | String | The balance minus holds for requests in progress, in USD, with two decimal places. |
meta.currency | String | Always USD. |
meta.unit | String | Always micro. |
Errors
This endpoint returns the common errors only. For details, see Management API overview.
Example
curl https://engy.ai/api/v1/balance \
-H "Authorization: Bearer $ENGY_ACCOUNT_TOKEN"Response:
{
"data": {
"available_micro": 24500000,
"available_usd": "24.50",
"balance_micro": 25000000,
"balance_usd": "25.00"
},
"meta": {
"currency": "USD",
"unit": "micro"
}
}