Skip to content
ZeroCaptcha

Prices API

What each task type costs now and the next change scheduled: public, with no key or session, and cacheable.

Every operation of the API reference is generated from the contract the API serves, version 0.1.0. Replace YOUR_API_KEY in the samples with your key.

List prices

GET/v1/prices

What each task type costs: the price a task created now is charged if it succeeds, and the next change already scheduled. It needs no key or session. Production lists approved prices only; a task type without one is listed with no price in effect, and its tasks are refused until it has one. A task is always charged the price in effect when it was created. Every caller gets the same reply, which caches may keep for up to five minutes; send the ETag of a reply you hold as If-None-Match to get 304 while it is current. Requests have a budget per client address.

Authentication: None: anyone may call it, within a budget per client address where the description says so.

Parameters

Parameters of List prices
NameInTypeDescription
If-None-Matchheaderstring

The ETag of a reply you hold. While the prices are unchanged, the reply is 304 with no body.

Responses

Responses of List prices
StatusMeaningBody
200 OK

The prices.

PriceList (application/json)
304 Not Modified

The prices are those of the reply whose ETag was sent: keep using it.

No body
429 Too Many Requests

Over the budget of this client address (rate_limited); retry after Retry-After, and keep a copy of the list rather than asking again.

Problem (application/problem+json)
503 Service Unavailable

The prices cannot be read now (service_unavailable): the database cannot be reached, or this instance is shedding load. Retry shortly.

Problem (application/problem+json)
Any other status

An error, as RFC 9457 problem details.

Problem (application/problem+json)

Error codes

rate_limited, service_unavailable. The errors reference says what each means, whether a retry helps and what it costs.

Sample

Terminal window
curl https://api.zerocaptcha.io/v1/prices