getBalance: retrieve account balance
Retrieve an account balance with its account key, Convenient to do your own alarm and query.
Example request
Request Structure
Parameters | Type | Required | Description |
---|---|---|---|
clientKey | String | Yes | Client account key, can be found here |
POST https://api.capsolver.com/getBalance
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY"
}
Example response
Response Structure
Parameter | Type | Description |
---|---|---|
errorId | Integer | Error message: 0 - no error 1 - with error |
errorCode | String | errorCode: full list of errors |
errorDescription | String | Short description of the error |
balance | Decimal | Account balance value in USD |
packages | Array | Monthly/Weekly Packages |
Example Response
{
"errorId": 0,
"balance": 1234567,
"packages": [
{
"packageId": "12327bff7f703e135e7379kf",
"type": 2,
"title": "reCAPTCHA v2 500K",
"numberOfCalls": 1234567,
"status": 1,
"token": "CAP-1234567C19044AF7351B31EC12345678",
"expireTime": 1702896511
}
]
}
Use SDK Request
#pip install --upgrade capsolver
#export CAPSOLVER_API_KEY='...'
import capsolver
# capsolver.api_key = "..."
balance = capsolver.balance()