What is Math Captcha?
A math captcha is an image showing a small arithmetic expression — addition, subtraction, multiplication, or division of two or three small whole numbers (e.g. '7 + 2', 'twelve minus four', '6 × 3'). The user is expected to compute the result and type the numeric answer.
How it works
Send Task
POST your MathCaptchaTask with the target URL and sitekey to our API. We'll queue it instantly.
We Solve
Capzy's proprietary vision pipeline reads the expression off the image and returns the computed answer, typically in ~0.6-1s.
Get Token
Poll getTaskResult — when status is 'ready', the solution contains the token to inject into the target page.
Quick integration
import requests, time
API = "https://api.capzy.ai"
KEY = "capzy_your_key_here"
# Step 1: Create task
task = requests.post(f"{API}/createTask", json={
"clientKey": KEY,
"task": {
"type": "MathCaptchaTask",
"body": "/9j/4AAQSkZJRgABAQ..."
}
}).json()
task_id = task["taskId"]
print(f"Task created: {task_id}")
# Step 2: Poll for result
while True:
result = requests.post(f"{API}/getTaskResult", json={
"clientKey": KEY,
"taskId": task_id
}).json()
if result["status"] == "ready":
print("Solved!", result["solution"])
break
elif result["status"] == "failed":
print("Failed:", result.get("errorDescription"))
break
time.sleep(1)
# Step 3: Image-to-text / math — submit the recognized text as the captcha answer
answer = result["solution"]["text"]
requests.post("https://target.example.com/login", data={"username": "...", "captcha": answer})Task parameters
typetypestringreqyesMathCaptchaTaskbodytypestringreqyesBase64-encoded image (PNG, JPG, GIF, BMP) of the math expressionSolution response
texttypestringThe computed numeric answer (e.g. '8')expressiontypestringThe expression we read from the image, in standard form (e.g. '3 + 5')Example response
Full getTaskResult response shape. The fields in the table above describe what's inside solution — the outer envelope (errorId, status) is identical for every captcha type.
{
"errorId": 0,
"status": "ready",
"solution": {
"text": "8",
"expression": "3 + 5"
}
}Error response
Failures use the same envelope with errorId: 1 plus errorCode + errorDescription. See the error-code reference for the full list.
{
"errorId": 1,
"errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
"errorDescription": "Solver gave up — automatically refunded."
}Pending response
While the solver is still working, getTaskResult returns status: "processing". Poll every 1–2 seconds until ready or failed.
{
"errorId": 0,
"status": "processing"
}Features
task types
proxyless: MathCaptchaTask