Skip to content
API
Grid Captcha
Botion

Botion Grid Captcha

Overview

Botion is a grid selection captcha: the page shows a reference sample image and a 3×3 grid of tiles. The solver must return which grid cells match the reference (0-based indices, row-major: left-to-right, top-to-bottom).

🔲

The task.image field encodes two Base64 payloads joined by | — the sample image first, then the grid image.

Botion captcha UI example

1. Create Task

Image Submission Format

Sample image Botion request payload (sample | grid)

Grid image Botion request payload (sample | grid)

Request

POST https://api.achicaptcha.com/createTask

Parameters

Parameter NameData TypeRequired?Description
clientKeystringyesAPI key
task.typestringyesGridCaptcha
task.subTypestringyesbotion
task.imagestringyesBASE64_SAMPLE_IMAGE|BASE64_GRID_IMAGE — sample image first, then |, then the 3×3 grid image (both Base64, no data: prefix)
task.otherstringnotopk|grid_size. Defaults to 3|3 if omitted

Request Example

POST /createTask HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
 
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "GridCaptcha",
    "subType": "botion",
    "image": "BASE64_SAMPLE_IMAGE|BASE64_GRID_IMAGE",
    "other": "3|3"
  }
}

Response

When successful, server returns errorId = 0 and taskId

{
  "errorId": 0,
  "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

2. Get Result

Request

POST https://api.achicaptcha.com/getTaskResult

Parameters

Parameter NameData TypeRequired?Description
clientKeystringyesAPI key
taskIdstringyesTaskId obtained from step (1)

Request Example

POST /getTaskResult HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
 
{
  "clientKey": "YOUR_API_KEY",
  "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Response

{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "click": "0,2,5"
  }
}

solution.click is a comma-separated string of 0-based cell indices (row-major) to click in the 3×3 grid.

Status Explanation

  • errorId = 0 and status = ready: Successfully solved, read cell indices in solution.click
  • errorId = 0 and status = processing: Still solving, wait 2 seconds and poll again
  • errorId > 0: System error, check errorCode and errorDescription

Integration Examples

import requests
import base64
import time
 
def solve_botion(sample_path, grid_path, api_key='YOUR_API_KEY', other='3|3'):
    with open(sample_path, 'rb') as f:
        sample_b64 = base64.b64encode(f.read()).decode()
    with open(grid_path, 'rb') as f:
        grid_b64 = base64.b64encode(f.read()).decode()
 
    # Step 1: Create task
    create_resp = requests.post(
        'https://api.achicaptcha.com/createTask',
        json={
            'clientKey': api_key,
            'task': {
                'type': 'GridCaptcha',
                'subType': 'botion',
                'image': f'{sample_b64}|{grid_b64}',
                'other': other
            }
        }
    )
    result = create_resp.json()
 
    if result['errorId'] != 0:
        raise Exception(result['errorDescription'])
 
    task_id = result['taskId']
 
    # Step 2: Poll for result
    while True:
        time.sleep(2)
        poll_resp = requests.post(
            'https://api.achicaptcha.com/getTaskResult',
            json={'clientKey': api_key, 'taskId': task_id}
        )
        result = poll_resp.json()
 
        if result['errorId'] != 0:
            raise Exception(result['errorDescription'])
 
        if result['status'] == 'ready':
            return result['solution']['click']  # e.g. "0,2,5"
 
# Usage
indices = solve_botion('sample.png', 'grid.png', 'YOUR_API_KEY')
print('Cells to click:', indices)

Common Error Codes

Error CodeDescriptionNotes
0successSuccess
1processingProcessing
2missing required fieldsMissing required fields, check parameters again
3task not supportedTask type not supported
4task creation failedTask creation failed
5client key does not existAPI key does not exist, check API key again
6insufficient account balanceInsufficient account balance, add more credits
7task failed, please create a new taskTask failed, please create a new task
8task ID does not existTask ID does not exist

Best Practices

For best results when using Achicaptcha API for Botion Grid Captcha, follow these principles:

1. Image Order

  • Always send the sample (reference) image first, then |, then the grid image
  • Do not include the data:image/...;base64, prefix — raw Base64 only
  • Ensure both images are fully loaded and encoded before sending

2. task.other Parameter

  • Format is topk|grid_size (e.g. 3|3)
  • Omitting it defaults to 3|3, but always set it explicitly to avoid unexpected behaviour
  • Wrong grid_size will break the 0-based index mapping in solution.click

3. Polling Interval

  • Wait at least 2 seconds between result checks
  • Do not spam the API with consecutive requests
  • Set a timeout to avoid infinite loops (recommended: 60 seconds)

4. Result Processing

  • solution.click is a comma-separated string of 0-based cell indices (row-major, left-to-right, top-to-bottom)
  • Split by , and convert to integers before clicking the corresponding grid cells

5. Retry Logic

  • Implement retry for temporary errors like ERROR_NO_SLOT_AVAILABLE
  • Use exponential backoff when retrying
  • Limit the maximum number of retry attempts

6. API Key Security

  • Do not hardcode your API key in source code
  • Use environment variables or a secrets manager
  • Never expose the API key on the client side

Useful links: