API reference
One endpoint answers image challenges. Send the board the way it was served to you and get back the answer object ready to submit. JSON in, JSON out.

The base url is https://api.xqroo.com. Authenticate every request with your key as a bearer token: Authorization: Bearer hk_your_key.
POST /solve
Send one challenge. The request fields depend on the challenge type.
Request fields
| Field | Required | Meaning |
|---|---|---|
question | yes | The instruction text shown with the challenge. |
request_type | yes | image_label_binary, image_label_area_select, or image_drag_drop. |
tiles | yes | One entry per image: its task_key and the image as image (base64) or url. |
entities | drag only | The draggable pieces, one entry each: entity_id, its image (base64 or url), and coords, the piece's current [x, y] on the board. coords is required: without it every drag solve fails. |
examples | if shown | Any reference images shown with the challenge. |
Send images either as raw base64 in image, or as an url and xaptcha fetches it. URLs are faster: send them straight from the challenge, promptly, before they expire.
Response
{
"ok": true,
"answer": { "<task_key>": … },
"confidence": 0.9994,
"ms": 5304,
"id": "rq_1a2b3c"
}Answer shapes
answer is shaped for the challenge type. Each of these is a real board and the answer that was accepted for it:
reference
t0

t3


t7
image_label_binaryA verdict for every tile, "true" or "false", including the ones you leave out.
x 240, y 52image_label_area_selectA list of [x, y] points per board, in the board's own 480 by 320 pixels.

to 232, 247image_drag_dropA destination per piece. A piece whose destination equals its start is staying put, not missing.Only answered challenges are billed. If xaptcha can't answer, ok is false with an error, and nothing is charged.
GET /status
Returns the account for your key: plan, today's usage, allowance left, balance, and when it resets. The same numbers you see on your account.
Errors
| Code | Meaning |
|---|---|
401 | Missing or unknown key. |
429 | Nothing left: today's allowance is used up and the balance is empty. |
502 | Temporary. Retry the request. |
Get a key
Pick a plan, pay by card or in crypto, and your key is issued on confirmation. See plans