What is Image to Text?
A generic OCR task for solving text-based captchas. Send a base64-encoded image containing distorted text, and we return the recognized text using our ML OCR pipeline.
How it works
Send Task
POST your ImageToTextTask with the target URL and sitekey to our API. We'll queue it instantly.
We Solve
Capzy's proprietary OCR transcribes the text from the image. Designed for accessibility tooling, archival document processing, and authorized automation workflows.
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": "ImageToTextTask",
"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
typetypestringreqyesImageToTextTaskbodytypestringreqyesBase64-encoded image (PNG, JPG, GIF, BMP)moduletypestringreqnoOCR module hint: 'common' (default), 'number' (digits only), 'alpha' (letters only)Solution response
texttypestringThe recognized text from the imageExample 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": "K7m9Qx"
}
}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: ImageToTextTask