canonical: https://jentic.com/apis/2captcha.com/2captcha

# 2Captcha API

Jentic publishes the only available OpenAPI specification for 2Captcha API, keeping it validated and agent-ready. 2Captcha is a captcha-solving service that resolves reCAPTCHA v2 and v3, hCaptcha, Cloudflare Turnstile, image-to-text, FunCaptcha, and other challenge types through a small task-based REST API. Agents submit a task with the captcha parameters, poll for the solved token or text, and then use that token to complete the protected form or API request. The service also exposes account balance lookups and a reporting endpoint for grading good and bad solutions, which feeds back into solver accuracy.

## For AI agents

Solve reCAPTCHA, hCaptcha, Cloudflare Turnstile, and image captchas on behalf of a workflow by submitting a task and polling for the solution token.

## Scope

Does not scrape pages, render JavaScript, rotate proxies, or verify captchas on your own site - use for solving third-party captcha challenges only.

## Capabilities

- Submit reCAPTCHA v2, reCAPTCHA v3, hCaptcha, and Cloudflare Turnstile tasks for human or AI-assisted solving
- Solve image-to-text and FunCaptcha challenges encountered while scraping or automating browser flows
- Poll task status and retrieve the resulting captcha token, gRecaptchaResponse, or text answer once ready
- Check the prepaid account balance before queuing a batch of expensive captcha types
- Report incorrectly solved tasks to receive a refund and improve the worker pool's accuracy
- Receive solved captcha results via a callbackUrl webhook instead of polling getTaskResult

## Use cases

### Web Scraping Behind reCAPTCHA

Scrapers and data-collection agents frequently hit reCAPTCHA v2 or v3 challenges when fetching pricing, listings, or public records. With the 2Captcha API the agent posts the site key and page URL to /createTask using a RecaptchaV2TaskProxyless task, polls /getTaskResult every few seconds until the status is ready, and injects the returned gRecaptchaResponse token into the target form. Solving typically completes in 15-45 seconds depending on captcha type and load.

Example prompt: Call /createTask with a RecaptchaV2TaskProxyless task containing the websiteURL and websiteKey, poll /getTaskResult until status is 'ready', and return the gRecaptchaResponse token to the calling scraper

### Automated Account Sign-Up Flows

QA agents and onboarding bots that create test accounts on third-party services often need to clear an hCaptcha or Turnstile challenge during sign-up. 2Captcha accepts a HCaptchaTaskProxyless or TurnstileTaskProxyless task with the page URL and site key, returns a token via /getTaskResult, and the agent submits the registration form with that token attached. End-to-end the captcha step usually adds under a minute to the sign-up flow.

Example prompt: Submit a TurnstileTaskProxyless task to /createTask with the registration page URL and Turnstile sitekey, then poll /getTaskResult and return the resulting token to the sign-up form handler

### Cost Control and Accuracy Feedback

Operations teams running large captcha-solving workloads need to monitor spend and prune incorrect solutions. /getBalance returns the current prepaid balance so an agent can throttle or pause submissions when funds run low, and /reportIncorrect refunds the cost of solutions that did not work on the target site, which also signals the worker pool to retrain. Together these two endpoints let an agent close the loop on cost and quality without leaving the API.

Example prompt: Call /getBalance and if the value is below 1.0 USD send an alert; for any solution that failed on the target site, call /reportIncorrect with the original taskId to claim a refund

### AI Agent Captcha Resolver via Jentic

An AI agent driving a browser or HTTP workflow through Jentic can treat 2Captcha as a drop-in captcha resolver. The agent searches Jentic for 'solve a captcha', loads the createTask schema, executes the call with the site key and URL it scraped from the page, then loads getTaskResult and polls until ready. The 2Captcha API key lives in your Jentic One instance, so the agent never sees the raw clientKey value - Jentic injects it into the request at execution time.

Example prompt: Search Jentic for 'solve a captcha', load the 2captcha createTask and getTaskResult operations, submit the captcha task, and poll until the solution token is returned

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /createTask | Create a captcha solving task |
| POST | /getTaskResult | Poll for the result of a submitted task |
| POST | /getBalance | Get the current account balance |
| POST | /reportCorrect | Report a correctly solved task |
| POST | /reportIncorrect | Report an incorrectly solved task and request a refund |

## Key resources

- **Tasks** — Submit captcha solving tasks via /createTask and retrieve solutions via /getTaskResult. Supports reCAPTCHA v2/v3, hCaptcha, Turnstile, image-to-text, and other task types.
- **Account** — Inspect the prepaid account balance via /getBalance to gate further submissions on remaining funds.
- **Reports** — Grade completed tasks via /reportCorrect and /reportIncorrect to refund bad solutions and improve solver accuracy.

## Why Jentic

- **Setup:** Wiring the 2Captcha API by hand means managing its client key, submitting a task and then polling getTaskResult for the solution yourself. Through Jentic you install once, import the 2Captcha API from the API Directory, store the client key once, and your agent calls it.
- **Permission scoping:** 2Captcha carries the task and its type in the request body rather than a resource id in the path, so limit the agent to the operations it needs, such as creating a task and getting its result, and leave out balance checks or result reporting unless you add them. You choose the allowed set, so only the operations you pick can run.
- **Credential handling:** Your 2Captcha client key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'solve a recaptcha' or 'get a captcha result', and Jentic returns the matching 2Captcha operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Anti-Captcha API** — Direct competitor with a near-identical createTask / getTaskResult flow.
- **hCaptcha API** — Issuer side of the hCaptcha challenges that 2Captcha solves.
- **ScraperAPI** — Proxy-rotating scraping API that pairs with 2Captcha when scraping protected pages.
- **Browserless** — Headless Chrome as a service for automating the browser flow that hits the captcha.

## FAQ

### Why is there no official OpenAPI spec for 2Captcha API?

2Captcha does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call 2Captcha API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the 2Captcha API use?

The 2Captcha API uses an API key passed as the clientKey field in the JSON body of every request, not as a header. There is no OAuth or bearer token. Through Jentic the clientKey is stored encrypted in your Jentic One instance and injected into the request at execution time, so the agent never sees the raw key value.

### Can I solve reCAPTCHA v3 with the 2Captcha API?

Yes. Submit a RecaptchaV3TaskProxyless task to /createTask with the websiteURL, websiteKey, the action name, and your minimum acceptable score (typically 0.3 or 0.7), then poll /getTaskResult until status is 'ready' to retrieve the gRecaptchaResponse token. The same five-endpoint flow handles reCAPTCHA v2, hCaptcha, Turnstile, and image captchas - only the task type changes.

### How do I poll for a captcha solution through Jentic?

Use Jentic's search to find the operation ('solve a captcha' or 'get captcha result'), load the getTaskResult schema, then execute it with the taskId returned from createTask. 2Captcha's docs recommend a first poll after about 5 seconds and additional polls every 5 seconds until the response status field is 'ready', at which point the solution field contains the token or text.

### What are the rate limits for the 2Captcha API?

The OpenAPI spec does not declare numeric rate limits. In practice 2Captcha throttles by account: getTaskResult should be polled no more often than every 5 seconds per task, and very high createTask submission rates may be slowed under heavy load. Concurrency limits depend on your account tier - check your dashboard for the current cap.

### How do I get a refund for a bad captcha solution?

Call /reportIncorrect with the taskId of the solution that did not work on the target site. 2Captcha will refund the cost of that task and feed the signal back to the worker pool. Report only solutions that genuinely failed - abusing reportIncorrect can lead to account restrictions.

### Is the 2Captcha API free?

No. 2Captcha is a prepaid service - you top up a balance and each solved captcha deducts a small amount (rates vary by task type, with image captchas cheapest and reCAPTCHA / hCaptcha more expensive). Use /getBalance to read the current balance from your code so you can gate submissions when funds run low.

### Can I limit what my agent is allowed to do with the 2Captcha API?

Yes. Because you run Jentic One yourself, your own rules decide which 2Captcha operations and credentials the agent can use, and only the operations you pick can run. Since 2Captcha carries the task and its type in the request body rather than a resource id in the path, you scope by operation: allow just creating a task with /createTask and reading its result with /getTaskResult, and leave out /getBalance, /reportCorrect, and /reportIncorrect unless you add them. The client key stays with your instance and is injected at execution time, so the agent can only call the endpoints you have permitted.
