Creating a task

A task tells Capzy what to solve. You POST it to /createTask and get back a taskId that you poll for the result. Every task shares the same envelope; only the task object changes per challenge.

Request shape

Send a POST to https://api.capzy.ai/createTask with a JSON body containing your clientKey and a task object. The task.type field selects the solver; the remaining fields inside task are the parameters for that type.

create-task.sh
curl -s https://api.capzy.ai/createTask \
  -H 'Content-Type: application/json' \
  -d '{
    "clientKey": "capzy_YOUR_KEY",
    "task": {
      "type": "AntiTurnstileTaskProxyLess",
      "websiteURL": "https://example.com/login",
      "websiteKey": "0x4AAAAAAADnPIDROrmt1Wwj"
    }
  }'

The task object

Every task carries a type. Most types also take a websiteURL and a websiteKey, but the exact parameter set is per type. See the Task types pages for the precise fields each one needs: Cloudflare, reCAPTCHA, DataDome, and more.

Common envelope fields

These fields appear across most task types. Types whose name ends in Task (as opposed to TaskProxyLess) also take the proxy fields below. See Using proxies for when they are required.

FieldDescription
clientKeyYour API key, starting with capzy_. Top-level field, required on every call.
task.typeThe task type, e.g. AntiTurnstileTaskProxyLess. Determines which challenge is solved and which task params apply.
task.websiteURLThe full URL of the page the challenge appears on. Required by most task types.
task.websiteKeyThe widget sitekey (Turnstile, reCAPTCHA, hCaptcha, etc.). Required by token-returning types; not used by cookie-clearance types.
task.proxyTypeFor proxy task types only: "http", "https", "socks4", or "socks5".
task.proxyAddressFor proxy task types only: proxy host or IP.
task.proxyPortFor proxy task types only: proxy port (integer).
task.proxyLoginFor proxy task types only: proxy username, if the proxy requires auth. Optional.
task.proxyPasswordFor proxy task types only: proxy password, if the proxy requires auth. Optional.

Success response

A valid task returns errorId: 0, a taskId, and status: "processing". Hold onto the taskId and poll /getTaskResult for the solution.

success.json
{
  "errorId": 0,
  "taskId": "df94a1c2-6b0e-4f7a-9c31-...",
  "status": "processing"
}
Billing happens here
The per-type price is deducted at createTask, not at result time. If the solve later fails with an outcome error (timeout, unsolvable, null result, internal), the charge is automatically refunded. See Errors for which codes refund.

Wrong task type

If the challenge on the page does not match the type you sent, the request fails with ERROR_WRONG_TASK_TYPE. The response includes a recommendedTaskType so you can retry with the correct one.

wrong-type.json
{
  "errorId": 1,
  "errorCode": "ERROR_WRONG_TASK_TYPE",
  "errorDescription": "This sitekey is reCAPTCHA v2, not Turnstile.",
  "recommendedTaskType": "RecaptchaV2TaskProxyLess"
}

An error response always has errorId: 1 with an errorCode and errorDescription. See Errors for the complete reference.