Skip to main content
GET
https://sunor.cc
/
api
/
v1
/
account
/
balance
Get Balance
curl --request GET \
  --url https://sunor.cc/api/v1/account/balance \
  --header 'x-api-key: <x-api-key>'
{
  "code": 123,
  "data": {
    "available": 123,
    "frozen": 123,
    "total": 123
  }
}

Get Balance

Retrieve your current credit balance, including available credits and credits frozen by in-progress tasks.

Request

GET /api/v1/account/balance

Headers

x-api-key
string
required
Your API key.

Response

code
number
HTTP status code (200 on success).
data
object
available
number
Credits available to spend on new tasks.
frozen
number
Credits reserved by tasks that are currently in progress.
total
number
Total credits (available + frozen).

Example response

200
{
  "code": 200,
  "data": {
    "available": 950,
    "frozen": 10,
    "total": 960
  }
}

Code examples

curl https://sunor.cc/api/v1/account/balance \
  -H "x-api-key: YOUR_API_KEY"

Errors

StatusDescription
401Missing or invalid API key
500Internal server error