Skip to Content
Peak Solutions

createTask

POST /createTask starts a solve and returns its taskId, in the 2Captcha, Anti-Captcha, CapMonster and CapSolver format.

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

Checks the task, starts the solve and returns a taskId straight away. Then poll getTaskResult for the result.

The body is JSON. It's read as JSON even if your client sends another Content-Type.

Request

FieldTypeRequiredDescription
clientKeystringYesYour Peak Solutions API key, which starts with pk_.
taskobjectYesThe task. Its fields are below.
appIdstringNoYour app ID, if you build a tool on Peak Solutions. See App IDs.
softIdanyNoAccepted and ignored.
languagePoolstringNoAccepted and ignored.
callbackUrlstringNoAccepted and ignored. Peak Solutions doesn't call back, so poll getTaskResult.

Task fields

FieldTypeUsed byDescription
typestringAllThe task type. See What each task type solves.
websiteURLstringAllThe page with the challenge. Required.
websiteKeystringTurnstileThe widget's sitekey. Required for Turnstile. See Find the sitekey.
actionstringTurnstileThe widget's data-action. Also read from pageAction (CapMonster) and metadata.action (CapSolver).
cDatastringTurnstileThe widget's data-cdata. Also read from data (2Captcha, CapMonster) and metadata.cdata (CapSolver).
proxyTypestringWith a proxyhttp, https, socks4 or socks5. Defaults to http.
proxyAddressstringWith a proxyThe proxy's host name or IP.
proxyPortnumber, stringWith a proxyThe proxy's port.
proxyLoginstringWith a proxyThe proxy username, if it has one.
proxyPasswordstringWith a proxyThe proxy password, if it has one.
proxystringWith a proxyOr the whole proxy in one string, as CapSolver sends it: host:port:user:pass, scheme:host:port:user:pass, host:port, or a URL such as http://user:pass@host:port. Used instead of the fields above if set.
userAgentstring5-second challengeThe Windows Chrome user-agent your code sends.
htmlPageBase64string5-second challengeThe challenge page you loaded, base64-encoded (CapMonster).
htmlstring5-second challengeOr the challenge page as plain text (CapSolver).
cloudflareTaskTypestringCapMonstercf_clearance turns a TurnstileTask into a 5-second challenge solve.

The 5-second challenge always needs your proxy, and the cookies only work from that proxy's IP. See 5-Second Challenge (WAF) for what to send.

Examples

{
  "clientKey": "pk_your_api_key",
  "task": {
    "type": "TurnstileTaskProxyless",
    "websiteURL": "https://example.com/login",
    "websiteKey": "0x4AAAAAAA..."
  }
}

Response

{
  "errorId": 0,
  "taskId": 4826153907261
}

For 2Captcha, Anti-Captcha and CapMonster code, taskId is a number below 253, so JavaScript reads it exactly. For CapSolver code (a type starting with AntiTurnstile, or AntiCloudflareTask), it's a UUID string.

Before a task is created, it gets every check the native API runs: the task is turned on, your balance covers it, the fields are there, the site isn't blocked, the proxy is valid, and you're under your rate limit. If a check fails, you get the error straight away and no task is created. See Error codes.

On this page