{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/capmonster/json-schema/capmonster-get-balance-response-schema.json",
  "title": "GetBalanceResponse",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/capmonster-openapi.json#/components/schemas/GetBalanceResponse",
  "type": "object",
  "required": [
    "errorId"
  ],
  "properties": {
    "errorId": {
      "type": "integer",
      "description": "`0` = success, non-zero = error."
    },
    "errorCode": {
      "oneOf": [
        {
          "$ref": "#/$defs/ErrorCode"
        },
        {
          "type": "null"
        }
      ]
    },
    "errorDescription": {
      "type": [
        "string",
        "null"
      ]
    },
    "balance": {
      "type": "number",
      "description": "Available account balance (credits). Present on success."
    }
  },
  "$defs": {
    "ErrorCode": {
      "type": "string",
      "description": "Machine-readable error code returned when `errorId` is non-zero.",
      "enum": [
        "ERROR_KEY_DOES_NOT_EXIST",
        "ERROR_ZERO_BALANCE",
        "ERROR_TOO_BIG_CAPTCHA_FILESIZE",
        "ERROR_ZERO_CAPTCHA_FILESIZE",
        "ERROR_NO_SUCH_CAPCHA_ID",
        "WRONG_CAPTCHA_ID",
        "ERROR_CAPTCHA_UNSOLVABLE",
        "CAPTCHA_NOT_READY",
        "ERROR_IP_NOT_ALLOWED",
        "ERROR_IP_BANNED",
        "ERROR_NO_SUCH_METHOD",
        "ERROR_TOO_MUCH_REQUESTS",
        "ERROR_DOMAIN_NOT_ALLOWED",
        "ERROR_TOKEN_EXPIRED",
        "ERROR_NO_SLOT_AVAILABLE",
        "ERROR_RECAPTCHA_INVALID_SITEKEY",
        "ERROR_RECAPTCHA_INVALID_DOMAIN",
        "ERROR_RECAPTCHA_TIMEOUT",
        "ERROR_IP_BLOCKED",
        "ERROR_PROXY_CONNECT_REFUSED",
        "ERROR_PROXY_BANNED",
        "ERROR_PROXY_MISSING",
        "ERROR_PROXY_NOT_AUTHORISED",
        "ERROR_PROXY_READ_TIMEOUT",
        "ERROR_TASK_NOT_SUPPORTED",
        "ERROR_TASK_ABSENT",
        "ERROR_WRONG_USERAGENT"
      ]
    }
  }
}