Get balance

Endpoint
GET/v1/billing/balance

Returns the available balance of the account that owns the API key. The account is identified by the key; no other parameters are needed.

Request

Authenticate with Authorization: Bearer sk-moyiapi-xxxxxx. No query parameters.

Parameters

None.

Response

json
{
  "balance": {"value": "85.320000", "currency": "USD"}
}
Field Notes
balance.value Available balance as a string amount
balance.currency Currency

Examples

bash
curl "https://moyiapi.com/v1/billing/balance" \
  -H "Authorization: Bearer sk-moyiapi-xxxxxx"

Errors

HTTP status error.type When it happens
401 missing_auth_credential / invalid_bearer_token Authentication failed; see Authentication
Ready? Three steps to startLog in to the console · top up · create an API key
DiscordGet community help instantly
Get balance · Docs