import base64
with open("captcha.png", "rb") as f:
image_b64 = base64.b64encode(f.read()).decode()
data = {
"key": "YOUR_API_KEY",
"method": "base64",
"body": image_b64,
"json": 1,
}
BLS CAPTCHA
Parameter
Required
Example
key
Yes
Your API key
method
Yes
bls
sitekey
Yes
BLS sitekey
pageurl
Yes
Full URL
Pre-Submit Validation
REQUIRED_PARAMS = {
"userrecaptcha": ["key", "method", "googlekey", "pageurl"],
"turnstile": ["key", "method", "sitekey", "pageurl"],
"geetest": ["key", "method", "gt", "challenge", "pageurl"],
"base64": ["key", "method", "body"],
"bls": ["key", "method", "sitekey", "pageurl"],
}
def validate_params(data):
"""Validate required parameters before submission."""
method = data.get("method")
if not method:
raise ValueError("Missing 'method' parameter")
required = REQUIRED_PARAMS.get(method)
if not required:
raise ValueError(f"Unknown method: {method}")
missing = [p for p in required if not data.get(p)]
if missing:
raise ValueError(f"Missing required parameters: {', '.join(missing)}")
# Format validation
if "pageurl" in data:
if not data["pageurl"].startswith(("http://", "https://")):
raise ValueError("pageurl must start with http:// or https://")
if "googlekey" in data:
if len(data["googlekey"]) < 20:
raise ValueError("googlekey appears too short")
return True
# Use before every submission
data = {
"key": "YOUR_API_KEY",
"method": "userrecaptcha",
"googlekey": "SITEKEY",
"pageurl": "https://example.com",
"json": 1,
}
validate_params(data)
Common Mistakes
Mistake
Error Result
Fix
method missing
BAD_PARAMETERS
Add method field
pageurl without https://
BAD_PARAMETERS or PAGEURL error
Include full URL
body empty for image CAPTCHA
BAD_PARAMETERS
Encode image to base64
Wrong method for CAPTCHA type
BAD_PARAMETERS
Check correct method name
Turnstile using googlekey
BAD_PARAMETERS
Use sitekey for Turnstile
GeeTest missing challenge
BAD_PARAMETERS
Extract fresh challenge token
Troubleshooting
Issue
Cause
Fix
"method" is correct but still errors
Typo in parameter name
Check exact spelling (case-sensitive)
Works for v2, fails for v3
Missing version=v3
Add version parameter
Image CAPTCHA fails
Bad base64 encoding
Verify with base64.b64decode(body)
GeeTest always fails
Challenge token expired
Get fresh challenge before submit
FAQ
Which parameters are case-sensitive?
Parameter names are case-sensitive. Use lowercase: method, googlekey, pageurl. The method value is also case-sensitive: use userrecaptcha, not UserRecaptcha.
Can I send extra parameters?
Yes. Unknown parameters are ignored. This won't cause BAD_PARAMETERS — only missing required ones will.
How do I know which method to use?
Check the CAPTCHA type on the target page. reCAPTCHA → userrecaptcha, Turnstile → turnstile, GeeTest → geetest, Image → base64 or post.
Deploy and manage Captcha AI workers with Ansible — playbooks for provisioning, configuration, rolling updates, and health checks across your server fleet.
Complete decision tree for every Captcha AI API error. Learn which errors are retryable, which need parameter...
AutomationPythonAll CAPTCHA Types
Mar 17, 2026
Tutorials
How to use Fiddler Everywhere and Fiddler Classic to capture, inspect, and debug Captcha AI API requests and responses — filters, breakpoints, and replay for tr...
Handle CAPTCHAs in mobile app automation using Appium and Captcha AI — extract Web View sitekeys, solve, and i...
AutomationPythonAll CAPTCHA Types
Feb 13, 2026
Tutorials
Process CAPTCHA solutions the moment they arrive instead of waiting for tasks to complete — use async generators, event emitters, and callback patterns for stre...
Process CAPTCHA solutions the moment they arrive instead of waiting for all tasks to complete — use async gene...
AutomationPythonAll CAPTCHA Types
Apr 07, 2026
Reference
A reference for building and using a Captcha AI command-line tool — solve CAPTCHAs, check balance, test parameters, and integrate with shell scripts and CI/CD p...
Monitor Captcha AI performance with Datadog — custom metrics, dashboards, anomaly detection alerts, and solve...
AutomationPythonAll CAPTCHA Types
Feb 19, 2026
Troubleshooting
Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with causes, fixes, and Captcha AI-specific troubleshooting.
Fix Cloudflare Turnstile tokens that come back invalid after solving with Captcha AI. Covers token expiry, sit...
PythonCloudflare TurnstileWeb Scraping
Apr 08, 2026
Troubleshooting
Diagnose the most common Gee Test v 3 errors — stale challenge, bad parameters, validation failures — and fix them with practical troubleshooting steps.
Discussions (0)
Join the conversation
Sign in to share your opinion.
Sign InNo comments yet.