Reference

CaptchaAI API Quick Reference Card

Every endpoint, parameter, and error code in one place.


Base URLs

Purpose URL
Submit task https://ocr.captchaai.com/in.php
Get result https://ocr.captchaai.com/res.php
Check balance https://ocr.captchaai.com/res.php?key=KEY&action=getbalance

Authentication

All requests require key=YOUR_API_KEY as a parameter.


Submit Task — Common Parameters

Parameter Required Description
key Yes Your API key
method Yes CAPTCHA type identifier
pageurl Yes* URL of the page with the CAPTCHA
json No Set 1 for JSON responses
soft_id No Developer application ID
proxy No Proxy in type:host:port:user:pass format
proxytype No HTTP, HTTPS, SOCKS4, SOCKS5

*Not required for image/OCR CAPTCHAs.


Method Reference

reCAPTCHA v2

method=userrecaptcha
googlekey=SITE_KEY
pageurl=PAGE_URL

Optional: invisible=1 for invisible variant.

reCAPTCHA v3

method=userrecaptcha
googlekey=SITE_KEY
pageurl=PAGE_URL
version=v3
action=ACTION_NAME
min_score=0.9

reCAPTCHA Enterprise

method=userrecaptcha
googlekey=SITE_KEY
pageurl=PAGE_URL
enterprise=1

Cloudflare Turnstile

method=turnstile
sitekey=SITE_KEY
pageurl=PAGE_URL

Cloudflare Challenge

method=cloudflare_challenge
sitekey=SITE_KEY
pageurl=PAGE_URL

GeeTest v3

method=geetest
gt=GT_VALUE
challenge=CHALLENGE_VALUE
pageurl=PAGE_URL
api_server=API_SERVER  (optional)

GeeTest v4

method=geetest
gt=CAPTCHA_ID
pageurl=PAGE_URL
version=4

BLS CAPTCHA

method=bls
sitekey=SITE_KEY
pageurl=PAGE_URL
instructions=INSTRUCTIONS  (optional)
code=CODE  (optional)

Image/OCR CAPTCHA (base64)

method=base64
body=BASE64_STRING

Image/OCR CAPTCHA (file upload)

method=post
file=@captcha.png  (multipart)

Image/OCR Optional Parameters

Parameter Values Description
numeric 0=any, 1=digits, 2=letters, 3=either, 4=none Character type
regsense 0=insensitive, 1=case-sensitive Case sensitivity
minLen 1-20 Minimum text length
maxLen 1-20 Maximum text length
phrase 0=single word, 1=phrase (spaces) Multi-word answer
calc 0=text, 1=math expression Math CAPTCHA
language 0=any, 1=Cyrillic, 2=Latin Character set
textinstructions text Solving hint

Submit Response

Success

OK|TASK_ID

JSON (json=1):

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

Error

ERROR_KEY_DOES_NOT_EXIST

JSON:

{"status": 0, "request": "ERROR_KEY_DOES_NOT_EXIST"}

Get Result

GET https://ocr.captchaai.com/res.php?key=KEY&action=get&id=TASK_ID

Processing

CAPCHA_NOT_READY

Success

OK|TOKEN_OR_TEXT

Error

ERROR_CAPTCHA_UNSOLVABLE

Error Codes Reference

Error Code Meaning Action
ERROR_WRONG_USER_KEY Invalid API key format Check key format
ERROR_KEY_DOES_NOT_EXIST API key not found Verify key in dashboard
ERROR_ZERO_BALANCE Insufficient funds Top up account
ERROR_NO_SLOT_AVAILABLE Server busy Retry after 5 seconds
ERROR_CAPTCHA_UNSOLVABLE Cannot solve this CAPTCHA Retry with fresh challenge
ERROR_BAD_DUPLICATES Too many identical failures Check image quality
ERROR_WRONG_CAPTCHA_ID Invalid task ID Submit new task
ERROR_TOO_BIG_CAPTCHA_FILESIZE Image exceeds 100KB Compress or resize
ERROR_IMAGE_TYPE_NOT_SUPPORTED Invalid image format Use PNG, JPG, or GIF
ERROR_PAGEURL Missing or invalid pageurl Provide full URL
ERROR_GOOGLEKEY Missing sitekey Extract sitekey from page

Polling Best Practices

import time
import requests

API_KEY = "YOUR_API_KEY"
BASE = "https://ocr.captchaai.com"

def solve_captcha(submit_params):
    submit_params["key"] = API_KEY
    submit_params["json"] = 1

    resp = requests.post(f"{BASE}/in.php", data=submit_params)
    data = resp.json()

    if data["status"] != 1:
        raise Exception(f"Submit error: {data['request']}")

    task_id = data["request"]

    # Wait before first poll
    time.sleep(10)

    for _ in range(60):
        result = requests.get(
            f"{BASE}/res.php",
            params={"key": API_KEY, "action": "get", "id": task_id, "json": 1}
        ).json()

        if result["request"] == "CAPCHA_NOT_READY":
            time.sleep(5)
            continue

        if result["status"] == 1:
            return result["request"]

        raise Exception(f"Solve error: {result['request']}")

    raise TimeoutError("CAPTCHA solve timed out")

Timing guidelines:

  • Initial wait: 10 seconds (20s for reCAPTCHA v3)
  • Poll interval: 5 seconds
  • Max attempts: 60 (5 minutes total)

Check Balance

balance = requests.get(
    f"{BASE}/res.php",
    params={"key": API_KEY, "action": "getbalance"}
).text
print(f"Balance: ${balance}")

FAQ

What's the maximum image size?

100KB for image/OCR CAPTCHAs. Compress or resize larger images before submitting.

How long do tokens remain valid?

reCAPTCHA: ~120 seconds. Turnstile: ~300 seconds. GeeTest: ~60-120 seconds. Submit tokens immediately after receiving them.

Can I use proxies with all CAPTCHA types?

Proxies are supported for token-based CAPTCHAs (reCAPTCHA, Turnstile, GeeTest). Not applicable for image/OCR.



Solve any CAPTCHA in minutes — get your API key.

Discussions (0)

No comments yet.

Related Posts

DevOps & Scaling Ansible Playbooks for CaptchaAI Worker Deployment
Deploy and manage Captcha AI workers with Ansible — playbooks for provisioning, configuration, rolling updates, and health checks across your server fleet.

Deploy and manage Captcha AI workers with Ansible — playbooks for provisioning, configuration, rolling updates...

Automation Python All CAPTCHA Types
Apr 07, 2026
DevOps & Scaling Blue-Green Deployment for CAPTCHA Solving Infrastructure
Implement blue-green deployments for CAPTCHA solving infrastructure — zero-downtime upgrades, traffic switching, and rollback strategies with Captcha AI.

Implement blue-green deployments for CAPTCHA solving infrastructure — zero-downtime upgrades, traffic switchin...

Automation Python All CAPTCHA Types
Apr 07, 2026
Troubleshooting CaptchaAI API Error Handling: Complete Decision Tree
Complete decision tree for every Captcha AI API error.

Complete decision tree for every Captcha AI API error. Learn which errors are retryable, which need parameter...

Automation Python All CAPTCHA Types
Mar 17, 2026
Tutorials Using Fiddler to Inspect CaptchaAI API Traffic
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...

How to use Fiddler Everywhere and Fiddler Classic to capture, inspect, and debug Captcha AI API requests and r...

Automation Python All CAPTCHA Types
Mar 05, 2026
Tutorials CAPTCHA Handling in Mobile Apps with Appium
Handle CAPTCHAs in mobile app automation using Appium and Captcha AI — extract Web sitekeys, solve, and inject tokens on Android and i OS.

Handle CAPTCHAs in mobile app automation using Appium and Captcha AI — extract Web View sitekeys, solve, and i...

Automation Python All CAPTCHA Types
Feb 13, 2026
Tutorials Streaming Batch Results: Processing CAPTCHA Solutions as They Arrive
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...

Automation Python All CAPTCHA Types
Apr 07, 2026
Reference CaptchaAI CLI Tool: Command-Line CAPTCHA Solving and Testing
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...

A reference for building and using a Captcha AI command-line tool — solve CAPTCHAs, check balance, test parame...

Automation Python All CAPTCHA Types
Feb 26, 2026
DevOps & Scaling Auto-Scaling CAPTCHA Solving Workers
Build auto-scaling CAPTCHA solving workers that adjust capacity based on queue depth, balance, and solve rates.

Build auto-scaling CAPTCHA solving workers that adjust capacity based on queue depth, balance, and solve rates...

Automation Python All CAPTCHA Types
Mar 23, 2026
DevOps & Scaling CaptchaAI Monitoring with Datadog: Metrics and Alerts
Monitor Captcha AI performance with Datadog — custom metrics, dashboards, anomaly detection alerts, and solve rate tracking for CAPTCHA solving pipelines.

Monitor Captcha AI performance with Datadog — custom metrics, dashboards, anomaly detection alerts, and solve...

Automation Python All CAPTCHA Types
Feb 19, 2026
Reference CAPTCHA Token Injection Methods Reference
Complete reference for injecting solved CAPTCHA tokens into web pages.

Complete reference for injecting solved CAPTCHA tokens into web pages. Covers re CAPTCHA, Turnstile, and Cloud...

Automation Python reCAPTCHA v2
Apr 08, 2026
Reference API Endpoint Mapping: CaptchaAI vs Competitors
Side-by-side API endpoint comparison between Captcha AI, 2 Captcha, Anti-Captcha, and Cap Monster — endpoints, parameters, and response formats.

Side-by-side API endpoint comparison between Captcha AI, 2 Captcha, Anti-Captcha, and Cap Monster — endpoints,...

All CAPTCHA Types Migration
Feb 05, 2026
Reference Browser Session Persistence for CAPTCHA Workflows
Manage browser sessions, cookies, and storage across CAPTCHA-solving runs to reduce repeat challenges and maintain authenticated state.

Manage browser sessions, cookies, and storage across CAPTCHA-solving runs to reduce repeat challenges and main...

Automation Python reCAPTCHA v2
Feb 24, 2026