@@ -499,11 +499,9 @@ With proxy, use `GeeTestTask` (same proxy fields as reCAPTCHA v2).
499499<sup >[ API method description.] ( https://captcha-solver.com/en/docs/captcha-types#yandex-smartcaptcha ) </sup >
500500
501501Use this method to solve the token-based Yandex SmartCaptcha and obtain a token
502- for the widget on the target page. Use the coordinates method for image challenges.
502+ for the widget on the target page. Use the dedicated image method for image challenges.
503503
504- ` YandexSmartCaptchaTaskProxyless ` / ` YandexSmartCaptchaTask ` -- token-based
505- challenge. For the image challenge instead, use ` CoordinatesTask ` with
506- [ Coordinates] ( #coordinates-click-captcha ) is available for generic click captchas.
504+ ` YandexSmartCaptchaTaskProxyless ` / ` YandexSmartCaptchaTask ` -- token-based challenge.
507505
508506| Parameter | Required | Description |
509507| ---| ---| ---|
@@ -532,15 +530,45 @@ print(result["token"])
532530With proxy, use ` YandexSmartCaptchaTask ` (same proxy fields as reCAPTCHA v2,
533531plus the ` https ` option above).
534532
533+ #### Image challenge
534+
535+ Use ` YandexSmartCaptchaImageTask ` when SmartCaptcha shows a main image and a
536+ separate strip indicating the symbols to click. The SDK sends API v2 type
537+ ` SmartCaptchaTask ` ; both images must be base64-encoded.
538+
539+ | Parameter | Required | Description |
540+ | ---| ---| ---|
541+ | ` image ` | yes | Main captcha image, base64-encoded. |
542+ | ` imgInstructions ` | yes | Click-order instruction image, base64-encoded. |
543+ | ` comment ` | no | Optional text hint for the worker. |
544+
545+ ** Response:** ` coordinates ` -- ordered ` {"x": int, "y": int} ` click positions.
546+
547+ ``` python
548+ import base64
549+ from captcha_solver_api import CaptchaClient
550+ from captcha_solver_api.tasks import YandexSmartCaptchaImageTask
551+
552+ with open (" captcha.png" , " rb" ) as f:
553+ image = base64.b64encode(f.read()).decode(" utf-8" )
554+ with open (" instructions.png" , " rb" ) as f:
555+ instructions = base64.b64encode(f.read()).decode(" utf-8" )
556+
557+ task = YandexSmartCaptchaImageTask(
558+ image = image,
559+ imgInstructions = instructions,
560+ )
561+ result = CaptchaClient(" your_api_key" ).solve(task)
562+ print (result[" coordinates" ])
563+ ```
564+
535565### Coordinates (click captcha)
536566
537567<sup >[ API method description.] ( https://captcha-solver.com/en/docs/captcha-types#coordinates ) </sup >
538568
539- Use this method to identify points that a worker should click in an image. It
540- supports generic click captchas and the image version of Yandex SmartCaptcha.
569+ Use this method to identify points that a worker should click in a generic image.
541570
542- ` CoordinatesTask ` . Used both for generic "click on X" captchas and for Yandex
543- SmartCaptcha's image challenge. No proxy variant -- the image is submitted directly.
571+ ` CoordinatesTask ` . No proxy variant -- the image is submitted directly.
544572
545573| Parameter | Required | Description |
546574| ---| ---| ---|
@@ -718,7 +746,8 @@ Avoid importing it by name: it shadows Python's built-in `TimeoutError`.
718746See the dedicated [ examples documentation] ( https://github.com/captcha-solver-api/python-sdk/blob/main/examples/README.md ) for the full
719747sync/async example list, setup steps, expected results, and placeholder guidance.
720748
721- - ** Image/click captchas** (` image_to_text.py ` , ` coordinates.py ` ) run after installing the dependencies and setting a valid
749+ - ** Image/click captchas** (` image_to_text.py ` , ` coordinates.py ` ,
750+ ` yandex_smartcaptcha_image.py ` ) run after installing the dependencies and setting a valid
722751 ` CAPTCHA_API_KEY ` -- they read sample images bundled in
723752 [ examples/assets] ( https://github.com/captcha-solver-api/python-sdk/tree/main/examples/assets ) , no target page needed.
724753 ` python-dotenv ` is optional: install it only if you want the scripts to load a ` .env ` file.
@@ -743,6 +772,7 @@ export CAPTCHA_API_KEY=your_api_key
743772python examples/sync/balance.py
744773python examples/sync/image_to_text.py
745774python examples/sync/coordinates.py
775+ python examples/sync/yandex_smartcaptcha_image.py
746776```
747777
748778Live checks with real parameters have exercised all supported task types.
0 commit comments