Skip to content

Cloudflare Turnstile

Cloudflare's privacy-friendly CAPTCHA alternative that verifies users invisibly or through a lightweight widget. CaptchaAI provides a valid token for site verification.

Languages
Servers
https://ocr.captchaai.com/

Request

Send method=turnstile with sitekey and pageurl to POST /in.php. Returns a Task ID.

Bodymultipart/form-datarequired
keystringrequired

Your API key (32 characters) — sent in body, NOT URL

methodstringrequired
Default "turnstile"
Value"turnstile"
sitekeystringrequired

Turnstile sitekey from widget or turnstile.render()

pageurlstring(uri)required

Full URL of the page containing the Turnstile widget

actionstring

Optional action passed to Turnstile

proxystring

Proxy in format user:pass@ip:port or ip:port. Learn More.

proxytypestring
Enum"HTTP""HTTPS""SOCKS4""SOCKS5"
jsoninteger
Default 1
Enum01
curl -i -X POST \
  https://ocr.captchaai.com/in.php \
  -H 'Content-Type: multipart/form-data' \
  -F key=string \
  -F method=turnstile \
  -F sitekey=string \
  -F pageurl=http://example.com \
  -F action=string \
  -F proxy=string \
  -F proxytype=HTTP \
  -F json=0

Responses

Submission accepted; returns task ID

Body
statusinteger
Example: 1
requeststring
Example: "0123456789"
Response
{ "status": 1, "request": "0123456789" }

Request

Poll POST /res.php with the Task ID to receive the Turnstile token for submission.

Bodymultipart/form-datarequired
keystringrequired

Your API key (32 characters)

actionstringrequired
Default "get"
Value"get"
idstringrequired

Task ID from /in.php

jsoninteger
Default 1
Enum01
curl -i -X POST \
  https://ocr.captchaai.com/res.php \
  -H 'Content-Type: multipart/form-data' \
  -F key=string \
  -F action=get \
  -F id=string \
  -F json=0

Responses

Turnstile token or status

Body
One of:
statusinteger
Value1
Example: 1
requeststring

Turnstile token

Example: "TOKEN_OR_TEXT"
Response
{ "status": 1, "request": "TOKEN_OR_TEXT" }