Kaptra exposes a CapSolver-compatible REST API. Every call is POST with a JSON body. HTTP status is always 200; success and failure live in errorId (0 or 1) and errorCode.
Authentication
Put clientKey in the JSON body. Do not send an Authorization header.
Sync vs poll
- Some types (today:
AntiAwsWafTask) returnstatus=readyfrom/createTask. - Everything else is async:
/createTaskreturnsstatus=processingand ataskId. Poll/getTaskResultevery 1–2 seconds, at most 120 times.
Minimal example
POST /createTask
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "ImageToTextTask",
"body": "BASE64_ENCODED_IMAGE"
}
}