Skip to content

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):

FieldTypeDescription
clientKey
required
string

Your key (nop_live_… or nop_test_…).

Responses

200

Balance or an error.

Headers: Noptcha-Request-Id.

Content: application/json

One of:

  • CompatBalance
  • CompatError — A request or task error. errorCode values (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

FieldTypeDescription
code
required
string

Machine-readable error code (see the table).

detail
optional
string

Human-readable explanation of this occurrence.

request_id
required
string

Same as the Noptcha-Request-Id header.

status
required
integer

The HTTP status code.

title
required
string
type
required
stringformat: uri

500

internal: an error on our side.

Headers: Noptcha-Request-Id, RateLimit (optional), RateLimit-Policy (optional).

Content: application/problem+json

FieldTypeDescription
code
required
string

Machine-readable error code (see the table).

detail
optional
string

Human-readable explanation of this occurrence.

request_id
required
string

Same as the Noptcha-Request-Id header.

status
required
integer

The HTTP status code.

title
required
string
type
required
stringformat: uri

About the compatibility API:

The anti-captcha compatible JSON protocol.

  • Requests are POST with a JSON body. Content-Type is 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. errorId is 0 on success and 1 on error; then errorCode and errorDescription say what went wrong (see CompatError for every code).
  • Two responses come from the infrastructure, not from the protocol: 403 (problem details, code forbidden) when a request reaches the API without passing through our edge network, and 500 (code internal) on an unexpected server error. Treat both as transient errors.
  • An unknown path, or a known path with another method (for example GET /createTask), is 404 (problem details, code not_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 the compatCallback webhook). An invalid URL is ERROR_INCORRECT_SESSION_DATA and no task is created.

Header descriptions and every schema: Schemas. Machine-readable: openapi.json, openapi.yaml.