Skip to content

Errors

There are two kinds of errors. A request error means the request was rejected: no task was created and nothing was charged. A task failure means the task was created but could not be solved: it ends with status: "failed" and is not charged. Use the codes in programs; messages may change. New codes can be added at any time (Versioning).

Request errors (v1)

The native API returns errors as RFC 9457 problem details (application/problem+json). type ishttps://noptcha.com/docs/errors/<code>; every response carries request_id (also in theNoptcha-Request-Id header).

{
"type": "https://noptcha.com/docs/errors/insufficient_balance",
"title": "Insufficient balance",
"status": 402,
"code": "insufficient_balance",
"detail": "Available $0.000300, task price $0.000900.",
"request_id": "req_…"
}
codeHTTPWhen
invalid_request400malformed body, missing field, bad parameter, callback_url not a string
unsupported_type400unknown or unavailable task type
unauthorized401invalid, revoked or expired key
insufficient_balance402balance too low for the task's price
budget_exceeded402the key's budget for the period is used up
forbidden403missing scope, IP not allowed, type not allowed, organization suspended
not_found404unknown endpoint or method; unknown, expired or foreign task; expired idempotent task
idempotency_conflict409same Idempotency-Key with another body, or still in progress
task_not_solved409feedback for a task that is still processing or failed
request_too_large413body over the limit
invalid_params422params or metadata do not match the schema, or callback_url is not allowed
rate_limited429over a rate limit, or IP blocked after invalid keys
concurrency_limited429too many tasks in flight
internal500our error
service_unavailable503no capacity or a dependency is down

422 invalid_params adds errors[] with one {pointer, message} per problem (at most 50, sorted by pointer; detail then ends with “and N more errors”); problems with an image also carry a reason (image_too_large, image_format, image_base64, image_empty; see Images).

Task failures

In the native API a failed task has status: "failed" and error: {code, message}, with a cost of zero:

error.codeMeaning
unsolvablethe captcha could not be solved (also when no solver accepts these parameters)
timeoutnot solved before the type's deadline
proxy_errorthe proxy could not be used
invalid_sitethe site key or domain is invalid
invalid_imagethe image is empty, too big or unreadable
cancelledthe task was cancelled

In the compatibility API a failed task is reported by getTaskResult with errorId: 1 and an error code such asERROR_CAPTCHA_UNSOLVABLE or one of the proxy codes below.

Compatibility API

Every response is HTTP 200; errorId is 0 on success and 1 on error, with errorCode anderrorDescription. The codes are the anti-captcha compatible ones:

errorCodeWhen
ERROR_KEY_DOES_NOT_EXISTkey malformed, unknown, revoked or expired; or the key lacks the scope this endpoint needs
ERROR_ZERO_BALANCEbalance too low, or the key's budget is used up
ERROR_IP_NOT_ALLOWEDclient IP not in the key's allowlist
ERROR_IP_BLOCKEDtoo many invalid keys from this IP
ERROR_ACCOUNT_SUSPENDEDthe organization is suspended
ERROR_NO_SLOT_AVAILABLEno capacity, concurrency limit, create rate limit (also sandbox limits), temporary or internal error; retry later
ERROR_TASK_NOT_SUPPORTEDunknown task type name, or type not allowed for the key
ERROR_TASK_ABSENTtask missing or not an object (or the body could not be read)
ERROR_NO_SUCH_CAPCHA_IDtaskId missing, unknown, expired or of another organization; report for an unsolved task
ERROR_INCORRECT_SESSION_DATAa parameter does not match the schema (errorDescription names it), or callbackUrl is not allowed
ERROR_RECAPTCHA_INVALID_SITEKEYthe site key is invalid (parameter check or solver)
ERROR_RECAPTCHA_INVALID_DOMAINthe website URL, API domain or subdomain is invalid or not allowed
ERROR_ZERO_CAPTCHA_FILESIZEthe image is missing or empty
ERROR_TOO_BIG_CAPTCHA_FILESIZEthe image (characters or pixels) or the request body is too large
ERROR_IMAGE_TYPE_NOT_SUPPORTEDthe image is not valid base64, not a PNG, JPEG, GIF, WebP or BMP image, or malformed or truncated (checked when the task is created); or the solver could not read it (task failed)
ERROR_CAPTCHA_UNSOLVABLEthe task failed: unsolvable, timed out, or no solver accepts these parameters
ERROR_PROXY_CONNECT_REFUSED
ERROR_PROXY_CONNECT_TIMEOUT
ERROR_PROXY_READ_TIMEOUT
ERROR_PROXY_BANNED
ERROR_PROXY_TRANSPARENT
ERROR_PROXY_HAS_NO_IMAGE_SUPPORT
ERROR_PROXY_INCOMPATIBLE_HTTP_VERSION
the proxy could not be used (task failed)
ERROR_TOKEN_EXPIREDthe solver reported the token expired (task failed)

Two responses come from the infrastructure rather than the protocol: HTTP 403 (problem details, forbidden) when a request does not pass through our edge network and HTTP 500 (internal). Treat both as transient. The 2captcha legacy API has its own codes, see 2captcha legacy API.

What to retry

  • Retry after a wait: rate_limited, concurrency_limited, service_unavailable, internal; ERROR_NO_SLOT_AVAILABLE. Honour Retry-After when present.
  • Fix first: everything else. Retrying an invalid request unchanged gives the same error.
  • Failed tasks are not charged; you may create a new task for the same captcha.
  • For POST /v1/tasks, send an Idempotency-Key so that a retry after a network error cannot create a second task (Idempotency).