Skip to content

Error Codes

All error responses from the uCaptcha API follow a consistent format. When an error occurs, the response includes errorId: 1 along with an error code and a human-readable description.

{
"errorId": 1,
"errorCode": "ERROR_KEY_DOES_NOT_EXIST",
"errorDescription": "The API key you provided does not exist in our system."
}

Plain text:

ERROR_KEY_DOES_NOT_EXIST

JSON (with json=1):

{
"status": 0,
"request": "ERROR_KEY_DOES_NOT_EXIST"
}

Error CodeHTTP StatusDescriptionHow to Fix
ERROR_KEY_DOES_NOT_EXIST401API key is invalid or does not existVerify your API key is correct and has not been deleted
ERROR_WRONG_USER_KEY401Invalid API key (legacy API format)Same as above; check the key parameter
ERROR_ZERO_BALANCE402Insufficient account balanceAdd funds via the Telegram Mini App or dashboard
ERROR_PAGEURL400Missing or invalid websiteURLProvide a valid, fully-qualified URL (including https://)
ERROR_SITEKEY400Missing or invalid websiteKeyInspect the target page to find the correct site key
ERROR_BAD_PARAMETERS400One or more request parameters are invalidReview the request format and check required fields
ERROR_BAD_PROXY400Proxy is invalid or unreachableVerify the proxy is online and credentials are correct
ERROR_PROXY_FORMAT400Proxy string could not be parsedUse the format type://user:pass@ip:port or user:pass@ip:port with a separate proxyType
ERROR_CAPTCHA_UNSOLVABLE200The provider could not solve the captchaRetry the task; consider trying a different provider or selection mode
ERROR_WRONG_CAPTCHA_ID404The specified task ID was not foundVerify the taskId is correct and the task has not expired
ERROR_EMPTY_ACTION400Missing action parameter (legacy API)Include action=get, action=getbalance, action=reportbad, or action=reportgood
CAPCHA_NOT_READY200Task is still being processed (legacy API)Continue polling every 5 seconds
TASK_NOT_SUPPORTED400The task type is not recognizedCheck the task.type value against supported task types
NO_PROVIDERS_AVAILABLE400No provider can handle this task type with the current configurationTry a different task type, selection mode, or contact support
RATE_LIMITED429Too many requests from this IPReduce request frequency; the limit is 10,000 requests per 10-second window
IP_BANNED403Your IP is not in the API key’s whitelistAdd your IP address to the key’s IP whitelist in the dashboard
ERROR_BANNED403Your account has been bannedContact support for more information

Some errors are transient and can be resolved by retrying. The following errors are good candidates for automatic retries:

  • ERROR_CAPTCHA_UNSOLVABLE — The captcha may succeed on a second attempt, potentially with a different provider.
  • RATE_LIMITED — Wait for the rate limit window to reset (check the X-RateLimit-Reset header), then retry.
  • NO_PROVIDERS_AVAILABLE — Temporary provider outage. Wait a few seconds and retry.

Before submitting a large batch of tasks, call getBalance to verify you have sufficient funds. This avoids wasting time and API calls on tasks that will be rejected with ERROR_ZERO_BALANCE.

import requests
# Check balance first
balance_resp = requests.post("https://api.ucaptcha.net/getBalance", json={
"clientKey": "YOUR_API_KEY"
}).json()
estimated_cost = num_tasks * 0.003 # Estimate per task
if balance_resp["balance"] < estimated_cost:
print(f"Insufficient balance: ${balance_resp['balance']:.4f} "
f"(need ~${estimated_cost:.4f} for {num_tasks} tasks)")
else:
# Proceed with batch submission
pass

Distinguish Request Errors from Task Errors

Section titled “Distinguish Request Errors from Task Errors”

There are two categories of errors:

  1. Request errors (errorId: 1) — The API could not process your request. These are returned by createTask, getTaskResult, and other endpoints. Check errorCode in the response.

  2. Task errors (errorId: 0, status: "failed") — The request was valid, but the provider could not solve the captcha. These appear in getTaskResult responses. Failed tasks are automatically refunded.

import requests
import time
def solve_captcha(client_key, task):
# Create task
create_resp = requests.post("https://api.ucaptcha.net/createTask", json={
"clientKey": client_key,
"task": task
}).json()
if create_resp["errorId"] != 0:
raise Exception(f"Create failed: {create_resp['errorCode']}")
task_id = create_resp["taskId"]
# Poll for result
for _ in range(60):
result_resp = requests.post("https://api.ucaptcha.net/getTaskResult", json={
"clientKey": client_key,
"taskId": task_id
}).json()
if result_resp["errorId"] != 0:
raise Exception(f"Poll failed: {result_resp['errorCode']}")
if result_resp["status"] == "ready":
return result_resp["solution"]
if result_resp["status"] == "failed":
raise Exception(f"Task failed: {result_resp.get('errorCode', 'unknown')}")
time.sleep(5)
raise TimeoutError("Task did not complete within 5 minutes")