RotateRecognition
Get the rotation angle needed to turn an image upright. Covers the request schema, an example and each provider's price per 1,000.
RotateRecognition sends a rotation puzzle to a worker and returns the angle in solution.rotate that turns the image upright. Use it for CAPTCHAs where you turn an object until it is upright, such as the rotation puzzles in FunCaptcha.
Send the image
imageBase64: the image to rotate, as base64. 2Captcha documents JPEG, PNG or GIF, 600 kB maximum and 1000 px on any side.angle: the size of one rotation step in the widget. Count how many steps turn the image through 360 degrees and divide 360 by that count. SolveCaptcha uses40, the FunCaptcha step, when you leave it out.comment: optional text instruction, for exampleposition the image properly.imgInstructions: optional base64 instruction image, up to 100 kB on 2Captcha.
Read the answer
solution.rotate is the total angle in degrees. Positive values mean clockwise and negative values mean counter-clockwise, as SolveCaptcha documents it. When the provider returns several angles, rotate is the first one and the rest are in solution.raw.
To turn the angle into widget clicks, divide it by the step you sent in angle.
Check Provider stats for live success rates and solve times before you pick a provider.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
2Captcha | $0.50 | |
SolveCaptcha | $0.50 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in a workspace of the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes. View settings reference |
Task Object Properties
The task field accepts an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
imageBase64* | string | Yes | Base64-encoded image that must be rotated to the correct orientation. A data-URI prefix is removed for you. 2Captcha documents JPEG, PNG or GIF up to 600 kB and 1000 px on any side. Example: |
angle | number | No | Degrees of one rotation step in the widget. Count how many steps turn the image through 360 degrees and divide 360 by that count. SolveCaptcha uses 40, the FunCaptcha step, when you omit it. Example: |
comment | string | No | Optional text instruction shown to the worker, for example position the image properly. Example: |
imgInstructions | string | No | Optional base64-encoded instruction image shown together with the main captcha image. 2Captcha limits it to 100 kB. Example: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "RotateRecognition",
"imageBase64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
}Optional fields are not guaranteed across providers
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes |
Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
rotate* | number | Yes | Total rotation angle in degrees. Positive values rotate clockwise and negative values counter-clockwise (SolveCaptcha documents this sign convention). When a provider returns several angles, this is the first one and the rest are in raw. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |