Get the balance
POST https://api.noptcha.com/getBalance
Compatibility API (anti-captcha compatible). Guide. Operation ID compatGetBalance.
Available balance in US dollars (needs the balance:read scope).
Request
Authentication: the key in the clientKey body field (Keys).
Body (application/json, required):
| Field | Type | Description |
|---|---|---|
clientKeyrequired | string | Your key ( |
Responses
200
Balance or an error.
Headers: Noptcha-Request-Id.
Content: application/json
One of:
CompatBalanceCompatError— A request or task error.errorCodevalues (anti-captcha's codes; new ones may be added):
403
forbidden (problem details): the request reached the API without passing through our edge network.
Infrastructure, not part of the compatibility protocol.
Headers: Noptcha-Request-Id.
Content: application/problem+json
| Field | Type | Description |
|---|---|---|
coderequired | string | Machine-readable error code (see the table). |
detailoptional | string | Human-readable explanation of this occurrence. |
request_idrequired | string | Same as the |
statusrequired | integer | The HTTP status code. |
titlerequired | string | |
typerequired | string | format: uri |
500
internal: an error on our side.
Headers: Noptcha-Request-Id, RateLimit (optional), RateLimit-Policy (optional).
Content: application/problem+json
| Field | Type | Description |
|---|---|---|
coderequired | string | Machine-readable error code (see the table). |
detailoptional | string | Human-readable explanation of this occurrence. |
request_idrequired | string | Same as the |
statusrequired | integer | The HTTP status code. |
titlerequired | string | |
typerequired | string | format: uri |
About the compatibility API:
The anti-captcha compatible JSON protocol.
- Requests are
POSTwith a JSON body.Content-Typeis not required; the body is always parsed as JSON. - The key goes in
clientKey. The key is checked before anything else, so an invalid key is reported even when other fields are wrong. - Responses are always HTTP 200.
errorIdis 0 on success and 1 on error; thenerrorCodeanderrorDescriptionsay what went wrong (seeCompatErrorfor every code). - Two responses come from the infrastructure, not from the protocol:
403(problem details, codeforbidden) when a request reaches the API without passing through our edge network, and500(codeinternal) on an unexpected server error. Treat both as transient errors. - An unknown path, or a known path with another method (for example
GET /createTask), is404(problem details, codenot_found). - Task type names are the common anti-captcha compatible names (case-insensitive); each maps to a
canonical type and variant, see
CompatTaskType. callbackUrl(optional) receives the final result as a POST (see Webhooks and thecompatCallbackwebhook). An invalid URL isERROR_INCORRECT_SESSION_DATAand no task is created.
Header descriptions and every schema: Schemas. Machine-readable: openapi.json, openapi.yaml.