Comparisons

Grid Image vs Normal Image CAPTCHA: API Parameter Differences

CaptchaAI handles two distinct image CAPTCHA types: Normal Image (text recognition) and Grid Image (tile selection). They look completely different to users and require different API parameters. Using the wrong method means incorrect results.

Visual Comparison

Normal Image CAPTCHA

A single image containing distorted text that the user must type:

┌─────────────────────┐
│   X k 9 F 2 m       │  → User types: "Xk9F2m"
└─────────────────────┘

Grid Image CAPTCHA

A grid of images where the user must click specific tiles:

┌─────┬─────┬─────┐
│ 🚗  │ 🚌  │ 🏠  │  "Select all images
├─────┼─────┼─────┤   with buses"
│ 🌳  │ 🚌  │ 🚗  │
├─────┼─────┼─────┤   → User clicks tiles 2, 5
│ 🏠  │ 🌳  │ 🚌  │   and 9
└─────┴─────┴─────┘

Parameter Comparison

Parameter Normal Image Grid Image
method base64 or post base64 with recaptcha=1
body / file Image data (base64 or file) Grid image data (base64 or file)
recaptcha Not set 1
instructions Optional text hint Required: what to select
imginstructions Not used Optional: instruction image
rows Not set Grid rows (e.g., 3)
cols Not set Grid columns (e.g., 3)

Normal Image CAPTCHA Request

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

key=YOUR_API_KEY
&method=base64
&body=BASE64_ENCODED_IMAGE
&json=1

Optional parameters:

Parameter Values Purpose
numeric 0 (default), 1 (numbers only), 2 (letters only), 3 (either) Restrict character set
min_len 1–20 Minimum answer length
max_len 1–20 Maximum answer length
phrase 0 or 1 Whether the answer has spaces
regsense 0 or 1 Case-sensitive answer
language 0, 1, 2 Character set language
instructions Text Additional solving instructions

Normal Image Response

{
  "status": 1,
  "request": "Xk9F2m"
}

The response is a plain text string — the characters in the image.

Grid Image CAPTCHA Request

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

key=YOUR_API_KEY
&method=base64
&body=BASE64_ENCODED_GRID_IMAGE
&recaptcha=1
&instructions=Select all images with buses
&rows=3
&cols=3
&json=1

Required parameters:

Parameter Purpose
recaptcha Set to 1 to indicate grid-type image
instructions The task text (e.g., "Select all images with traffic lights")

Optional parameters:

Parameter Purpose
rows Number of grid rows (default: 3)
cols Number of grid columns (default: 3)
imginstructions Base64 image showing what to select (alternative to text instructions)

Grid Image Response

{
  "status": 1,
  "request": "click:2/5/9"
}

The response indicates which tiles to click, numbered left-to-right, top-to-bottom:

┌───┬───┬───┐
│ 1 │ 2 │ 3 │
├───┼───┼───┤
│ 4 │ 5 │ 6 │
├───┼───┼───┤
│ 7 │ 8 │ 9 │
└───┴───┴───┘

Converting Grid Coordinates

Some sites need coordinates instead of tile numbers:

def tile_to_coordinates(tile_numbers, rows=3, cols=3, 
                         grid_width=300, grid_height=300):
    """Convert tile numbers to click coordinates."""
    tile_w = grid_width / cols
    tile_h = grid_height / rows
    coordinates = []

    for tile in tile_numbers:
        row = (tile - 1) // cols
        col = (tile - 1) % cols
        # Click center of tile
        x = int(col * tile_w + tile_w / 2)
        y = int(row * tile_h + tile_h / 2)
        coordinates.append((x, y))

    return coordinates

# Usage
tiles = [2, 5, 9]
coords = tile_to_coordinates(tiles)
# [(150, 50), (150, 150), (250, 250)]

When to Use Each Method

Scenario Method Parameters
Distorted text image Normal (method=base64) body, optional numeric, language
Math expression image Normal (method=base64) body, instructions="solve math"
reCAPTCHA-style image grid Grid (recaptcha=1) body, instructions, rows, cols
"Click all buses" style Grid (recaptcha=1) body, instructions="select buses"
Custom grid (4×4) Grid (recaptcha=1) body, instructions, rows=4, cols=4
Single image "click the object" Grid (recaptcha=1) body, instructions, rows=1, cols=1

Common Mistakes

Mistake Result Fix
Sending grid image without recaptcha=1 CaptchaAI tries OCR, returns gibberish Add recaptcha=1
Sending text image with recaptcha=1 Returns click coordinates instead of text Remove recaptcha=1
Missing instructions for grid CaptchaAI doesn't know what to select Always include instructions
Wrong rows/cols values Tile numbers don't map correctly Count the actual grid size
Using text instructions for non-English grids Instructions may not match Use imginstructions with the instruction image

Response Parsing

Normal Image

# Simple text response
answer = result["request"]  # "Xk9F2m"

Grid Image

# Parse click positions
response = result["request"]  # "click:2/5/9"
tile_str = response.replace("click:", "")
tiles = [int(t) for t in tile_str.split("/")]  # [2, 5, 9]

Troubleshooting

Issue Cause Fix
Grid returns text instead of positions recaptcha=1 not set Add recaptcha=1 to request
OCR returns "click:..." recaptcha=1 set on text CAPTCHA Remove recaptcha=1
Wrong tiles selected Instructions unclear Use more specific instructions or imginstructions
"No matching tiles" response Image doesn't match instructions Verify instructions match the actual challenge
4×4 grid mapped incorrectly Default is 3×3 Set rows=4&cols=4 explicitly

FAQ

Can the same image be both types?

No. An image CAPTCHA is either text recognition (Normal) or tile selection (Grid). They are fundamentally different challenges requiring different solving approaches.

What if I don't know which type I'm dealing with?

Check the page context. Text CAPTCHAs have an input field for typing. Grid CAPTCHAs have clickable tiles and an instruction like "Select all images with..." The HTML structure reveals the type.

Does Grid Image work for custom (non-reCAPTCHA) grids?

Yes. The recaptcha=1 parameter enables grid mode regardless of the CAPTCHA provider. Set the correct rows and cols for the grid you're solving.

Next Steps

Solve both image CAPTCHA types — get your CaptchaAI API key and use the correct parameters for each type.

Discussions (0)

No comments yet.