When CapSolver is “not working”, it almost always falls into one of three buckets: the API returned an errorCode (wrong task data, key, balance, proxy or a timeout), your polling loop gave up or queried the wrong taskId, or the task succeeded but the target site rejected the token or cookie because of a mismatch on your side. Read the errorCode first; it names the fix in most cases.
Below: every documented error code, the polling rules, the Turnstile and Challenge task parameters, the accepted proxy formats, what to check when a valid-looking token is refused, and when NSLSolver is a reasonable alternative.
Quick answer: what your CapSolver errorCode means
When a CapSolver call fails, the JSON comes back with errorId: 1 plus an errorCode and an errorDescription. Find your exact code below. Descriptions are from CapSolver's own error-code page (checked 2026-12-01).
- ERROR_CAPTCHA_UNSOLVABLE
- The task could not be solved this time. CapSolver documents it as “No deduction, please try again”, so you are not charged. Retry with a fresh createTask; if it repeats on one site, re-check websiteURL, websiteKey and (for AntiCloudflareTask) the proxy.
- ERROR_INVALID_TASK_DATA
- The task object has a wrong or missing field. Read errorDescription: it names the problem. Typical causes: a misspelled task type, a missing websiteKey, or a malformed proxy string.
- ERROR_KEY_DENIED_ACCESS
- Your clientKey is not accepted. Copy the key again from the CapSolver dashboard and send it as clientKey in the JSON body of every call. Watch for stray spaces or the wrong environment variable.
- ERROR_ZERO_BALANCE / ERROR_SETTLEMENT_FAILED
- Balance too low to pay for the task. Top up, or check the package you are using. ERROR_SETTLEMENT_FAILED is documented as “Please check your balance or contact customer service”.
- ERROR_TASK_TIMEOUT
- No solution within 120 seconds. Create a new task. For AntiCloudflareTask, a slow or blocked proxy is the usual cause: switch to a different static or sticky IP.
- ERROR_TASKID_INVALID
- The taskId is wrong or no longer exists. Tasks can only be queried for 5 minutes and up to 120 times. Poll with the exact taskId from createTask, every 3 seconds, and stop after that window.
- ERROR_PROXY_BANNED
- The target site blocked your proxy IP. Use another IP. For Cloudflare Challenge, CapSolver asks for a static or sticky proxy kept alive for at least 3 minutes, not a rotating one.
- ERROR_IP_BANNED / ERROR_KEY_TEMP_BLOCKED
- Too many failing requests in a short time. Your IP is blocked for 10 minutes (30 after repeats) or your key for 5 minutes. Fix the bad requests first, then back off before retrying.
- status: ready, but the site still rejects the token
- CapSolver delivered; the target did not accept it. Check sitekey and action/cdata, submit Turnstile tokens once within 300 seconds, and replay cf_clearance with the same proxy and user agent.
How a CapSolver task works, and where it can fail
CapSolver uses an asynchronous, two-step API. You POST a task to https://api.capsolver.com/createTask with your clientKey and a task object whose type selects the solver. For token tasks such as Turnstile or Cloudflare Challenge, the response contains only a taskId. You then POST that taskId to https://api.capsolver.com/getTaskResult until status changes from idle or processing to ready, at which point the solution object holds the token or cookies.
Three documented limits catch people out. The getTaskResult page says to try again in 3 seconds while a task is processing, that each task can be queried at most 120 times, and that a task can only be queried within 5 minutes of its creation; after that the result is lost and you get ERROR_TASKID_INVALID. Any error is signalled by errorId: 1 together with errorCode and errorDescription, so a loop that only checks status will spin forever on an error. createTask also accepts an optional callbackUrl if you prefer to receive the token by POST instead of polling.
A minimal loop that respects those rules and surfaces the real error code looks like this:
import time
import requests
API = "https://api.capsolver.com"
CLIENT_KEY = "YOUR_CAPSOLVER_KEY"
def solve(task: dict, max_wait: int = 120) -> dict:
# 1) createTask: token tasks answer with a taskId, not a result
r = requests.post(f"{API}/createTask",
json={"clientKey": CLIENT_KEY, "task": task}, timeout=30).json()
if r.get("errorId"):
raise RuntimeError(f"{r.get('errorCode')}: {r.get('errorDescription')}")
task_id = r["taskId"]
# 2) getTaskResult: poll every 3 s. The docs allow at most 120 queries per
# task, and a task can only be queried for 5 minutes after creation.
deadline = time.time() + max_wait
while time.time() < deadline:
time.sleep(3)
res = requests.post(f"{API}/getTaskResult",
json={"clientKey": CLIENT_KEY, "taskId": task_id}, timeout=30).json()
if res.get("errorId"):
raise RuntimeError(f"{res.get('errorCode')}: {res.get('errorDescription')}")
if res.get("status") == "ready":
return res["solution"]
raise TimeoutError("no result before max_wait")Every documented CapSolver error code, explained
This is the full list from CapSolver's error-code page, with what each one means in practice and the first thing to try. The code names are reproduced exactly as CapSolver spells them.
- ERROR_CAPTCHA_UNSOLVABLE: documented as “No deduction, please try again”. Retry; if one site keeps returning it, re-check the parameters and the proxy.
- ERROR_INVALID_TASK_DATA: “You submitted incorrect data”. errorDescription names the field; fix it before retrying, or repeated failures can lead to an IP block.
- ERROR_KEY_DENIED_ACCESS: the clientKey is wrong. Re-copy it from the dashboard.
- ERROR_ZERO_BALANCE: the balance cannot cover the task. Top up.
- ERROR_SETTLEMENT_FAILED: billing could not be settled. Check your balance or contact CapSolver support.
- ERROR_TASK_TIMEOUT: no solution within 120 seconds. Create a new task; for proxy-based tasks, try another IP.
- ERROR_TASKID_INVALID: the taskId is wrong or expired (older than 5 minutes, or more than 120 queries).
- ERROR_TASK_NOT_SUPPORTED: the task type is misspelled or not supported. Type names are case-sensitive, for example AntiTurnstileTaskProxyLess.
- ERROR_PROXY_BANNED: the target blocked the proxy IP. Switch IP.
- ERROR_RATE_LIMIT: you exceeded the request rate of your service package. Slow down or upgrade the package.
- ERROR_IP_BANNED: your IP is blocked for 10 minutes; repeated errors in a short window can extend it to 30 minutes.
- ERROR_KEY_TEMP_BLOCKED: too many failing requests from one key; it unblocks automatically after 5 minutes.
- ERROR_SERVICE_UNAVALIABLE (spelled this way in the docs) and ERROR_BAD_REQUEST: temporary service-side problems. Retry with backoff and contact support if they persist.
- ERROR_UNKNOWN_QUESTION, ERROR_INVALID_IMAGE and ERROR_PARSE_IMAGE_FAIL: recognition-task errors (image size or base64 encoding). They do not apply to Turnstile or Challenge tasks.
Fixing Turnstile tasks (AntiTurnstileTaskProxyLess)
For Cloudflare Turnstile, CapSolver documents a single task type, AntiTurnstileTaskProxyLess. It needs only websiteURL (the page that shows the widget) and websiteKey (the widget's data-sitekey, which starts with 0x4). If the widget has a data-action or data-cdata attribute, pass them in metadata.action and metadata.cdata; leaving them out when the site sets them is a common reason for a token the site later refuses.
The docs say Turnstile does not require a proxy and that a custom userAgent is ignored for this task, so do not send either. Results usually arrive within 1 to 20 seconds depending on load, and the token is in solution.token.
# Cloudflare Turnstile: proxyless task, no proxy and no userAgent needed
solution = solve({
"type": "AntiTurnstileTaskProxyLess",
"websiteURL": "https://example.com/login", # the page that shows the widget
"websiteKey": "0x4AAAAAAA...", # data-sitekey of that widget
# Only if the widget sets data-action / data-cdata:
"metadata": {"action": "login", "cdata": "0000-1111-2222-3333"},
})
token = solution["token"] # submit as cf-turnstile-response, once, within 300 sFixing Cloudflare Challenge tasks (AntiCloudflareTask)
The “Just a moment...” interstitial is a different task: AntiCloudflareTask. Here the proxy is required, and the documentation is specific about it: use a static or sticky proxy (not rotating) and keep the session alive for at least 3 minutes. The optional userAgent must be the one you use on the target site, and only Chrome on Windows and Mac is supported. You can also pass the optional html field with the 403 challenge page you received, fetched fresh through the same sticky proxy.
The solution contains cookies with cf_clearance and the userAgent it was issued for. The docs also state that you must make your follow-up requests with a TLS request library. If you replay cf_clearance with plain requests, from a different IP, or with a different user agent, Cloudflare will usually challenge you again, which looks like CapSolver “not working” even though the task succeeded. If you get no solution at all, the docs suggest your IP may be blocked: try another proxy.
# Cloudflare Challenge: AntiCloudflareTask needs a static or sticky proxy
from curl_cffi import requests as cffi # a TLS-impersonating client
PROXY = "198.51.100.7:8000:user:pass" # ip:port:user:pass, same exit IP for 3+ min
solution = solve({
"type": "AntiCloudflareTask",
"websiteURL": "https://example.com/",
"proxy": PROXY,
# "userAgent": optional, Chrome on Windows or Mac only
})
# Replay through the SAME proxy with the SAME user agent
s = cffi.Session(impersonate="chrome",
proxies={"https": "http://user:pass@198.51.100.7:8000"})
s.headers["User-Agent"] = solution["userAgent"]
s.cookies.update(solution["cookies"]) # {"cf_clearance": "..."}
print(s.get("https://example.com/").status_code)Proxy format problems
A malformed proxy usually shows up as ERROR_INVALID_TASK_DATA or as timeouts. CapSolver accepts two styles. Either separate fields (proxyType set to http, https or socks5, plus proxyAddress, proxyPort, proxyLogin and proxyPassword), or a single proxy string in one of these forms:
- 198.51.100.7:8000:user:pass (no prefix means HTTP)
- http:198.51.100.7:8000:user:pass or socks5:198.51.100.7:8000:user:pass
- http://user:pass@198.51.100.7:8000 or socks5://user:pass@198.51.100.7:8000
- IP-whitelisted proxies: drop user:pass, but add CapSolver's server IPs (listed on its proxy page) to your provider's allowlist first, or every connection will fail.
- Tasks whose type ends in ProxyLess take no proxy at all.
The task succeeds but the site rejects the token
A status of ready only means CapSolver produced a token or cookie. Whether the target accepts it depends on how you use it. Work through this list before opening a ticket:
- Wrong sitekey: some pages load several widgets or swap the key per form. Read data-sitekey from the exact page and form you submit.
- Missing action or cdata: if the widget sets them, the site can check them on its side. Pass them in metadata.
- Expired or reused Turnstile token: Cloudflare documents that each token is valid for 300 seconds and is meant for single use. A retry that resubmits the same token gets timeout-or-duplicate.
- Wrong field: the token goes in cf-turnstile-response (or the site's own field name), not in a header.
- Proxy mismatch on Challenge: cf_clearance is tied to the session it was issued for. Use the same proxy IP for the task and for every later request.
- User-agent mismatch on Challenge: send exactly the userAgent from the solution, and pair it with a client whose TLS fingerprint matches a real Chrome.
When NSLSolver is a good alternative, and when it is not
If CapSolver works for your targets once these fixes are in place, there is no reason to switch. It covers types we do not: reCAPTCHA v2, image-to-text, GeeTest, AWS WAF, DataDome slider and MTCaptcha. NSLSolver does not solve reCAPTCHA v2, hCaptcha, image or text CAPTCHAs, FunCaptcha, GeeTest or DataDome, so for those, stay where you are. If you are weighing several providers, the CapSolver alternatives comparison lists prices and supported types side by side.
NSLSolver is worth a test when your traffic is mostly Cloudflare Turnstile, Cloudflare Challenge, reCAPTCHA v3, Kasada or Akamai, and you would rather drop the polling loop. The API is one synchronous POST to /solve that returns the token or cookies in the same response, so there is no taskId, no 120-query cap and no 5-minute window to manage. Prices per 1,000 solves are $0.80 for Turnstile, $1.00 for Challenge, $1.00 for reCAPTCHA v3 or Enterprise, $1.50 for Kasada and $2.00 for Akamai (beta), only successful solves are billed, and sign-ups with Google, Gmail or Proton get free credit with no card. Typical solve times are about 250 ms for Turnstile and about 3.3 s for Challenge. Whichever service you use, only automate sites you own or are authorised to access.
The same two tasks with NSLSolver
The same Turnstile and Challenge flow as NSLSolver calls. For Challenge, omit user_agent (or send an iPhone Safari UA), because the clearance is issued for an iPhone Safari User-Agent, then replay with the returned user_agent through the same proxy.
import requests
API = "https://api.nslsolver.com/solve"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
# Turnstile: one synchronous call, no taskId and no polling loop
r = requests.post(API, headers=HEADERS, timeout=120, json={
"type": "turnstile",
"site_key": "0x4AAAAAAA...",
"url": "https://example.com/login",
})
data = r.json()
if r.status_code == 200 and data.get("success"):
token = data["token"]
else:
# 400 bad field, 401 key, 402 balance, 429 rate limit, 503 retry (not billed)
print(r.status_code, data)
# Cloudflare Challenge: returns cookies (cf_clearance) and the user_agent to replay
r = requests.post(API, headers=HEADERS, timeout=120, json={
"type": "challenge",
"url": "https://example.com/",
"site_key": "0x4AAAAAAA...",
"proxy": "http://user:pass@198.51.100.7:8000",
# omit user_agent: the clearance is issued for the solver's iPhone Safari UA
})
data = r.json()
cookies, user_agent = data["cookies"], data["user_agent"]Related guides and pages