#
Error Codes
CaptchaSolv API error codes and troubleshooting guide.
All errors return: {"errorId": N, "errorCode": "...", "errorDescription": "..."}.
#
Reference
#
Retry Example
Only retry on ERROR_CAPTCHA_UNSOLVABLE. Auth or validation errors won't succeed on retry.
def solve_with_retry(task, max_retries=3):
for attempt in range(max_retries):
response = requests.post("https://v1.captchasolv.com/solve", json={
"clientKey": API_KEY,
"task": task
}).json()
if response["errorId"] == 0:
return response["solution"]
if response.get("errorCode") == "ERROR_CAPTCHA_UNSOLVABLE":
continue # retry
raise Exception(response.get("errorDescription"))
raise Exception("Max retries exceeded")