getBalance
Check your current account balance.
Endpoint
POST /getBalanceDescription
Returns your current AnySolver account balance in USD. This balance is used across all providers.
Request
Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
clientKey | string | Yes | Your API key from the dashboard |
Example Request
{
"clientKey": "your-api-key"
}Response
Success Response
{
"errorId": 0,
"balance": 12.5
}| Field | Type | Description |
|---|---|---|
errorId | number | 0 indicates no error |
balance | number | Current balance in USD (6 decimal precision) |
Error Response
{
"errorId": 1,
"errorCode": "ERROR_KEY_DOES_NOT_EXIST",
"errorDescription": "Invalid or missing API key. Check your dashboard for the correct key."
}Common Errors
| Error Code | Description |
|---|---|
ERROR_KEY_DOES_NOT_EXIST | Invalid or missing API key |
Notes
Balance Precision
Balances are stored with 6 decimal places of precision (e.g., 12.500000). This ensures accurate tracking even for
low-cost tasks.
- Your balance is shared across all providers
- Task costs are estimated and deducted when a task is created, then reconciled on completion
- Failed tasks are automatically refunded
- See Pricing & Billing for full details