DocumentationAPI v1
POST/api/v1/createTask

Create a Captcha Task

Creates a new captcha solving task on ByeCap. Funds (or package quota) are reserved atomically and automatically refunded if the task fails or times out. Poll the returned taskId via POST /getTaskResult.

Authentication: Pass your API key via the X-API-Key HTTP header (recommended) or inside the JSON body as clientKey. Both nested task.* (2Captcha/CapSolver style) and flat payloads are supported.

Request Parameters

FieldTypeRequiredDescription
clientKeystringrequiredYour API key (passed in JSON body or X-API-Key header).
task.typestringrequiredCaptcha task type (e.g. ImageToTextTask, SvgToTextTask, TurnstileTaskProxyless, RecaptchaV2TaskProxyless).
task.bodystringoptionalBase64-encoded image or SVG string (also accepted as top-level image_base64).
task.modulestringoptionalOptional module selector (e.g. common, number, math, svg).
website_urlstringoptionalTarget page URL where Turnstile, reCAPTCHA, or GeeTest is rendered.
website_keystringoptionalPublic sitekey or captchaId extracted from the target page.
optionsobjectoptionalOptional key-value parameters (max 32 keys, e.g. isInvisible, action, minScore).
webhook_urlstringoptionalOptional HTTPS callback URL to receive asynchronous solution delivery.
softIDintegeroptionalOptional partner software identifier for referral attribution.

Request Examples

POST /createTask
curl -X POST https://api.byecap.org/api/v1/createTask \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "task": {
      "type": "ImageToTextTask",
      "body": "/9j/4AAQSkZJRgABAQAAAQABAAD..."
    }
  }'

Response Payloads

200 OK — Queued (pending)
{
  "status": "pending",
  "taskId": "76f8a21c-9b3e-4e11-a210-9c881c2e77a1"
}
200 OK — Instant Cache Hit (ready)
{
  "status": "ready",
  "taskId": "76f8a21c-9b3e-4e11-a210-9c881c2e77a1",
  "result": {
    "text": "7K4M9"
  }
}

Common Error Codes

HTTPError CodeMeaning
401KEY_NOT_FOUNDMissing, invalid, or deactivated API key.
400INSUFFICIENT_BALANCEWallet balance is too low to reserve the task cost.
400UNSUPPORTED_TASK_TYPEUnknown task.type or unsupported module routing.
403API_KEY_MODULE_NOT_ALLOWEDThis API key is restricted from calling the requested captcha module.
403IP_NOT_WHITELISTEDCaller IP is not in the API key whitelist.
429RATE_LIMIT_EXCEEDEDToo many requests per second; back off and retry.