Skip to main content

Solve reCAPTCHA v2 using CaptchaAI's NEW Grid Image Solver

Learn how to solve reCAPTCHA v2 instantly using CaptchaAI’s Grid Image Method, high-accuracy, unlimited, and high-speed.

Irina Dobreva avatar
Written by Irina Dobreva
Updated this week

Our team continuously improves CAPTCHA-solving accuracy and speed. CAPTCHA AI provides a powerful automatic reCAPTCHA bypass service designed for developers and automation engineers.

We're excited to introduce our NEW Grid Image for solving reCAPTCHA image challenges via our API. This guide walks you through solving a 3x3 reCAPTCHA grid (e.g., "crosswalks") using our CAPTCHA AI Solver.


What is reCAPTCHA v2?

reCAPTCHA v2, developed by Google, protects websites by distinguishing humans from bots. It often presents users with a 3x3 or 4x4 image grid and asks them to select all images containing a specific object (e.g., crosswalks, stairs, traffic lights). Successfully solving it proves you're human and grants access.


Why Use the Grid Image?

Our Grid Image combines advanced computer vision with targeted AI models trained specifically on reCAPTCHA patterns. With the new img_type=recaptcha parameter, the solver routes your request to the optimal recognition pipeline, boosting accuracy and speed.


How to Solve reCAPTCHA Using the Grid Image?

The full automation flow includes:

  1. Triggering the reCAPTCHA challenge (e.g., by clicking "I'm not a robot" checkbox)

  2. Capturing the challenge image and instruction text

  3. Sending the data to CAPTCHA AI Solver

  4. Retrieve Retrieve the Solution

  5. Applying the solution by clicking the correct tiles

  6. Repeat from step 2 if the reCAPTCHA shows a new image

This tutorial focuses on steps 2, 3 and 4, using a 3x3 "crosswalks" challenge as an example.


Step 2: Capture the reCAPTCHA Challenge

When the image grid appears, you’ll need two things:

  • Instruction text (e.g., "Select all images with crosswalks")

  • The full composite image (3x3 or 4x4)

Image Template: reCAPTCHA 3x3 Challenge (Crosswalks)

Note: reCAPTCHA dynamically loads tiles. For 3x3 grids, the full image must be reconstructed from 9 individual img.rc-image-tile-11 elements.

Extract the instruction text

const strong = document.querySelector('.rc-imageselect-desc strong');
const instructions = strong
? strong.innerText.trim()
: '';
console.log(instructions);

// Example output: "crosswalks"


Reconstruct the full 3x3 image using Canvas (Works with 4x4)

Use this function to extract the 3x3 or 4x4 image as base64 PNG image

async function getRecaptchaImageBase64() {
// Detect 4x4
let img = document.querySelector('.rc-imageselect-table-44 img.rc-image-tile-44');

// Detect 3x3
if (!img) {
img = document.querySelector('.rc-imageselect-table-33 img.rc-image-tile-33');
}

if (!img) {
throw new Error("No reCAPTCHA images found.");
}

// Wait for image to load (in case not loaded yet)
await new Promise((resolve, reject) => {
if (img.complete) return resolve();
img.onload = resolve;
img.onerror = reject;
});

// Create a canvas with the natural size
const canvas = document.createElement('canvas');
canvas.width = img.naturalWidth;
canvas.height = img.naturalHeight;

const ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0);

// Convert to Base64 PNG
const base64 = canvas.toDataURL("image/png").replace(/^data:image\/png;base64,/, "");

return base64;
}


Output: A single base64-encoded string of the full 3x3 grid.


Step 3: Send the Challenge to CAPTCHA AI Solver

Use our simple HTTP API to submit the image and instructions.

API Endpoint

POST https://ocr.captchaai.com/in.php

Request Parameters

Parameter

Required

Description

key

Yes

Your API key from captchaai.com

method

Yes

Must be base64 as we are sending Base64 encoded image

body

Yes

The Base64 encoded image

img_type

Yes

Set to recaptcha as we are solving reCAPTCHA image

instructions

Yes

The object to select (e.g., crosswalks)

grid_size

Yes

3x3 or 4x4

json

Yes

Set to 1 for JSON response

💻 Example: Submit a "crosswalks" 3x3 Challenge as Base64

curl -X POST "https://ocr.captchaai.com/in.php" \
-F "key=YOUR_API_KEY" \
-F "method=base64" \
-F "body=YOUR_BASE64_IMAGE" \
-F "img_type=recaptcha" \
-F "instructions=crosswalks" \
-F "grid_size=3x3" \
-F "json=1" \

Save the Task ID from the response (e.g., {"status":1,"request":"0123456789"}).


Step 4: Retrieve the Solution

Poll the result endpoint until solved:

curl -X POST "https://ocr.captchaai.com/res.php" \
-F "key=YOUR_API_KEY" \
-F "action=get" \
-F "id=0123456789" \
-F "json=1"

Successful Response

{
"status": 1,
"request": "[1, 3, 6, 9]"
}

The numbers indicate 1-based tile positions (left-to-right, top-to-bottom):

[1] [2] [3]
[4] [5] [6]
[7] [8] [9]

So "[1, 3, 6, 9]" means: click top-left, top-right, center-right, and bottom-right tiles.


Step 5: Apply the Solution in Browser Automation

Use your automation framework (e.g., Puppeteer, Selenium, Playwright) to click the correct tiles.

Example in JavaScript (Puppeteer)

const solutionStr = "[1, 3, 6, 9]"; // from API
const solution = JSON.parse(solutionStr); // load as JSON list
const indices = solution.map(n => n - 1); // convert to 0-based

const tiles = await page.$$('td.rc-imageselect-tile');
for (const i of indices) {
if (tiles[i]) {
await tiles[i].click();
} else {
console.warn(`Index ${i + 1} is out of range, skipping.`);
}
}

Image Template: Clicked Tiles (Solution Applied)

After clicking, press the "Verify" button to submit.


Notes on 4x4 Grids

For 4x4 challenges (e.g., "stairs", "boats"), the process is identical—just set grid_size=4x4 and reconstruct a 4×4 image. The solver returns positions from 1 to 16.

Example 4x4 layout:

[1]  [2]  [3]  [4]
[5] [6] [7] [8]
[9] [10] [11] [12]
[13] [14] [15] [16]

Conclusion

With CAPTCHA AI Solver’s Grid Image, bypassing reCAPTCHA image challenges is faster and more reliable than ever. By specifying img_type=recaptcha and providing clear instructions, you ensure the AI uses the right detection model—maximizing success on the first try.

Did this answer your question?