Skip to Content
Peak Solutions

Solve

POST /solve solves a task and returns the result.

POST https://api.peak.fo/solve

Sends a task to Peak Solutions and waits for the result. The task_type field picks what to solve, and each task page lists the fields it needs.

Request

Headers:

HeaderValue
X-API-KeyYour API key.
Content-Typeapplication/json

Body fields, for all tasks:

FieldTypeUsed byDescription
task_typestringAllWhat to solve. Not case-sensitive. See the table below.
urlstringAllThe page with the challenge.
proxystringAllYour proxy, as protocol://user:pass@host:port. Optional for proxyless tasks. See Proxies.
proxy_typestringAllOr use proxy parameters: the protocol, such as http or socks5. Defaults to http.
proxy_addressstringAllThe proxy's host name or IP.
proxy_portnumber, stringAllThe proxy's port.
proxy_loginstringAllThe proxy username, if it has one.
proxy_passwordstringAllThe proxy password, if it has one.
sitekeystringTurnstileThe widget's sitekey.
actionstringTurnstileThe widget's data-action, if the page sets one.
cdatastringTurnstileThe widget's data-cdata, if the page sets one.
user_agentstring5-second challengeThe Windows Chrome user-agent your code sends.
htmlstring5-second challengeThe challenge page you already loaded.
appIdstringAllOptional. Your app ID, if you build a tool on Peak Solutions. app_id also works. See App IDs.

Send the proxy either as one proxy URL or as the five proxy parameters, not both. If you send both, proxy is used. See Proxies.

The body can be up to 4 MB.

task_typeTask
turnstiletaskTurnstile
turnstiletaskproxylessTurnstile (Proxyless)
cloudflare5stask5-Second Challenge (WAF)

Example

Terminal
curl https://api.peak.fo/solve \
  -H "X-API-Key: pk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "task_type": "turnstiletask",
    "url": "https://example.com/login",
    "sitekey": "0x4AAAAAAA...",
    "proxy": "http://user:pass@1.2.3.4:8080"
  }'

Response

FieldTypeDescription
successbooleantrue if the solve worked.
dataobjectThe result. Its fields depend on the task, see each task page.
costnumberWhat the solve was charged, in USD.
errorstringOn failure: what went wrong, in words.
error_codestringOn failure: what went wrong, as a stable code.
task_idstringThe solve's id, when a solve was tried. See below.
{
  "success": true,
  "data": {
    "token": "0.AgAAAB..."
  },
  "cost": 0.0009,
  "task_id": "5f0c2b1e-8a4d-4c3e-9b7a-2d6e1f4a8c90"
}
  • Failed solve: HTTP 200. Peak Solutions tried and couldn't solve it. Not charged.
  • Rejected request: a 4xx or 5xx status, before any solving. Not charged, and no task_id.

task_id

Every solve that was tried, successful or failed, returns a task_id. Keep it:

  • If the token or cookies don't work on the site, send it to POST /feedback.
  • When you ask support about a solve, include it.

Errors

These can happen on any task:

error_codeHTTPWhat to do
invalid_request_body400Send valid JSON.
invalid_task_type400Use a task_type from the table above.
missing_fields400Add the fields that error lists.
invalid_proxy400Fix the proxy_ field that error names.
request_too_large413Keep the body under 4 MB.
insufficient_balance402Top up.
package_exhausted402Renew the package, or use a pay-per-solve key.
task_not_authorized402This package key can't solve this task. Check allowed_tasks.
task_blocked403The target is blocked. If error says "for trial credits", top up to unlock it. Otherwise contact support if that's a mistake.
rate_limited429Wait for Retry-After, then retry. See Rate limits.
task_disabled503The task is turned off for now. Retry later.

Each task page lists its own solve failures. All codes are on Error codes.

On this page