Rotate Image Captcha Solving
Universal solution for rotation-based captcha challenges across any platform. Automatically detects and solves image rotation puzzles with high accuracy and speed.
Rotate Image captcha is a universal captcha type for rotation-based challenges found on various websites and applications. Users are presented with rotated images and must adjust them to the correct orientation. Our API uses advanced computer vision to analyze the images and determine the precise rotation angle needed, returning solutions in degrees (0°, 90°, 180°, 270°).
Captcha Type
Use the following captcha type identifier in your API requests:
"type": "ROTATE_IMAGE"
Request Format
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
captcha.type |
string | required | Must be "ROTATE_IMAGE" |
captcha.metadata.siteUrl |
string | required | Website URL where captcha appears |
captcha.payload.images |
array | required | Array of base64-encoded images to rotate |
captcha.payload.question |
string | optional | The question text (e.g., "Rotate to correct position") |
captcha.payload.referenceImages |
array | optional | Reference images for comparison |
Basic Example
const response = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: { token: 'YOUR_API_KEY' },
context: { source: 'api', version: '1.0.0' },
captcha: {
type: 'ROTATE_IMAGE',
metadata: {
siteUrl: 'https://example.com'
},
payload: {
images: ['rotated_image_base64'],
question: 'Rotate the object to the correct position'
}
}
})
});
Response Format
Create Task Response
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha is being processed",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Processing)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha is being processed",
"task": {
"id": "MyDisctSolver_abc123",
"status": "processing"
}
}
Fetch Result Response (Completed)
{
"success": true,
"service": "MyDisct Solver",
"message": "Captcha solved successfully",
"task": {
"id": "MyDisctSolver_abc123",
"status": "completed",
"result": {
"answers": [90],
"timestamp": "2025-11-07T12:34:56.789Z"
}
}
}
The answers field contains the rotation angle in degrees (0, 90, 180, 270).
Apply this rotation to the original image to solve the captcha.
Implementation Guide
Step 1: Extract Captcha Image
First, extract the rotated image from the captcha challenge:
// Extract rotate captcha image
function extractRotateCaptcha() {
const captchaContainer = document.querySelector('.rotate-captcha') ||
document.querySelector('[data-captcha-type="rotate"]') ||
document.querySelector('.captcha-container');
if (!captchaContainer) return null;
const imageElement = captchaContainer.querySelector('img') ||
captchaContainer.querySelector('canvas');
if (!imageElement) return null;
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.width = imageElement.naturalWidth || imageElement.width;
canvas.height = imageElement.naturalHeight || imageElement.height;
if (imageElement.tagName === 'IMG') {
ctx.drawImage(imageElement, 0, 0);
} else {
ctx.drawImage(imageElement, 0, 0);
}
const base64 = canvas.toDataURL('image/jpeg').split(',')[1];
const questionElement = captchaContainer.querySelector('.captcha-question');
const question = questionElement ? questionElement.textContent : 'Rotate to correct position';
return { image: base64, question };
}
const captchaData = extractRotateCaptcha();
Step 2: Send to API and Poll for Result
async function solveRotateCaptcha(image, question, siteUrl) {
const createResponse = await fetch('https://solver-api.mydisct.com/createTask', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({
auth: { token: 'YOUR_API_KEY' },
context: { source: 'api', version: '1.0.0' },
captcha: {
type: 'ROTATE_IMAGE',
metadata: { siteUrl },
payload: { images: [image], question }
}
})
});
const createData = await createResponse.json();
if (!createData.success) {
throw new Error(createData.error.message);
}
const taskId = createData.task.id;
while (true) {
await new Promise(resolve => setTimeout(resolve, 3000)); // Wait 3 seconds
const resultResponse = await fetch('https://solver-api.mydisct.com/fetchResult', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'apikey': 'YOUR_API_KEY'
},
body: JSON.stringify({ taskId })
});
const resultData = await resultResponse.json();
if (resultData.task.status === 'completed') {
return resultData.task.result.answers[0]; // Return rotation angle
} else if (resultData.task.status === 'failed') {
throw new Error('Captcha solving failed');
}
}
}
const { image, question } = extractRotateCaptcha();
const rotationAngle = await solveRotateCaptcha(image, question, window.location.href);
console.log('Rotation angle:', rotationAngle); // e.g., 90
Step 3: Apply Rotation Solution
function applyRotationSolution(rotationAngle) {
const captchaContainer = document.querySelector('.rotate-captcha') ||
document.querySelector('[data-captcha-type="rotate"]');
const rotationInput = captchaContainer.querySelector('input[type="range"]') ||
captchaContainer.querySelector('.rotation-slider') ||
captchaContainer.querySelector('input[name="rotation"]');
if (rotationInput) {
rotationInput.value = rotationAngle;
rotationInput.dispatchEvent(new Event('input', { bubbles: true }));
rotationInput.dispatchEvent(new Event('change', { bubbles: true }));
}
const rotateButton = captchaContainer.querySelector('.rotate-button') ||
captchaContainer.querySelector('[data-action="rotate"]');
if (rotateButton) {
const clicks = rotationAngle / 90; // Assuming 90° per click
for (let i = 0; i < clicks; i++) {
rotateButton.click();
await new Promise(resolve => setTimeout(resolve, 100));
}
}
const imageElement = captchaContainer.querySelector('img') ||
captchaContainer.querySelector('.captcha-image');
if (imageElement) {
imageElement.style.transform = `rotate(${rotationAngle}deg)`;
}
setTimeout(() => {
const submitButton = captchaContainer.querySelector('button[type="submit"]') ||
captchaContainer.querySelector('.captcha-submit') ||
captchaContainer.querySelector('[data-action="submit"]');
if (submitButton) {
submitButton.click();
}
}, 1000);
}
applyRotationSolution(rotationAngle);
Python Example
import requests
import time
import base64
def solve_rotate_captcha(image_base64, question, site_url, api_key):
"""
Solve a rotation captcha using MyDisct Solver API
Args:
image_base64: Base64 encoded image string
question: Captcha question text
site_url: Website URL
api_key: Your API key
Returns:
int: Rotation angle in degrees (0, 90, 180, 270)
"""
# Step 1: Create task
create_response = requests.post(
'https://solver-api.mydisct.com/createTask',
headers={'Content-Type': 'application/json', 'apikey': api_key},
json={
'auth': {'token': api_key},
'context': {'source': 'api', 'version': '1.0.0'},
'captcha': {
'type': 'ROTATE_IMAGE',
'metadata': {'siteUrl': site_url},
'payload': {
'images': [image_base64],
'question': question
}
}
}
)
create_data = create_response.json()
if not create_data['success']:
raise Exception(create_data['error']['message'])
task_id = create_data['task']['id']
# Step 2: Poll for result
while True:
time.sleep(3)
result_response = requests.post(
'https://solver-api.mydisct.com/fetchResult',
headers={'Content-Type': 'application/json', 'apikey': api_key},
json={'taskId': task_id}
)
result_data = result_response.json()
if result_data['task']['status'] == 'completed':
return result_data['task']['result']['answers'][0]
elif result_data['task']['status'] == 'failed':
raise Exception('Captcha solving failed')
# Example usage
with open('rotated_image.jpg', 'rb') as f:
image_data = base64.b64encode(f.read()).decode('utf-8')
rotation_angle = solve_rotate_captcha(
image_base64=image_data,
question='Rotate the object to the correct position',
site_url='https://example.com',
api_key='YOUR_API_KEY'
)
print(f'Rotation angle: {rotation_angle} degrees')
Pricing
| Service | Price per Solve | Average Solve Time |
|---|---|---|
| Rotate Image Captcha | $0.0025 | 3-8 seconds |
You are only charged when a captcha is successfully solved. Failed attempts are not charged. Bulk discounts are available for high-volume users.