Using the web API for prediction

decryptr offers a free and simple web API that you can use to break captchas that are on our list of pre-trained models..

Making predictions

The web interface needs 2 parameters passed throught a POST request to an endpoint in The complete list of endpoints can be found here.

The first parameter, img, is a base64 encoded image. The second is the api key which you can obtain here.

Note: Get your API key here

From R

In R, you can make the request by calling:


# converting the image to base64
arq <- "path-to-img"
img <- arq %>%
  readr::read_file_raw() %>%

# post request
res <- httr::POST(
  body = list(
    img = img,
    key = "your-api-key"
  encode = "json"

From Shell

Write the following excerpt to a file called

if [ "$1" != "" ]; then
  (echo -n '{"img": "'; base64 "$1"; echo -n '", "key": "'; cat "$2"; echo -n '"}') |
  (curl -s -H "Content-Type: application/json" -d @- |
  sed 's/[^[:alnum:]]//g'
    echo "Coloque o nome do arquivo como argumento"

Also write your key to a .txt file.

Then to execute the script, run:

chmod +x
./ caminho/do/captcha.png caminho/da/key.txt