CAPTCHA / YANDEX_ICONS

Yandex / Icons

Yandex SmartCaptcha with icons: icons on a busy background on the image, the same icons on the strip in the required order. The response is the click points. Available through the direct API.

Input

Prepare canvas.png, the 500×330 image, and order.png, the 300×60 strip with icons on a transparent background. Send the files of one task unchanged and keep the alpha channel of the strip.

Parameters

ParameterTypeRequiredDefaultDescription
imagestringYes—Source image in base64.
orderstringYes—The icon strip in base64.

Response

Recognition dataTypeDescription
confidencenumberThe lowest p score among the points.
extra.points[].indexintegerClick number, starting at 1. The order matches the icons on the strip.
extra.points[].x / ynumberClick point in pixels of the original image.
extra.points[].namestringIcon name.
extra.points[].pnumberScore of the found icon, from 0 to 1.
extra.points[].matchnumberSimilarity of the strip icon to the known icon of this name.
extra.sizeinteger[2]Width and height of the original image.
extra.points[].own_classbooleanfalse: no icon of this name was found on the image and another one was taken. Do not use such an answer; request a new task.

Applying the answer

Click the extra.points in order. If the original image is W×H and it is shown on the page as w×h, the coordinate relative to the image on the page is x × w / W, y × h / H.

Common mistakes

  • The image and the strip must belong to the same task.
  • A strip without an alpha channel must have dark icons on a light background.
  • Do not crop or scale the files before sending.
Scenario errors and retries →

Request example

Python · requests
import base64
from pathlib import Path
import os
import uuid
import requests

def image64(filename):
    return base64.b64encode(Path(filename).read_bytes()).decode("ascii")

payload = {
    "image": image64("canvas.png"),
    "order": image64("order.png"),
}

# One ID per task; keep it for network retries.
request_id = str(uuid.uuid4())
response = requests.post(
    "https://capi.z3n.pro/v1/solve/yandex_icons",
    headers={
        "Authorization": f"Bearer {os.environ['CAPI_API_KEY']}",
        "Content-Type": "application/json",
        "Idempotency-Key": request_id,
    },
    json=payload,
    timeout=90,
)
response.raise_for_status()
result = response.json()
for point in result["extra"]["points"]:
    print(point["index"], point["x"], point["y"])
Payment and all routes →