Turnstile (Proxyless)
Solve a Cloudflare Turnstile widget without a proxy.
The same solve as Turnstile, but you don't need a proxy: Peak Solutions runs it through its own proxies.
Request
POST https://api.peak.fo/solve
| Field | Type | Required | Description |
|---|---|---|---|
task_type | string | Yes | turnstiletaskproxyless |
url | string | Yes | The page the widget is on. |
sitekey | string | Yes | The widget's sitekey. See Find the sitekey. |
action | string | No | The widget's data-action, if the page sets one. |
cdata | string | No | The widget's data-cdata, if the page sets one. |
proxy | string | No | Your own proxy, as protocol://user:pass@host:port or in proxy parameters. Used instead of ours if set. |
Example
The Python examples use requests (pip install requests). The Go examples use tls-client (go get github.com/bogdanfinn/tls-client, Go 1.27+).
curl https://api.peak.fo/solve \
-H "X-API-Key: pk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"task_type": "turnstiletaskproxyless",
"url": "https://example.com/login",
"sitekey": "0x4AAAAAAA..."
}'Response
| Field | Type | Description |
|---|---|---|
data.token | string | The Turnstile token. |
data.secondary_token | string | Only returned when the widget also issues a second token. |
cost | number | What the solve was charged, in USD. |
error | string | On failure: what went wrong, in words. |
error_code | string | On failure: what went wrong, as a stable code. |
{
"success": true,
"data": {
"token": "0.AgAAAB..."
},
"cost": 0.0009
}Errors
A failed solve returns HTTP 200 with "success": false, and is not charged.
error_code | What to do |
|---|---|
invalid_sitekey | Check the sitekey belongs to that page. |
invalid_action | Send the exact data-action from the page, or leave it out. |
invalid_cdata | Send the exact data-cdata from the page, or leave it out. |
challenge_flagged | Retry. If it keeps happening, use Turnstile with your own proxy. |
proxy_error | Retry. |
timeout | Retry. |
solve_failed | Retry. |
solver_error | Retry. |
If proxyless solving is unavailable, the request is rejected with HTTP 503 and proxyless_unavailable. Retry later, or use Turnstile with your own proxy.
A request missing sitekey or url is rejected with HTTP 400 and missing_fields. For rejections like insufficient_balance, see Error codes.