getBalance: retrieve account balance

Retrieve an account balance with its account key, Convenient to do your own alarm and query.

Example request

GET https://api.pixelant.ai/api/v1/getBalance
Host: api.pixelant.ai
Content-Type: application/json
x-api-key: sk_0cqyZoycFci4eIQnQSgucyCTkZU...W31wLlefAt9IF2tn1YFV0

Example response

Response Structure

ParameterTypeDescription
errorIdIntegerError message:
0 - no error
1 - with error
errorCodeStringerrorCode: full list of errors
errorDescriptionStringShort description of the error
balanceDecimalAccount balance value in USD
packagesArrayMonthly/Weekly Packages

Example Response

{
    "balance": 888,
    "errorId": 0,
    "packages": [
        {
            "name": "package1",
            "services": null
        },
        {
            "name": "package2",
            "services": [
                {
                    "availableServices": [
                        "ai.solver.rc.v2"
                    ],
                    "expireTime": "2025-09-14T11:46:03Z",
                    "remainingCount": 50000,
                    "totalCount": 50000
                },
                {
                    "availableServices": [
                        "ai.solver.rc.v2_enterprise"
                    ],
                    "expireTime": "2025-09-17T06:16:05Z",
                    "remainingCount": 399998,
                    "totalCount": 200000
                }
            ]
        },
        {
            "name": "package3",
            "services": [
                {
                    "availableServices": [
                        "ai.solver.rc.v2"
                    ],
                    "expireTime": "2025-09-20T01:10:14Z",
                    "remainingCount": 50000,
                    "totalCount": 50000
                }
            ]
        },
        {
            "name": "package4",
            "services": [
                {
                    "availableServices": [
                        "ai.solver.rc.v2"
                    ],
                    "expireTime": "2025-09-20T01:12:52Z",
                    "remainingCount": 50000,
                    "totalCount": 50000
                }
            ]
        }
    ]
}

Last updated on