api v2

Reference

The Solvewall API is wire-compatible with 2captcha v2. Everything below is additive: streaming, idempotency, batch submits and spend controls are new, optional, and never required.

Quickstart

Three calls: create, then read (or stream). Answers arrive in seconds.

curl -s https://api.solvewall.com/createTask -H "content-type: application/json" \
  -d '{"clientKey":"swl_live_...","task":{"type":"image","body":"<base64>"}}'
# → {"errorId":0,"taskId":723456789012}

curl -s https://api.solvewall.com/getTaskResult -H "content-type: application/json" \
  -d '{"clientKey":"swl_live_...","taskId":723456789012}'
# → {"errorId":0,"status":"ready","solution":{"text":"k7m2p"}}
import httpx
API = "https://api.solvewall.com"
KEY = "swl_live_..."

r = httpx.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {"type": "image", "body": b64},
}).json()

import time
while True:
    s = httpx.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": r["taskId"]}).json()
    if s["status"] == "ready": break
    time.sleep(2)
Timing: poll no faster than every 2 s. Better: pass callbackUrl or subscribe to/stream.

Authentication

Send your key as clientKey in the JSON body, as

x-api-key: swl_live_...

or as a key query parameter on GET endpoints. Keys are per-user and rotatable. Restrict a key to CIDRs and set a hard spend ceiling from the dashboard — both are enforced server-side before a task is accepted.

All API responses are HTTP 200; check errorId.

createTask

POST /createTask

FieldTypeRequiredNotes
clientKeystringyesYour API key
task.typestringyesSee the type table below
task.websiteURLstringdependsPage where the widget lives
task.websiteKeystringdependssitekey / public key
callbackUrlstringnoSigned webhook on completion
idempotencyKeystringnoReplays the original taskId
exactModeboolnoTwo solvers must agree

Response

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

Type reference

typeParamsAnswerPer 1k
recaptcha-v2websiteURL, websiteKeytoken$0.9
recaptcha-v2-invisiblewebsiteURL, websiteKeytoken$0.9
recaptcha-v3websiteURL, websiteKey, pageActiontoken$1.4
recaptcha-enterprisewebsiteURL, websiteKeytoken$2.6
turnstilewebsiteURL, websiteKeytoken$1.3
hcaptchawebsiteURL, websiteKeytoken$1.1
funcaptchawebsiteURL, websitePublicKeymulti$2.4
geetest-v3websiteURL, gt, challengemulti$2.6
geetest-v4websiteURL, captchaIdmulti$2.9
datadomewebsiteURL, websiteKeytoken$1.3
image—text$0.45
texttexttext$0.42
audio—text$0.4
gridtextgrid$0.54
clicktextcoords$0.56
rotatetextangles$0.5
bounding-boxtextboxes$2.2
draw-aroundtextcoords$2.2
drag-dropwebsiteURL, websiteKeycoords$1.9
amazon-wafwebsiteURL, websiteKey, iv, contextmulti$1.3
impervawebsiteURL, websiteKeytoken$2.6
akamaiwebsiteURL, websiteKeytoken$2.4
kasadawebsiteURLtoken$2.4
mtcaptchawebsiteURL, websiteKeytoken$1.3
leminwebsiteURL, captchaIdmulti$1.3
capywebsiteURL, websiteKeymulti$1.3
altchawebsiteURLtext$1.3
friendlywebsiteURL, websiteKeytext$1.3
cutcaptchawebsiteURL, websiteKey, apikeytoken$1.3
atbwebsiteURL, websiteKeytoken$1.3
tencentwebsiteURL, websiteKeymulti$2.6
binancewebsiteURL, websiteKeymulti$2.6
vkwebsiteURL, websiteKeytoken$1.3
prosopowebsiteURL, websiteKeymulti$1.3
captchafoxwebsiteURL, websiteKeytoken$1.3
yidunwebsiteURL, websiteKeymulti$2.6
temuwebsiteURLtoken$0.9
tiktokwebsiteURL, websiteKeymulti$2.6

getTaskResult

POST /getTaskResult · body {"clientKey","taskId"}

{"errorId":0,"status":"ready","solution":{"token":"0.abc..."},"cost":"0.000900"}

While in flight you get {"errorId":0,"status":"processing"}. Thesolution object is shaped by the type: token for widget types,text for recognition, coordinates / click for spatial types.

Realtime (SSE)

GET /stream/:taskId

Returns text/event-stream. One data: frame then close — no polling. If the task is already terminal, the frame is returned immediately.

data: {"status":"ready","answer":"0.abc..."}

Webhooks

Set callbackUrl and we POST the result. Each delivery is signed:

x-solvewall-signature: sha256=<hmac>
x-solvewall-event: task.completed

{"taskId":"723...","status":"ready","solution":{"text":"k7m2p"}}

Verify HMAC-SHA256 over the raw body with your webhook secret. Retries back off exponentially (5 s → 1 h, 8 attempts) and stop on any 2xx.

Balance & reports

GET  /getBalance        → {"errorId":0,"balance":"12.400000"}
POST /reportCorrect     → {"errorId":0}
POST /reportIncorrect   → refunds the task, dings solver accuracy

Image input

Send a base64 string, a data URI, or a public URL in task.body (or astask.imageUrl). PNG, JPEG, GIF, WEBP and BMP up to 500 kB. Multiply-distorted, angled and audio images are all in scope.

Legacy endpoints

Old clients keep working:

POST /in.php   (method=userrecaptcha|base64|... )  → OK|<taskId> GET  /res.php?action=get&id=...                    → OK|<answer> | CAPTCHA_NOT_READY GET  /res.php?action=getbalance                    → OK|<balance>

Migrating from 2captcha

  1. Create a key here and top up — minimum is $3.
  2. Replace api.2captcha.com with api.solvewall.com (and 2captcha.com with solvewall.com for legacy paths).
  3. Keep your key in the same field. Type strings such as RecaptchaV2TaskProxyless are accepted directly.
  4. Optional: switch polling to callbackUrl and add an idempotencyKey.
Error codes are identical, so your existing retry logic behaves the same.

Sandbox & limits

  • 25 createTask/s per key, 200/min per IP.
  • 50 tasks per createTasks batch.
  • Tasks expire 10 min after creation; unfinished tasks refund automatically.
  • Add ?sandbox=1 to any key to get instant echo answers.

Error codes

errorIderrorCodeMeaning
1ERROR_KEY_DOES_NOT_EXISTUnknown or revoked key
10ERROR_ZERO_BALANCETop up required
11ERROR_IP_NOT_ALLOWEDCaller IP outside the key allowlist
12ERROR_CAPTCHA_UNSOLVABLEThree attempts failed, auto-refunded
16ERROR_NO_SUCH_CAPCHA_IDTask id not found for this account
22ERROR_TASK_ABSENTtask object missing
23ERROR_TASK_NOT_SUPPORTEDUnknown task.type
110ERROR_BAD_PARAMETERSMissing or malformed params
24ERROR_SPEND_CAPKey budget exhausted
25ERROR_RATE_LIMITEDSlow down