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)
Join the conversation
Sign in to share your opinion.
Sign InNo comments yet.