Captcha OCR

Make the client idempotent on the portal, not on the API

2026-03-27 · Using the API

The API charges a second reliable read of a new request. Your code should not send the image twice.

HTTP retries are useful for 503 and for a dropped connection. They are harmful for a 200 you already parsed. If you received text and reliable: true, you have been charged. Retry the portal submit, not the solve.

If the connection dropped before you read the body, you may have been charged and you may not have the text. That is what the task id and the result route are for when you used /v1/submit. A synchronous call that dies mid-response is the awkward case. Prefer submit when the network is unreliable and the portal timer allows it.

402 and 422 should fail the job, not retry it.

Log the status code. A retry policy that retries everything will drain a balance overnight.

Ready to call it? Start with the quickstart, the API guide, or pricing.

More in Using the API