Troubleshooting

Grid Image Coordinate Errors: Diagnosis and Fix

Grid image CAPTCHAs (reCAPTCHA v2 image challenges) return cell indices as the solution. When the returned cells are wrong — clicking the wrong tiles or getting ERROR_CAPTCHA_UNSOLVABLE — the issue is usually in how you submit the image, the grid size parameter, or the instruction text.


How grid image solving works

CaptchaAI receives your grid image, analyzes each cell, and returns an array of indices matching the instruction. Cells are numbered left-to-right, top-to-bottom:

3×3 Grid:          4×4 Grid:
1 2 3              1  2  3  4
4 5 6              5  6  7  8
7 8 9              9  10 11 12
                   13 14 15 16

The response looks like: [1, 3, 6, 9] — meaning cells 1, 3, 6, and 9 contain the target objects.


Common errors and fixes

Wrong grid size

The most common coordinate error. If the CAPTCHA is a 4×4 grid but you send grid_size=3x3, cell numbering is wrong and the wrong tiles get selected.

# WRONG — 4×4 grid sent as 3×3
data = {
    "key": "YOUR_API_KEY",
    "method": "post",
    "grid_size": "3x3",      # Wrong!
    "img_type": "recaptcha",
    "instructions": "traffic lights",
    "json": 1
}

# CORRECT — match the actual grid
data = {
    "key": "YOUR_API_KEY",
    "method": "post",
    "grid_size": "4x4",      # Correct
    "img_type": "recaptcha",
    "instructions": "traffic lights",
    "json": 1
}

How to detect grid size programmatically:

from PIL import Image

img = Image.open("grid_captcha.png")
width, height = img.size

# reCAPTCHA grids are square. 3×3 tiles are ~100px each, 4×4 tiles are ~75px each
tile_width = width // 3
if width % 4 == 0 and (width // 4) < 100:
    grid_size = "4x4"
else:
    grid_size = "3x3"

print(f"Detected grid size: {grid_size}")

Cropped or modified image

Sending a cropped, resized, or screenshot-wrapped image changes the grid alignment. CaptchaAI needs the original CAPTCHA image exactly as rendered.

Fix: Capture the image directly from the reCAPTCHA iframe, not a full-page screenshot.

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("https://example.com")

# Switch to reCAPTCHA iframe
iframe = driver.find_element(By.CSS_SELECTOR, 'iframe[title*="recaptcha"]')
driver.switch_to.frame(iframe)

# Get the grid image element
grid_img = driver.find_element(By.CSS_SELECTOR, "img.rc-image-tile-wrapper img")
grid_img.screenshot("grid_captcha.png")  # Captures just the grid, not the whole page

Wrong or vague instructions

The instruction text must match what the CAPTCHA asks. Vague instructions lead to wrong cell selections.

# WRONG — too vague
data["instructions"] = "select images"

# CORRECT — specific instruction from the CAPTCHA
data["instructions"] = "crosswalks"

Common instruction values: crosswalks, traffic lights, cars, buses, motorcycles, bicycles, fire hydrants, stairs, bridges, parking meters.


Cell index offset (0-based vs 1-based)

CaptchaAI returns 1-based cell indices. If your automation code uses 0-based indexing, you need to subtract 1.

import json

# CaptchaAI returns 1-based indices
solution = json.loads(result["request"])  # e.g., [1, 3, 6, 9]

# Convert to 0-based for Selenium click automation
zero_based = [cell - 1 for cell in solution]

# Click grid cells using 0-based index
tiles = driver.find_elements(By.CSS_SELECTOR, ".rc-image-tile-wrapper img")
for idx in zero_based:
    tiles[idx].click()

Image format issues

CaptchaAI supports JPG, JPEG, PNG, and GIF. Other formats return ERROR_WRONG_FILE_EXTENSION.

# WRONG — WebP or BMP
files = {"file": open("grid.webp", "rb")}  # Not supported

# CORRECT — convert to PNG first
from PIL import Image
img = Image.open("grid.webp")
img.save("grid.png", "PNG")
files = {"file": open("grid.png", "rb")}

Decision tree

Grid cells are wrong
    ↓
Is grid_size correct (3x3 or 4x4)? → No → Fix grid_size parameter
    ↓ Yes
Is the image the original CAPTCHA (not cropped)? → No → Capture directly from iframe
    ↓ Yes
Is instruction text specific? → No → Use exact CAPTCHA instruction text
    ↓ Yes
Using 1-based indexing for clicks? → No → Convert solution to 0-based
    ↓ Yes
Image in supported format (JPG/PNG)? → No → Convert image format
    ↓ Yes
Report tiles to CaptchaAI via reportbad

Reporting incorrect solutions

If coordinates are consistently wrong despite correct parameters, report the solution:

requests.get("https://ocr.captchaai.com/res.php", params={
    "key": "YOUR_API_KEY",
    "action": "reportbad",
    "id": task_id,
    "json": 1
})

This helps CaptchaAI improve accuracy and may refund the solve cost.


FAQ

What grid sizes does CaptchaAI support?

3×3 and 4×4 grids. These are the standard reCAPTCHA image challenge formats.

Why do I get ERROR_CAPTCHA_UNSOLVABLE for grid images?

The image quality is too low, the instruction text is wrong, or the image is not a recognizable grid CAPTCHA. Verify you are sending the original, uncropped image with the correct instruction.

My cells are offset by one. What is wrong?

CaptchaAI returns 1-based indices. If your code expects 0-based, subtract 1 from each index.


Solve grid image CAPTCHAs with CaptchaAI

Get accurate grid image solutions at captchaai.com.


Discussions (0)

No comments yet.

Related Posts

API Tutorials Solve Grid Image CAPTCHA with Python and CaptchaAI
Step-by-step Python tutorial for solving grid image CAPTCHAs ( re CAPTCHA image challenges) using the Captcha AI API.

Step-by-step Python tutorial for solving grid image CAPTCHAs ( re CAPTCHA image challenges) using the Captcha...

Automation Python Image OCR
Feb 24, 2026
Tutorials Image CAPTCHA Confidence Scores: Using CaptchaAI Quality Metrics
how to use Captcha AI's confidence indicators for image CAPTCHA solutions — assess answer quality, implement confidence-based retry logic, and optimize solve ra...

Learn how to use Captcha AI's confidence indicators for image CAPTCHA solutions — assess answer quality, imple...

Automation Python Image OCR
Mar 30, 2026
API Tutorials Solve Image CAPTCHA with Python OCR and CaptchaAI
Solve distorted text image CAPTCHAs using Captcha AI's OCR API from Python.

Solve distorted text image CAPTCHAs using Captcha AI's OCR API from Python. Covers file upload, base 64 submis...

Automation Python Image OCR
Use Cases Government Portal Automation with CAPTCHA Solving
Automate government portal interactions (visa applications, permit filings, records requests) with Captcha AI handling CAPTCHA challenges.

Automate government portal interactions (visa applications, permit filings, records requests) with Captcha AI...

Automation Python reCAPTCHA v2
Jan 30, 2026
API Tutorials Batch Image CAPTCHA Solving: Processing 1000+ Images
Process thousands of image CAPTCHAs efficiently with Captcha AI using async queues, worker pools, and rate-aware batching in Python and Node.js.

Process thousands of image CAPTCHAs efficiently with Captcha AI using async queues, worker pools, and rate-awa...

Automation Python Image OCR
Mar 21, 2026
Tutorials CAPTCHA Solving Fallback Chains
Implement fallback chains for CAPTCHA solving with Captcha AI.

Implement fallback chains for CAPTCHA solving with Captcha AI. Cascade through solver methods, proxy pools, an...

Automation Python reCAPTCHA v2
Apr 06, 2026
API Tutorials CaptchaAI API Latency Optimization: Faster Solves
Reduce CAPTCHA solve latency with Captcha AI by optimizing poll intervals, connection pooling, prefetching, and proxy selection.

Reduce CAPTCHA solve latency with Captcha AI by optimizing poll intervals, connection pooling, prefetching, an...

Automation Python reCAPTCHA v2
Feb 27, 2026
API Tutorials Building a Python Wrapper Library for CaptchaAI API
Build a reusable Python wrapper library for the Captcha AI API with type hints, retry logic, context managers, and support for CAPTCHA types.

Build a reusable Python wrapper library for the Captcha AI API with type hints, retry logic, context managers,...

Automation Python reCAPTCHA v2
Jan 31, 2026
Tutorials Grid Image CAPTCHA: Coordinate Mapping and Cell Selection
Map grid image CAPTCHA cells to coordinates, extract the full grid, and solve re CAPTCHA-style image challenges with Captcha AI.

Map grid image CAPTCHA cells to coordinates, extract the full grid, and solve re CAPTCHA-style image challenge...

Python Web Scraping Image OCR
Jan 20, 2026
Troubleshooting GeeTest v3 Error Codes: Complete Troubleshooting Reference
Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with causes, fixes, and Captcha AI-specific troubleshooting.

Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with cause...

Automation Testing GeeTest v3
Apr 08, 2026
Troubleshooting Turnstile Token Invalid After Solving: Diagnosis and Fixes
Fix Cloudflare Turnstile tokens that come back invalid after solving with Captcha AI.

Fix Cloudflare Turnstile tokens that come back invalid after solving with Captcha AI. Covers token expiry, sit...

Python Cloudflare Turnstile Web Scraping
Apr 08, 2026
Troubleshooting Common GeeTest v3 Errors and Fixes
Diagnose the most common Gee Test v 3 errors — stale challenge, bad parameters, validation failures — and fix them with practical troubleshooting steps.

Diagnose the most common Gee Test v 3 errors — stale challenge, bad parameters, validation failures — and fix...

Automation Testing GeeTest v3
Jan 24, 2026