createTask
Submit a captcha with POST /createTask and get a taskId back. Covers request fields, task types, proxy options and the error codes CaptchaSonic returns.
POST
https://api.captchasonic.com/createTaskHostapi.captchasonic.com
Content-Typeapplication/json
Submit the task here, then poll getTaskResult with the returned taskId.
Request body
| Field | Type | Description |
|---|---|---|
apiKey | string | Your API key from the dashboard. |
task | object | The task to solve. type selects the captcha; the other fields depend on it. |
{
"apiKey": "sonic_xxxxxxxxxxxxxxxxxxxxxxxx",
"task": {
"type": "AntiTurnstileTask",
"websiteURL": "https://app.axieinfinity.com/daily-bounty-board",
"websiteKey": "0x4AAAAAABRS0NDnLjjd8OYS",
"metadata": {
"action": "login",
"cdata": "0000-1111-2222-3333-example-cdata"
}
}
}
Response
{
"errorId": 0,
"status": "idle",
"taskId": "FgIcYXBtKR6E"
}
errorId: 0 means the task was accepted. Any other value is an error, see Errors & rate limits.
Example
curl -s https://api.captchasonic.com/createTask \
-H 'content-type: application/json' \
-d '{"apiKey":"sonic_xxx","task":{"type":"AntiTurnstileTask","websiteURL":"https://example.com","websiteKey":"0x4AAAAAAA..."}}'
Prefer not to poll yourself? The Python and Node.js SDKs submit and wait for you.