API Error Codes
When a request fails, the API returns an error code instead of a task ID or an answer. Below are the most common codes with what to do about them, followed by full tables for both API formats: RuCaptcha (2Captcha) with in.php and res.php, and Anti-Captcha with createTask and getTaskResult. Look in the section that matches the format your software uses.
Most common errors and how to fix them
CAPCHA_NOT_READY
Not really an error: the captcha is still being solved. Wait about 5 to 10 seconds and send the same res.php request again. Most captchas are ready in a few seconds, tokens for reCAPTCHA and Turnstile take 10 to 30 seconds. Limit the total waiting time in your code (for example, 2 minutes) so a task cannot hang forever.
ERROR_WRONG_USER_KEY and ERROR_KEY_DOES_NOT_EXIST
The API key is wrong. ERROR_WRONG_USER_KEY is returned in the RuCaptcha format, ERROR_KEY_DOES_NOT_EXIST in the Anti-Captcha format. Copy the key from the dashboard again and check that there are no extra spaces or line breaks, that the whole key was copied, and that you are sending it in the right parameter (key for in.php and res.php, clientKey for createTask and getTaskResult).
ERROR_ZERO_BALANCE
The balance is zero or negative. Top up your balance in the dashboard. You can check the balance through the API and stop sending tasks when it gets low, so your software does not run into this error.
ERROR_CAPTCHA_UNSOLVABLE
The service could not solve this captcha. Usually this means the image was unreadable, the task text did not match a supported task, or the parameters (sitekey, page URL) were wrong. Check the parameters, then send a new task. Do not resend the same task ID: request a new captcha from the site and submit it again.
ERROR_NO_SLOT_AVAILABLE
Too many tasks at once, or the service is under heavy load. Wait a few seconds and resend the task. If it happens often, reduce the number of tasks you send in parallel.
ERROR_NO_SUCH_CAPCHA_ID and ERROR_WRONG_CAPTCHA_ID
The task ID in the res.php request was not found. Check that you send the ID exactly as in.php returned it, and that you request the result with the same API key that created the task.
RuCaptcha (2Captcha) format
Errors of
http://api2.cap.guru/in.phpfor image captchas
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_TOO_BIG_CAPTCHA_FILESIZE | The image file is too large |
| ERROR_UPLOAD | The image could not be uploaded |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
Errors of
http://api2.cap.guru/in.phpfor reCAPTCHA v2, v2 Invisible and v3
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_NO_SLOT_AVAILABLE | No free slots: you sent too many tasks or the service is under heavy load |
| ERROR_PAGEURL | Invalid page URL |
| ERROR_GOOGLEKEY | Invalid sitekey (googlekey) |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
Errors of
http://api2.cap.guru/res.php
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_GOOGLEKEY | Invalid sitekey (googlekey) |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
| CAPCHA_NOT_READY | The task is still being solved, repeat the request in 5 to 10 seconds |
| ERROR_NO_SUCH_CAPCHA_ID | Task ID not found |
| ERROR_WRONG_CAPTCHA_ID | Task ID not found |
| notpic | The object from the task was not found in the image |
Anti-Captcha format
Errors of
http://api2.cap.guru/createTaskfor image captchas
| Error | Description |
|---|---|
| ERROR_KEY_DOES_NOT_EXIST | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_TOO_BIG_CAPTCHA_FILESIZE | The image file is too large |
| ERROR_UPLOAD | The image could not be uploaded |
| ERROR_IMAGE_TYPE_NOT_SUPPORTED | The image format is not supported |
Errors of
http://api2.cap.guru/createTaskfor reCAPTCHA v2, v2 Invisible and v3
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_NO_SLOT_AVAILABLE | No free slots: you sent too many tasks or the service is under heavy load |
| ERROR_RECAPTCHA_INVALID_DOMAIN | Invalid page URL |
| ERROR_RECAPTCHA_INVALID_SITEKEY | Invalid sitekey |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
Errors of
http://api2.cap.guru/getTaskResult
| Error | Description |
|---|---|
| ERROR_KEY_DOES_NOT_EXIST | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_GOOGLEKEY | Invalid sitekey (googlekey) |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
| CAPCHA_NOT_READY | The task is still being solved, repeat the request in 5 to 10 seconds |
| ERROR_NO_SUCH_CAPCHA_ID | Task ID not found |
| ERROR_WRONG_CAPTCHA_ID | Task ID not found |
| notpic | The object from the task was not found in the image |
Errors of methods that are not available now
Expand
These codes belong to token methods for hCaptcha and GeeTest. Token solving for these captchas is currently unavailable: hCaptcha and GeeTest are solved by clicks. The codes are kept here for older integrations.
http://api2.cap.guru/in.phpfor hCaptcha tokens
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_NO_SLOT_AVAILABLE | No free slots: you sent too many tasks or the service is under heavy load |
| ERROR_PAGEURL | Invalid page URL |
| ERROR_HKEY | Invalid hCaptcha sitekey |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
http://api2.cap.guru/res.phpfor hCaptcha tokens
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
| CAPCHA_NOT_READY | The task is still being solved, repeat the request in 5 to 10 seconds |
| ERROR_WRONG_CAPTCHA_ID | Task ID not found |
| notpic | The object from the task was not found in the image |
http://api2.cap.guru/in.phpfor GeeTest tokens
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_NO_SLOT_AVAILABLE | No free slots: you sent too many tasks or the service is under heavy load |
| ERROR_PAGEURL | Invalid page URL |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
| ERROR_GEETTEST_GT | The gt value is empty |
| ERROR_GEETTEST_challenge | The challenge value is empty |
http://api2.cap.guru/res.phpfor GeeTest tokens
| Error | Description |
|---|---|
| ERROR_WRONG_USER_KEY | Invalid API key |
| ERROR_ZERO_BALANCE | The balance is zero or negative, top it up in the dashboard |
| ERROR_CAPTCHA_UNSOLVABLE | The service could not solve your captcha |
| CAPCHA_NOT_READY | The task is still being solved, repeat the request in 5 to 10 seconds |
| ERROR_WRONG_CAPTCHA_ID | Task ID not found |
| ERROR_CAPTCHA_BAD_GT_OR_CNANNEL | Invalid gt or channel value |
| ERROR_PROXY_CONNECTION_FAILED | The proxy is not working |