Error Codes

All errors follow the same shape regardless of which provider handled the request. The error field is the string name; message is a human-readable description.

{
  "error": "AUTH_INVALID",
  "message": "API key not found or invalid",
  "retryable": false
}

Authentication

ErrorHTTPDescription
AUTH_INVALID401API key not found or invalid
AUTH_FORBIDDEN403Access denied (IP restriction or account suspended)
BALANCE_EMPTY402Account balance is zero or negative

Input Validation

ErrorHTTPDescription
INPUT_MISSING400Required input field is missing
INPUT_BAD_TYPE400Unsupported input type or format
INPUT_TOO_SMALL400Input payload is too small
INPUT_TOO_LARGE413Input payload exceeds maximum size
METHOD_INVALID400Unknown method or captcha type

Solve Errors

ErrorHTTPRetryableDescription
CAPACITY429YesNo workers available; try again later
UNSOLVABLE422YesCould not solve after multiple attempts
NOT_FOUND404NoTask not found or expired
PROVIDER_TIMEOUT504YesCaptcha provider timed out
PROVIDER_SITEKEY400NoProvider rejected sitekey as invalid
PROVIDER_DOMAIN400NoProvider rejected domain for this sitekey

Proxy Errors

Returned when you supply a proxy in your request and it fails. All proxy errors have an HTTP status of 502 or 504.

ErrorHTTPDescription
PROXY_REFUSED502Proxy connection refused
PROXY_TIMEOUT504Proxy connection timed out
PROXY_BANNED502Proxy IP banned by target service
PROXY_AUTH502Proxy authentication failed

Handling Errors

Check the retryable field in the response. If true, wait for the retryAfter seconds and try again. The Retry-After HTTP header is also set on retryable errors.

{
  "error": "CAPACITY",
  "message": "No workers available; try again later",
  "retryable": true,
  "retryAfter": 5
}