IRCaptcha REST API

Operator reference · v1.0.0

REST API reference

Self-hosted captcha solver over HTTP. Base URL public: https://ircaptcha.isrealllairdrop.net · local: http://127.0.0.1:8877

FastAPI OpenAPI 3 11 solver types Bearer on /solve · /status · /logs Public /health · /docs · /redoc · /api-docs · /ui

Authentication

Bearer token enforced at nginx on the public domain. Localhost has no auth.

ScopeAuthNotes
GET /, /health, /docs, /redoc, /openapi.json, /api-docs Public Dashboard, liveness, interactive docs
POST /solve, GET /status, GET /logs Bearer required Missing/invalid token → 403
# Header on every protected call
Authorization: Bearer <SOLVER_TOKEN>

# Token lives on the server (chmod 600), not in this page:
# /root/projects/captcha-solver/.solver-token.env

Dashboard stores the token in localStorage on your browser only. Never commit or paste the raw token into chat logs.

Endpoints

All JSON. Content-Type for POST: application/json.

MethodPathAuthDescription
GET /health public Liveness + supported types
GET /status Bearer Per-type online map + in-flight jobs
GET /logs?lines=50 Bearer Recent solve events (ring buffer, max 100 kept; lines 1–200)
POST /solve Bearer Solve captcha — dispatch by type
GET /docs public Swagger UI (Try it out + Authorize)
GET /redoc public ReDoc reference
GET /openapi.json public Raw OpenAPI schema

POST /solve — body fields

Required fields depend on type. SSRF guard rejects private/loopback URLs unless SOLVER_ALLOW_PRIVATE=1.

FieldTypeUsed byNotes
typestringallRequired. Dispatch key.
sitekeystringturnstile / recaptcha / hcaptchaRequired for widget types. Not used by page-level types.
urlstringmostPage / origin. Required except botguard/perimeterx/aliyun defaults.
actionstringturnstile / recaptcha / hcaptchareCAPTCHA action; hCaptcha "invisible" selects invisible path.
cdatastringturnstileCustomer data bound into token.
real_pageboolturnstile / recaptcha / hcaptchaDrive live target page instead of stub.
timeout_sintallDeadline seconds (default 60). Expiry → HTTP 408.
proxystringcloudflare / awswaf / datadome / px / akamai / …scheme://user:pass@host:port. Cookie solvers are IP-bound.
pre_actionsarrayreal_page / page-level[{type, selector, value, timeout}] — click/fill/select/press/wait
post_fetcharrayreal_pageSame-session API calls after solve. Use __TOKEN__ placeholder.
versionstringrecaptchav2 | v3 | invisible (default v2)
enterpriseboolrecaptchaLoad enterprise.js
secretstringrecaptcha v3Optional site secret to also return score
verify_url / verify_payloadturnstileSolve-and-verify from same session
email / passwordstringbotguardGoogle OAuth flow token harvest
refererstringdatadomeFraming referer for correct config
render_flowstringperimeterxDefault outlook_signup
scene_id / prefix / regionstringaliyunRequired scene_id + prefix; region sgp|cn|intl
public_keystringarkoseRequired. Arkose site public key from target embed.
url / page_urlstringarkosePage that must fire /fc/gfct/ (either field accepted).
game_typestringarkoseOptional hint (default 4). Live type still comes from gfct.

Arkose: surl / max_waves are not request fields (older docs were wrong). Service URL auto-detects from gfct; waves capped internally at 10. Multi-wave solves often need timeout_s 90–120.

Captcha types

Pass as type on POST /solve.

typeNeedsReturns (success)Status
turnstilesitekey + urltokenPASS
recaptchasitekey + url (+ version)token (+ score if secret)MIXED — v3 OK · v2 image fail
hcaptchasitekey + urltokenPASS
cloudflareurl (+ proxy)cf_clearance + cookies + UAPASS
awswafurl (+ proxy)aws-waf-token / cookiesPASS
botguardemail (+ password optional)bgRequest token + cookiesPASS
datadomeurl + referer (+ proxy)datadome cookiePASS
perimeterxproxy (+ render_flow)_px3PASS
akamaiurl (+ proxy)_abckPASS
aliyunscene_id + prefixtoken_obj / token JSONPASS
arkosepublic_key + url/page_urltoken (fc_token) + variant + wavesMIXED — models 23/24 · full E2E needs real gfct page

Honest matrix: reCAPTCHA v2 image is still failing on the free path. Arkose ONNX pack is production-ready for classify (23/24 variants from funcaptchamodel.unix.do); full token harvest needs a live target that fires /fc/gfct/ — public demos usually do not. Missing model: threed_rollball_animal.onnx.

Response contract

Two rules cover every response. Never mix them.

HTTP 200 — solve ran

{
  "type": "turnstile",
  "solved": true,
  "token": "…",
  "method": "route",
  "elapsed": 4.1
}

Read solved. Failures that still ran are 200 with solved:false + error.

4xx / 5xx — request never solved

{
  "detail": "url is required"
}

No solved field. See error table below.

cURL examples

Replace $TOKEN. Do not hardcode secrets in scripts that get committed.

# Health (public)
curl -sS https://ircaptcha.isrealllairdrop.net/health

# Status (Bearer)
curl -sS https://ircaptcha.isrealllairdrop.net/status \
  -H "Authorization: Bearer $TOKEN"

# Logs (last 20)
curl -sS "https://ircaptcha.isrealllairdrop.net/logs?lines=20" \
  -H "Authorization: Bearer $TOKEN"

# Turnstile
curl -sS -X POST https://ircaptcha.isrealllairdrop.net/solve \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "turnstile",
    "sitekey": "0x4AAAAAAA…",
    "url": "https://target.com"
  }'

# reCAPTCHA v3 Enterprise
curl -sS -X POST https://ircaptcha.isrealllairdrop.net/solve \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "recaptcha",
    "version": "v3",
    "enterprise": true,
    "sitekey": "6Lc…",
    "url": "https://target.com",
    "action": "login"
  }'

# Cloudflare clearance (IP-bound — pass proxy)
curl -sS -X POST https://ircaptcha.isrealllairdrop.net/solve \
  -H "Authorization: Bearer ***" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "cloudflare",
    "url": "https://protected.example.com",
    "proxy": "http://user:pass@host:port",
    "timeout_s": 60
  }'

# Arkose FunCaptcha — needs real page that fires /fc/gfct/ (placeholder will fail honestly)
curl -sS -X POST https://ircaptcha.isrealllairdrop.net/solve \
  -H "Authorization: Bearer ***" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "arkose",
    "public_key": "A0DE7B75-1138-44F2-B132-ED188CEB66F3",
    "url": "https://login.example.com/login",
    "timeout_s": 120
  }'

# Local (no Bearer needed on :8877)
curl -sS -X POST http://127.0.0.1:8877/solve \
  -H "Content-Type: application/json" \
  -d '{"type":"turnstile","sitekey":"0x4AAAAAAA…","url":"https://target.com"}'

Errors

CodeWhen
400Unsupported type, missing sitekey/url/scene_id, SSRF-blocked host
403Public domain without valid Bearer (nginx)
408Exceeded timeout_s
422Body failed schema validation
500Unhandled solver crash

Operator notes

  • Cookie solvers (cloudflare, awswaf, datadome, perimeterx, akamai): replay from the same proxy IP + matching UA/TLS when possible.
  • Success signal: always read top-level solved — do not branch only on token (cloudflare uses cf_clearance).
  • Interactive docs: open /docs, click Authorize, paste Bearer, then Try it out. Operator HTML: /api-docs.
  • Dashboard: //ui stores token in localStorage and calls the same REST endpoints.
  • Arkose: models from funcaptchamodel.unix.do (23/24 loadable). No public full-E2E demo. See arkose/README.md.
  • Scope: solver harvests tokens/cookies only — account creation / form recon is the caller's job.