How to bypass Lemin captcha

How to bypass Lemin captcha comes down to one measurement: where the plug sits in the square picture. Capture the challenge, send the image to a captcha solver API, then move the piece by the offset it returns, so that Lemin’s own widget writes the answer your form submits. This guide explains the cropped puzzle and the two ilovecaptcha calls.

Updated on · Written and maintained by the ilovecaptcha team

Preview: the API described here is in public beta. Endpoint names, fields and codes can still change until the end of the beta, and no API key is distributed yet.

What is Lemin captcha, and what does its cropped puzzle look like?

Lemin Captcha is a puzzle CAPTCHA whose site is signed Capy Inc. and which presents itself as a game: “Through gamification, we are curing the pains of traditional CAPTCHA.” In the integration we measured, the visitor ticks a box, a panel opens with a square picture and one loose piece, and the piece must be dragged onto the picture until it fits. The script is served from a path named cropped, hence the usual name Lemin CROPPED.

According to Lemin, its game is quicker to complete than a traditional image-based CAPTCHA. Speed is not comfort, though: in a USENIX Security 2023 study, 1,400 participants solved 14,000 CAPTCHAs, and solving time did not always match what users preferred.

What is on screen during a Lemin challenge?

Parts of a Lemin cropped challenge, in the integration we examined
Part What the visitor sees What a solver takes from it
Picture A square photo of 400×400 pixels, with a second photo faintly blended in The search area; the blend adds contours that belong to no object
Plug A puzzle-shaped patch in another material: bright plastic, wood, glass The target: its position is the answer
Loose piece A 120×120 tile with transparent margins, waiting under the picture The outline to look for, and the part of the photo the plug hides

Why does a classic gap search fail on Lemin’s cropped picture?

Because nothing is missing from the picture. On most slide puzzles the piece is cut out of the background and leaves a darker notch, which a solver finds by matching the texture of the piece. Lemin does the reverse: the background is complete, and the spot where the piece belongs is covered by a plug of the same shape. The loose piece shows what lies under the plug, so its texture appears nowhere in the picture.

  • The outline remains: the plug has the silhouette of the loose piece, same size, no rotation.
  • The material remains: its edge draws a closed contour, in brightness or in colour alone.
  • The count helps: one plug per picture in the challenges we examined.

How does a solver find the plug instead?

ilovecaptcha’s solver looks for a shape, not for a texture. It reads the outline of the loose piece from its transparency, then compares that outline with the contours of the picture: the plug is where a closed contour follows it all the way round. Colour counts as much as brightness, because a red or turquoise plug on a grey area of equal brightness disappears in a greyscale image.

Why can Lemin refuse a placement that seems correct?

Because finding the plug is only half of the task: the piece must also land on it, and Lemin’s widget judges the drop, not the calculation. A refusal can come from the picture, the site’s settings or the replay of the distance, and the widget does not say which.

  • The picture: on fur or foliage, the edge of the plug can be weaker than the natural contours around it.
  • The settings: according to Lemin’s FAQ, a site uses preset security levels or customises each parameter.
  • The silence: the widget shows no error and loads another challenge, so a near miss and a wrong plug look the same.

How much tolerance does Lemin leave around the right position?

Some, but not evenly spread. In the widget we measured, the piece does not travel pixel by pixel: it settles on a coarse grid, so a small error is absorbed inside a step and becomes a miss once it crosses into the next. Two conversions come first. The picture is displayed at another size than its 400-pixel file, so the distance must be scaled. And the piece is a tile with transparent margins: the distance applies to the whole tile, not to the visible shape inside it.

What does a site verify once the Lemin piece is placed?

An encrypted answer, not a position. According to Lemin’s developer guide, the widget adds two parameters to the submitted form, lemin_challenge_id and lemin_answer, and the site’s back end sends them with its private_key in a POST request to Lemin, which replies with a verdict. A solver therefore cannot hand over a ready-made form value: the distance it returns has to be played in the widget, which then writes both fields.

Which verdicts can Lemin return to the site?

Verification results documented by Lemin for its cropped captcha
Code Meaning given by Lemin
success true, no code Answer is correct
incorrect_answer Answer is wrong
challenge_is_not_active Challenge is not active

Lemin’s server always responds with status code 200, so the site reads the success field. The guide does not say how long a challenge stays active: submit the form as soon as the widget has accepted the piece.

What do you send for a Lemin task, and what comes back?

You send the image of the cropped challenge in base64 with the task type lemin, and no instruction, since Lemin displays none that changes the task. The API answers with one integer, offset: a distance in pixels counted in the image you sent, to be applied to the 120×120 tile.

The Lemin task at a glance
Item Value
Publisher Lemin
Challenge family Drag-and-drop puzzle
Task type lemin
You send Challenge image (base64 or URL)
You get back Slide distance in pixels

How to bypass Lemin captcha with the ilovecaptcha API?

In five steps, three of them in an automated browser: Lemin’s piece is dropped by a real pointer, and the API supplies the distance.

  1. Open the puzzle panel. Tick Lemin’s checkbox so that the picture and the loose piece are displayed.
  2. Capture the square picture. Capture the challenge and note the displayed width of the picture.
  3. Send the Lemin task. Send createTask with lemin as type and the capture as image, without instruction.
  4. Wait for the offset. Poll getTaskResult every 1 to 2 seconds until ready delivers the offset integer.
  5. Drop the piece on the plug. Scale offset to the displayed width, then drag the piece onto the plug.

Once Lemin accepts the placement, its widget fills lemin_answer and lemin_challenge_id.

What does a Lemin request look like?

One cropped challenge goes out in the request below: image holds the capture in base64 and instruction is left out. A single integer comes back, offset: here 184 pixels, counted in the image sent, on a picture 400 pixels wide. If the widget displays that picture 300 pixels wide, multiply by 0.75: on screen, the distance becomes 138 pixels.

POST /createTask
Content-Type: application/json

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "lemin",
    "image": "iVBORw0KGgoAAAANSUhEUg…"
  }
}

→ 200 { "errorId": 0, "taskId": "tsk_8f3a1c2e", "status": "processing" }

POST /getTaskResult
Content-Type: application/json

{ "clientKey": "YOUR_API_KEY", "taskId": "tsk_8f3a1c2e" }

→ 200 { "errorId": 0, "status": "ready", "solution": { "offset": 184 } }
A createTask request for a Lemin task, then the getTaskResult answer once the task is ready (preview format).

Lemin bypass: frequently asked questions

Can the Lemin cropped puzzle be solved by a program?

Yes. The task has one right answer, the position of the plug, and a program can compute it from the picture and the outline of the piece. What a program cannot do is skip the widget: the distance has to be replayed as a real drag in the page, and Lemin judges each drop. After a refusal, it serves a new picture and the whole sequence starts again.

Why can’t I find the gap in a Lemin captcha image?

Because there is none. Lemin does not cut the piece out of the background: it covers the right spot with a plug of the same shape, made of another material. The loose piece carries the part of the photo hidden beneath that plug, so matching it against the background returns arbitrary positions. What can be found is the outline of the plug, which follows the silhouette of the piece.

What are lemin_answer and lemin_challenge_id?

According to Lemin’s developer guide, they are the two parameters that the widget adds to the form on submission: the visitor’s encrypted answer and the identifier of the challenge. The site’s back end forwards both to Lemin with its private key and receives a verdict. Neither value can be computed from a screenshot: they exist only after the widget has accepted the placement, which is why a solver’s distance is replayed in the page and never posted directly.

Does every site show the same Lemin challenge?

No. Lemin’s documentation names three UI types, Invisible, Boxed and Integrated. Its FAQ says that a site can upload its own images, over 300 × 300 pixels and below 3 MB, and can pick a preset security level or tune each parameter; it adds that a visitor who has solved a puzzle can skip requests for up to 30 days. What you observe on one site may therefore not hold on another.

Am I allowed to automate a Lemin captcha?

On pages you operate or are authorised to test, yes: running end-to-end tests, monitoring or accessibility automation through your own Lemin form is a normal use of a solver. Elsewhere, collecting public data stays bound by the target site’s terms and by applicable law. Lemin says its product protects against brute-force login attacks and credential stuffing. Those attacks, like spam and payment fraud, are what OWASP files under OAT-009, CAPTCHA Defeat, and ilovecaptcha does not support them.

Sources

The facts and figures quoted on this page come from these sources.