Flow
Two calls: one to start, one to collect.
1. POST /createTask with the sitekey, the site's
domain and a proxy. It returns a taskId immediately — the
solve runs in a background thread.
2. POST /getResult with that id, about once a
second, until status leaves
processing. On
success the solution field holds
the P1_… token.
Shortest possible run
# create
curl -s http://108.186.221.171:5001/createTask \
-H 'X-API-Key: YOUR_KEY' -H 'Content-Type: application/json' \
-d '{"task":{"sitekey":"a9b5fb07-92ff-493f-86fe-352a2803b3df",
"website":"discord.com",
"proxy":"user:pass@host:port"}}'
# -> {"status":"created","taskId":"e667f399-484a-490d-baf2-ae66a33dcfde", ...}
# collect
curl -s http://108.186.221.171:5001/getResult \
-H 'X-API-Key: YOUR_KEY' -H 'Content-Type: application/json' \
-d '{"taskId":"e667f399-484a-490d-baf2-ae66a33dcfde"}'
# -> {"status":"success","solution":"P1_eyJhbGciOi...", ...}
Authentication
Every endpoint except /health needs a key.
The key is read from the first of these that carries one:
- header
X-API-Key: <key>— use this one - header
Authorization: Bearer <key> - JSON body field
key,apiKey,api_keyorclientKey - query string
?key=<key>— last resort, it lands in logs and proxy history
| Reply | What it means |
|---|---|
| 401 | No key in the request at all. |
| 402 | Key is known but paused or
expired. The reason field says
which. |
| 403 | Key is not in api.keys. |
/getResult on someone else's id answers
404 Task not found, exactly as it does for an id that never existed, so ids
cannot be probed across keys.Starts a solve and returns its id. Does not wait for the token.
Body
| Field | Type | Meaning |
|---|---|---|
| task.sitekey required | string | The site's hCaptcha sitekey, as it appears in the page's widget. |
| task.website required | string | The domain the captcha is served on. Scheme and path are stripped, so
https://discord.com/login and
discord.com are the same input. |
| task.proxy required | string | Your proxy — see Proxy format. There is no default: the solve never goes out on the server's own IP. |
| task.rqdata optional | string | Enterprise rqdata blob, when the target site uses
one. Pass it through verbatim. |
Replies
# 201
{"status": "created",
"taskId": "e667f399-484a-490d-baf2-ae66a33dcfde",
"message": "Task created and processing started"}
# 400 — a required field is missing or the proxy is malformed
{"status": "failed", "message": "Missing required fields: sitekey, website"}
{"status": "failed", "message": "Invalid proxy format. Use [scheme://][user:pass@]host:port"}
# 402 — lifetime solve quota used up
{"status": "failed", "reason": "quota_exhausted", "used": 5000, "limit": 5000}
# 429 — your key's concurrent-solve limit is full right now
{"status": "failed", "running": 20, "limit": 20,
"message": "Thread limit reached (20 concurrent solves). Retry when a task finishes."}
The current state of one of your tasks.
Body
| Field | Type | Meaning |
|---|---|---|
| taskId required | string | The id /createTask returned. |
Replies
# still working
{"status": "processing", "solution": null, "created_at": 1764290048.57,
"sitekey": "a9b5fb07-...", "website": "discord.com",
"message": "Task is being solved..."}
# done
{"status": "success", "solution": "P1_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"created_at": 1764290048.57, "sitekey": "a9b5fb07-...", "website": "discord.com",
"message": "Task is being solved..."}
# failed — message carries the reason (proxy refused, siteconfig failed, no token)
{"status": "failed", "solution": null, "message": "siteconfig failed after retries"}
# 404 — unknown id, another key's id, or a task older than an hour
{"status": "failed", "message": "Task not found"}
Polling
- Poll about once a second. A solve takes ~3s in the median and under 4s at the 90th percentile; a retried round can reach ~12s.
statusis one of processing · success · failed. Nothing else.messagekeeps its "being solved" text on a success — readstatus, never the message.- Tasks live in memory for 1 hour, then a sweep (every 5 min) removes them and the id answers 404. An API restart drops all of them.
Your own tasks still held in memory. Other keys' tasks are never listed.
{"total_tasks": 2,
"tasks": {
"e667f399-484a-490d-baf2-ae66a33dcfde": {"status": "success",
"created_at": "2026-11-28T00:34:08.570000", "website": "discord.com"},
"16d65bfa-183e-4282-bece-ce5a79fd4e3b": {"status": "processing",
"created_at": "2026-11-28T00:34:11.120000", "website": "discord.com"}}}
created_at is ISO here and a unix float in
/getResult — same value, different shape.Forgets a finished task early instead of waiting for the hourly sweep. It does not cancel a solve in flight — that thread runs to the end.
# 200
{"status": "success", "message": "Task e667f399-... deleted"}
# 404 — unknown id, or not yours
{"status": "failed", "message": "Task not found"}
The only open route. Use it for uptime checks, not for readiness of a particular key.
{"status": "online", "timestamp": "2026-11-28T00:34:29.106000"}
Proxy format
[scheme://][user:pass@]host:port
- Schemes accepted:
http,https,socks4,socks5,socks5h. Omitted scheme is read as http. - Host and a numeric port are both mandatory; the port must be 1–65535.
- Credentials are optional and may contain
@— only the last one separates them from the host.
# all valid host.example.com:8000 user:pass@host.example.com:8000 http://user:pass@host.example.com:8000 socks5://user:pass@host.example.com:1080 # rejected with 400 host.example.com no port host.example.com:http port not numeric ftp://host.example.com:21 scheme not supported
captcha1 failed after
retries.Limits & quotas
Both are per key and set server-side in
api.keys.
| Limit | Enforced at | When you hit it |
|---|---|---|
| concurrent solves | /createTask, before a slot is taken | 429 with running and
limit. A slot frees as soon as one of your tasks ends,
however it ends. |
| lifetime solves | /createTask, before the slot check | 402 with reason: quota_exhausted,
used and limit. Only
successful solves count. |
A key with no limit configured is unlimited on that axis. Nothing is rate-limited per second: concurrency is the only throttle, so size your worker pool to your slot count and let 429 be the backstop.
Status codes
| Code | Where | Meaning |
|---|---|---|
| 200 | all | Request understood. For
/getResult this says nothing about the solve — read
status. |
| 201 | /createTask | Task accepted and started. |
| 400 | /createTask, /getResult, /deleteTask | Missing field, or a proxy that does not parse. Malformed JSON is reported as the missing field. |
| 401 | all but /health | No API key in the request. |
| 402 | all but /health | Key paused, expired, or out of quota. |
| 403 | all but /health | Key unknown. |
| 404 | /getResult, /deleteTask | No such task for your key — unknown, foreign, or expired. |
| 429 | /createTask | Your concurrency limit is full. |
| 500 | all | Server-side fault. The body carries the message; the server log carries the traceback. |
Every error body is JSON with status: "failed" and a
message; the ones that can be acted on also carry
reason, running/limit or used/limit.
Full client
Create, poll, give up — the whole contract in one function.
import time, requests
API = "http://108.186.221.171:5001"
KEY = "YOUR_KEY"
HEAD = {"X-API-Key": KEY}
def solve(sitekey, website, proxy, rqdata=None, timeout=120):
task = {"sitekey": sitekey, "website": website, "proxy": proxy}
if rqdata:
task["rqdata"] = rqdata
r = requests.post(f"{API}/createTask", json={"task": task}, headers=HEAD, timeout=30)
if r.status_code == 429:
raise RuntimeError(f"no free slot: {r.json()}") # retry later
if r.status_code == 402:
raise RuntimeError(f"key needs paying: {r.json()}") # final
r.raise_for_status()
task_id = r.json()["taskId"]
deadline = time.time() + timeout
while time.time() < deadline:
time.sleep(1)
res = requests.post(f"{API}/getResult", json={"taskId": task_id},
headers=HEAD, timeout=30).json()
if res["status"] == "success":
return res["solution"] # P1_... token
if res["status"] == "failed":
raise RuntimeError(res.get("message", "solve failed"))
raise TimeoutError(f"task {task_id} still processing after {timeout}s")
token = solve("a9b5fb07-92ff-493f-86fe-352a2803b3df", "discord.com",
"user:pass@host:port")
# submit it as the h-captcha-response form field