Docs

API reference

Use the OneForCaptcha REST API to submit a CAPTCHA and read back the solved token. Authenticate programmatic calls with an API key you create in the dashboard.

Authentication

Programmatic requests are authenticated with an API key. Create one from API keys in your dashboard. Send it in the X-API-KEY request header — this is the only accepted method.

X-API-KEY: ofc_live_xxx

Never put your API key in a URL (e.g. ?api-key=...) — query strings are written in plain text to server access logs, proxy logs, and browser history, and are the single most common way API keys leak. Query parameter authentication is not supported: a request that sends the key only as ?api-key=... is rejected with 400 Bad Request.

Base URL

https://oneforcaptcha.com
POST/createTask

Submits a CAPTCHA for solving and holds its price (hold) from your balance. Returns a task id you poll with /getTaskResult.

ParameterRequiredDescription
X-API-KEYYesCustomer key — request header, never a URL parameter
typeYesimage_to_text | recaptcha_v2 | recaptcha_v3 | recaptcha_enterprise | hcaptcha | funcaptcha | geetest | turnstile | aws_waf | datadome
site_keyNoThe site’s captcha widget key, when applicable (e.g. reCAPTCHA, hCaptcha, Turnstile)
site_urlNoThe page URL where the captcha is served
curl -X POST "https://oneforcaptcha.com/createTask" \
  -H "X-API-KEY: $KEY" \
  -d '{"type":"recaptcha_v2","site_key":"6Le...","site_url":"https://example.com"}'

# 200
{ "task_id": "task_a1b2c3" }
GET/getTaskResult

Returns the current status of a task. Poll every 2–5 seconds until status is "ready". The charge is captured only once the captcha is solved; if it fails or expires, the hold is released.

ParameterRequiredDescription
X-API-KEYYesCustomer key — request header, never a URL parameter
task_idYesThe id returned by /createTask
curl "https://oneforcaptcha.com/getTaskResult?task_id=task_a1b2c3" -H "X-API-KEY: $KEY"

# 200 (still working)
{ "status": "processing", "solution": null }

# 200 (solved)
{ "status": "ready", "solution": "03AGdBq26…" }
GET/getBalance

Returns your current prepaid balance.

ParameterRequiredDescription
X-API-KEYYesCustomer key — request header, never a URL parameter
curl -H "X-API-KEY: $KEY" "https://oneforcaptcha.com/getBalance"

# 200
{ "balance": 42.50, "currency": "USD" }

Dashboard API

Wallet, transaction history, key management and billing endpoints live under /api/v1/* and are authenticated with the session cookie plus a CSRF token.