CAPTCHA / GEETEST_SLIDE

GeeTest / Slide

Puzzle captcha: the solver finds the horizontal position of the cut-out on the main background and returns x in pixels.

Input

Prepare background.png — the original background, slice.png — the original puzzle fragment with transparency, and ypos — its vertical coordinate from the round data. Keep the original size of both files.

Parameters

ParameterTypeRequiredDefaultDescription
imagestringYes—Source image in base64.
slicestringYes—Puzzle fragment in base64. A PNG with the alpha channel preserved is required: the fragment's outline is taken from it.
yposintegerNo0Vertical coordinate of the fragment on the main background. Take the real value from the current task. If omitted, the search runs on row 0, which only fits such a task.

Response

Recognition dataTypeDescription
extra.xintegerX of the fragment's left edge aligned with the cut-out, in pixels of the original background. This is a position, not a precomputed slider drag distance.
extra.debug.scorenumberContour match score at the chosen position.
extra.debug.marginnumberComparison of the best position with other candidates.

Applying the answer

Read result["extra"]["x"]. Recalculate the position for the picture's scale on the page and the fragment's starting position.

Common mistakes

  • A JPEG fragment loses its alpha outline — use the original PNG.
  • Do not take ypos from another round and do not replace it with a DOM element coordinate on the page.
  • extra.x is not the slider travel distance in every interface implementation.
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("background.png"),
    "slice": image64("slice.png"),
    "ypos": 48,
}

# One ID per task; keep it for network retries.
request_id = str(uuid.uuid4())
response = requests.post(
    "https://capi.z3n.pro/v1/solve/geetest_slide",
    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()
print(result["extra"]["x"])
Payment and all routes →