Quickstart
From an empty account to a usable token, in two HTTP requests.
CaptchAPI has no SDK to install. Every integration is two POST requests to two JSON endpoints, so you can be running from curl before you decide whether to write a client.
Get a key
Create an account, open the dashboard and generate an API key. The full key is shown once — store it in your secret manager immediately. After that you only ever see a display prefix, because we keep a SHA-256 hash and nothing else.
Create a task
POST the task type, the page URL and the sitekey. You get a taskId back straight away; the solve runs asynchronously. Your wallet is debited at this moment and credited back if the task fails.
curl https://api.captchapi.com/createTask \
-H 'content-type: application/json' \
-d '{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TurnstileTokenProxyLess",
"websiteURL": "https://example.com/login",
"websiteKey": "0x4AAAAAAADnPIDROrmt1Wwj"
}
}'{
"errorId": 0,
"taskId": "9f2c4b1e-6f0a-4d5e-b6c1-2f7a9d3e51c8"
}Poll for the result
Ask for the result until status flips from processing to ready. Wait about 1.5 seconds before the first poll and then every 0.5 seconds — polling costs nothing but a tight loop will hit the rate limit.
curl https://api.captchapi.com/getTaskResult \
-H 'content-type: application/json' \
-d '{
"clientKey": "YOUR_API_KEY",
"taskId": "9f2c4b1e-6f0a-4d5e-b6c1-2f7a9d3e51c8"
}'{
"errorId": 0,
"status": "ready",
"solution": {
"token": "0.f3KdXk9v…",
"type": "turnstile",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
},
"cost": "0.0006",
"createTime": 1767225600,
"endTime": 1767225604
}Use the solution
Submit solution.token in the form field the widget would have filled — cf-turnstile-response for Turnstile, g-recaptcha-response for reCAPTCHA, h-captcha-response for hCaptcha. Cloudflare challenge tasks return cookies instead: replay them with the exact userAgent from the same response.
Tokens are single-use and short-lived. Most expire within two minutes of being issued, so solve at the moment you need one rather than pre-warming a pool.