Was this helpful?
How to bypass rotate captcha

Introduction
Hey there, developer. This guide is for you if you are automating interactions with websites protected by Rotate CAPTCHA. We will walk through how to integrate solving these challenges via the 2Captcha API, which parameters really matter for success, and how to handle common scenarios.
What you will get:
- A clear understanding of how Rotate CAPTCHA works and what sets it apart from other types
- A step by step algorithm for sending a task and getting a response
- Ready to use code structure with placeholders for your business logic
- Tips on debugging, error handling, and using the reporting system
What you will need:
- Python 3.8 or newer
- Libraries:
requests,aiohttp(for async examples) - An API key from 2Captcha
- The CAPTCHA image in Base64 format
1. Rotate CAPTCHA Basics
1.1. How it works
Rotate CAPTCHA asks the user to turn an image, often an object or icon, into the correct orientation. Unlike text or slider CAPTCHAs, this one requires figuring out the rotation angle, usually in fixed steps like 45° or 60°.
1.2. Task parameters
| Parameter | Required | Description |
|---|---|---|
type |
Yes | Always RotateTask |
body |
Yes | CAPTCHA image in Base64 |
angle |
No | Rotation step in degrees, for example 60 for 6 positions |
comment |
No | A hint for the solver to clarify the task |
1.3. Limits and important notes
- Max image size: 600 KB
- Typical solve time: 5 to 15 seconds, but it can take longer under heavy load
- Accuracy depends on image quality and how clear your
commentinstruction is
2. Setting up your environment
2.1. Install dependencies
bash
pip3 install requests
pip3 install aiohttp # for async examples
2.2. Get your API key
- Sign up on 2Captcha
- Go to your account settings
- Copy your API key
Store your key in an environment variable for safety:
bash
export APIKEY="your_key_here"
2.3. Prepare the image
Convert the CAPTCHA image to Base64:
bash
base64 image.jpg > image_base64.txt
Make sure the resulting string has no line breaks and stays under the 600 KB limit.
3. Analyzing the page and extracting the CAPTCHA
3.1. Spotting the CAPTCHA on the page
Rotate CAPTCHA usually shows up as an interactive widget with an image and rotation controls.
3.2. Extracting the image
Depending on how the site is built, the image might be:
- Embedded as
<img src="data:image/jpeg;base64,..."> - Loaded via a separate HTTP request
- Generated dynamically through Canvas
Use your browser dev tools, the Network tab, to find the request that returns the CAPTCHA image.
3.3. Figuring out the rotation step
Watch how the widget behaves:
- How many rotation positions are available?
- Does the step change dynamically?
If the CAPTCHA has 6 positions, the step is 60° (360 divided by 6). Pass this in the angle parameter to improve accuracy.
4. Implementation: sending a task and getting a response
4.1. Request structure
Send the task via a POST request to the createTask endpoint:
https://api.2captcha.com/createTask
Request body:
json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "RotateTask",
"body": "BASE64_ENCODED_IMAGE",
"angle": 60,
"comment": "Rotate the image to vertical position"
},
"languagePool": "en"
}
4.2. Working Python example using the SDK
Instead of building requests manually, it is easier to use the official SDK. It handles task submission, status polling, and response parsing for you.
Here is how to solve a Rotate CAPTCHA asynchronously:
python
import asyncio
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
from twocaptcha import AsyncTwoCaptcha
# Store your API key in an environment variable
# Linux/macOS: export APIKEY_2CAPTCHA=your_key
# Windows: set APIKEY_2CAPTCHA=your_key
api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
# Initialize the solver with timeout and polling interval
solver = AsyncTwoCaptcha(api_key, defaultTimeout=100, pollingInterval=10)
async def solve_captcha():
try:
return await solver.rotate(
'../images/rotate.jpg',
angle=40,
lang='en',
# hintImg = '../images/rotate_hint.jpg'
hintText='Put the images in the correct way up')
except Exception as e:
sys.exit(e)
if __name__ == '__main__':
result = asyncio.run(solve_captcha())
sys.exit('result: ' + str(result))
What this code does:
- Pulls the API key from an environment variable so it is not hardcoded
- Creates an async solver instance with timeout settings
- Sends the CAPTCHA image with a hint and rotation step
- Waits for the result and prints it to the console
How to run it:
- Install the library:
pip3 install 2captcha-python - Set your API key:
export APIKEY_2CAPTCHA=your_key - Place a test image at
../images/rotate.jpg - Run the script:
python3 rotate_example.py
Tip: Start with a hintText in the solver's native language. A phrase like "Rotate the image so it stands upright" can boost accuracy.
If you prefer synchronous code, use the TwoCaptcha class without async/await. The logic is the same, just with blocking calls.
A full commented example is available in the repo:
async_rotate_options.py on GitHub
5. Key points explained
5.1. Why the angle parameter matters
Specifying the rotation step helps the solver grasp the CAPTCHA logic faster and lowers the chance of mistakes. If you do not know the step, you can leave this parameter out.
5.2. Handling delays
A status: "processing" response means your task is in the queue. Recommended approach:
- Poll every 3 to 5 seconds
- Set a max timeout, for example 60 seconds
- Log wait times for later analysis
5.3. Validating the response
Before using the solution, check:
errorIdequals 0- Status is
ready - The
solution.rotatefield contains a number
5.4. Using the result
The response gives you the angle to rotate the image. The standard way to apply it is through a browser automation tool like Selenium, Playwright, or Puppeteer.
6. Alternative approaches
6.1. Sync vs async requests
For simple scripts, synchronous requests works fine. For high load systems, consider aiohttp with async polling.
6.2. Using the SDK
The official Python client makes integration smoother:
bash
pip3 install 2captcha-python
Docs: 2captcha-python on GitHub
6.3. Solving multiple CAPTCHAs in a row
When solving in bulk, add:
- Delays between requests
- Retry logic for
ERROR_CAPTCHA_UNSOLVABLE
7. Common errors and fixes
| Error | Likely cause | Fix |
|---|---|---|
ERROR_WRONG_USER_KEY |
Invalid API key | Double check your key in the 2Captcha dashboard |
ERROR_ZERO_BALANCE |
Not enough funds | Top up your account balance |
ERROR_CAPTCHA_UNSOLVABLE |
Image is blurry or task is ambiguous | Improve image quality, add a clearer comment |
ERROR_ZERO_CAPTCHA_FILESIZE |
Image file is under 100 bytes | Try extracting the image file again |
ERROR_NO_SLOT_AVAILABLE |
Your bid is too low for this CAPTCHA type, or your queue is too long and we are temporarily limiting intake | Raise your bid in settings and add a 5 to 10 second delay between requests |
7.1. Reporting system
If a solution turns out wrong, you can submit a report via the 2Captcha API:
-
Incorrect answer:
https://api.2captcha.com/reportIncorrect
Parameters:key,taskId
If the error is confirmed, funds are refunded per the refund policy. -
Correct answer:
https://api.2captcha.com/reportCorrect
Parameters:key,taskId
This helps improve solver performance over time.
Note: Only send reports after you have verified the solution in the context of your task.
8. Extra resources
- Rotate documentation: documentation
- Reporting system:
- Test sandbox: enable mode
- Code examples: our GitHub
- Support: create a ticket
9. Pre launch checklist
- CAPTCHA image is Base64 encoded and under 600 KB
-
angleparameter is set if the rotation step is known -
commentincludes a clear, simple instruction for the worker - Response is validated before use (
errorId,status,solution.rotate) - Browser integration (Selenium or Puppeteer) is tested manually
- Logging is set up for debugging and error analysis
- 2Captcha reporting system is connected if needed
Wrapping up
Rotate CAPTCHA needs careful image handling and a solid grasp of the rotation logic. Integrating with 2Captcha lets you automate these tasks, but success really comes down to how well you prepare your data and handle the response.
Start with tests in headless=False mode so you can watch the process visually. Add clear comments to your tasks and lean on the reporting system to keep improving your results. You have got this.