Skip to Content
Peak Solutions

getBalance

POST /getBalance returns what your key can spend, in USD.

POST https://api.peak.fo/getBalance

Returns what your key can spend, in USD. It's free.

Request

FieldTypeRequiredDescription
clientKeystringYesYour API key.
Terminal
curl https://api.peak.fo/getBalance \
  -H "Content-Type: application/json" \
  -d '{"clientKey": "pk_your_api_key"}'

Response

FieldTypeDescription
errorIdnumber0 if the request worked.
balancenumberWhat the key can spend, in USD.
packagesarrayAlways empty. It's there for CapSolver code.
{
  "errorId": 0,
  "balance": 12.5,
  "packages": []
}

Package keys

A package key has solves, not dollars. So balance is what the solves left are worth: the solves left × the package's price per solve, rounded down to 4 decimals.

For example, a package of 500,000 solves bought for $250 is worth $0.0005 a solve. With 342,819 solves left, balance is 171.4095.

When the package is used up or expires, balance is 0, so code that stops at a zero balance stops at the right time. For the exact number of solves left and the expiry date, use the native GET /balance.

On this page