CaptchaAI uses a compatible API format that makes switching from CapMonster Cloud straightforward. Most migrations require only changing the base URL and API key. This guide covers the exact steps.
What changes
| Component | CapMonster Cloud | CaptchaAI |
|---|---|---|
| Submit URL | https://api.capmonster.cloud/createTask |
https://ocr.captchaai.com/in.php |
| Result URL | https://api.capmonster.cloud/getTaskResult |
https://ocr.captchaai.com/res.php |
| API key param | clientKey |
key |
| API format | JSON body | Form-encoded (or JSON) |
| Task ID field | taskId |
request (in response) |
| Result field | solution object |
request (token string) |
Quick migration: Change two lines
If your code uses a wrapper or SDK, the fastest path is replacing the base URL and key:
# Before (CapMonster Cloud)
API_URL = "https://api.capmonster.cloud"
CLIENT_KEY = "your_capmonster_key"
# After (CaptchaAI)
SUBMIT_URL = "https://ocr.captchaai.com/in.php"
RESULT_URL = "https://ocr.captchaai.com/res.php"
API_KEY = "your_captchaai_key"
Full migration: reCAPTCHA v2
CapMonster Cloud (before)
import requests
import time
resp = requests.post("https://api.capmonster.cloud/createTask", json={
"clientKey": "CAPMONSTER_KEY",
"task": {
"type": "RecaptchaV2TaskProxyless",
"websiteURL": "https://example.com",
"websiteKey": "6Le-SITEKEY",
}
}).json()
task_id = resp["taskId"]
while True:
time.sleep(5)
result = requests.post("https://api.capmonster.cloud/getTaskResult", json={
"clientKey": "CAPMONSTER_KEY",
"taskId": task_id,
}).json()
if result["status"] == "ready":
token = result["solution"]["gRecaptchaResponse"]
break
CaptchaAI (after)
import requests
import time
resp = requests.post("https://ocr.captchaai.com/in.php", data={
"key": "YOUR_API_KEY",
"method": "userrecaptcha",
"googlekey": "6Le-SITEKEY",
"pageurl": "https://example.com",
"json": "1",
}).json()
task_id = resp["request"]
while True:
time.sleep(5)
result = requests.get("https://ocr.captchaai.com/res.php", params={
"key": "YOUR_API_KEY",
"action": "get",
"id": task_id,
"json": "1",
}).json()
if result["status"] == 1:
token = result["request"]
break
if result["request"] != "CAPCHA_NOT_READY":
raise Exception(result["request"])
Parameter mapping
reCAPTCHA v2
| CapMonster Cloud | CaptchaAI |
|---|---|
task.type: "RecaptchaV2TaskProxyless" |
method: "userrecaptcha" |
task.websiteKey |
googlekey |
task.websiteURL |
pageurl |
task.isInvisible: true |
invisible: "1" |
Cloudflare Turnstile
| CapMonster Cloud | CaptchaAI |
|---|---|
task.type: "TurnstileTaskProxyless" |
method: "turnstile" |
task.websiteKey |
sitekey |
task.websiteURL |
pageurl |
Image CAPTCHA
| CapMonster Cloud | CaptchaAI |
|---|---|
task.type: "ImageToTextTask" |
method: "base64" |
task.body |
body |
JavaScript migration
CapMonster Cloud (before)
const axios = require('axios');
const resp = await axios.post('https://api.capmonster.cloud/createTask', {
clientKey: 'CAPMONSTER_KEY',
task: {
type: 'RecaptchaV2TaskProxyless',
websiteURL: 'https://example.com',
websiteKey: '6Le-SITEKEY',
}
});
const taskId = resp.data.taskId;
CaptchaAI (after)
const axios = require('axios');
const resp = await axios.post('https://ocr.captchaai.com/in.php', null, {
params: {
key: 'YOUR_API_KEY',
method: 'userrecaptcha',
googlekey: '6Le-SITEKEY',
pageurl: 'https://example.com',
json: 1,
}
});
const taskId = resp.data.request;
Error code mapping
| CapMonster Cloud | CaptchaAI equivalent |
|---|---|
ERROR_KEY_DOES_NOT_EXIST |
ERROR_KEY_DOES_NOT_EXIST |
ERROR_ZERO_BALANCE |
ERROR_ZERO_BALANCE |
ERROR_RECAPTCHA_TIMEOUT |
ERROR_CAPTCHA_UNSOLVABLE |
ERROR_NO_SLOT_AVAILABLE |
ERROR_NO_SLOT_AVAILABLE |
CAPTCHA_NOT_READY |
CAPCHA_NOT_READY |
Note the spelling difference: CaptchaAI uses CAPCHA_NOT_READY (no T).
Balance check
CapMonster Cloud
resp = requests.post("https://api.capmonster.cloud/getBalance", json={
"clientKey": "CAPMONSTER_KEY"
}).json()
balance = resp["balance"]
CaptchaAI
resp = requests.get("https://ocr.captchaai.com/res.php", params={
"key": "YOUR_API_KEY",
"action": "getbalance",
"json": "1",
}).json()
balance = float(resp["request"])
Migration checklist
- [ ] Get CaptchaAI API key from captchaai.com
- [ ] Replace submit URL:
api.capmonster.cloud/createTask→ocr.captchaai.com/in.php - [ ] Replace result URL:
api.capmonster.cloud/getTaskResult→ocr.captchaai.com/res.php - [ ] Change auth:
clientKey→key - [ ] Change request format: JSON task object → form-encoded parameters
- [ ] Update response parsing:
taskId→request,solution.gRecaptchaResponse→request - [ ] Update error handling:
CAPTCHA_NOT_READY→CAPCHA_NOT_READY - [ ] Test with a single solve before switching production traffic
FAQ
Is CaptchaAI a drop-in replacement for CapMonster Cloud?
The API format differs (form-encoded vs JSON), but the concepts are the same. The migration typically takes 15-30 minutes.
Can I run both services simultaneously during migration?
Yes. Route a percentage of traffic to CaptchaAI while keeping CapMonster Cloud as a fallback, then shift fully once you've validated results.
Switch to CaptchaAI and start solving in minutes
Get your API key at captchaai.com.
Discussions (0)
Join the conversation
Sign in to share your opinion.
Sign InNo comments yet.