Skip to main content
GET
https://sunor.cc
/
api
/
v1
/
account
/
usage
Get Usage
curl --request GET \
  --url https://sunor.cc/api/v1/account/usage \
  --header 'x-api-key: <x-api-key>'
{
  "code": 123,
  "data": {
    "tasks_created": 123,
    "credits_used": 123,
    "credits_topped_up": 123
  }
}

Get Usage

Retrieve aggregate usage statistics for your account, including total tasks created and credits consumed.

Request

GET /api/v1/account/usage

Headers

x-api-key
string
required
Your API key.

Response

code
number
HTTP status code (200 on success).
data
object
tasks_created
number
Total number of tasks you have created (all statuses).
credits_used
number
Total credits consumed by all tasks.
credits_topped_up
number
Total credits added to your account via top-ups.

Example response

200
{
  "code": 200,
  "data": {
    "tasks_created": 42,
    "credits_used": 350,
    "credits_topped_up": 1000
  }
}

Code examples

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

Errors

StatusDescription
401Missing or invalid API key
500Internal server error