Twocaptcha connects to a Nagent workspace with an API key. Once it is connected, agents can call 5 Twocaptcha actions, such as "Create CAPTCHA Task", "Get Account Balance" and "Report Incorrect CAPTCHA". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Twocaptcha, with input parameters and output schema.
TWOCAPTCHA_CREATE_TASKCreates a new CAPTCHA-solving task and returns a taskId for retrieving results. Supports multiple captcha types: reCAPTCHA v2/v3, hCaptcha, image recognition, and more. After creating a task, use the returned taskId with getTaskResult to retrieve the solution. Requires sufficient account balance to process tasks.
Input parameters
Task object with 'type' field and type-specific parameters. Common types: 'ImageToTextTask' (requires 'body' as base64 image), 'RecaptchaV2TaskProxyless' (requires 'websiteURL' and 'websiteKey'), 'RecaptchaV3TaskProxyless' (requires 'websiteURL', 'websiteKey', 'minScore', 'pageAction'), 'HCaptchaTaskProxyless' (requires 'websiteURL' and 'websiteKey'). Example: {'type':'RecaptchaV2TaskProxyless','websiteURL':'https://example.com','websiteKey':'6Le-abc...'}
Your software ID from 2Captcha's Software Catalog.
Your 2Captcha API key (32-character hexadecimal string).
Your registered pingback URL to receive results.
Worker language preference: 'en' for English (default), 'rn' for Russian.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TWOCAPTCHA_GET_BALANCETool to retrieve your 2Captcha account balance in USD. Use when you need to check available funds before creating captcha-solving tasks.
Input parameters
Your 2Captcha API key (32-character hexadecimal string).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TWOCAPTCHA_REPORT_INCORRECTReport that a CAPTCHA solution was declined by the target website. Use this action to provide feedback when a solved CAPTCHA is rejected, enabling 2Captcha to improve accuracy and potentially issue refunds for incorrectly solved tasks.
Input parameters
The ID of the task that was incorrectly solved. This is the taskId returned from createTask.
Your 2Captcha API key (32-character hexadecimal string).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TWOCAPTCHA_REPORT_INCORRECT_IMAGE_CAPTCHAReport that an image captcha solution was incorrect. Alias for reportIncorrect method. Use this when you receive an incorrect captcha solution from 2Captcha to report the issue. Made for compatibility with certain software libraries. Successful reports may result in refunds.
Input parameters
The ID of the task to report as incorrect. Must be a valid task ID from a previous captcha solution.
Your 2Captcha API key (32-character hexadecimal string).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TWOCAPTCHA_TEST_REQUESTDebug method to verify how the API parses request parameters. Use when troubleshooting integration issues or validating parameter formats.
Input parameters
Your 2Captcha API key for authentication. This is the only required parameter.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 5 Twocaptcha actions on Nagent, including "Create CAPTCHA Task", "Get Account Balance" and "Report Incorrect CAPTCHA". Create CAPTCHA Task: Creates a new CAPTCHA-solving task and returns a taskId for retrieving results. Each action is listed on this page with its input parameters and its output.
Twocaptcha connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Create CAPTCHA Task takes 2 required inputs: task and clientKey. It also takes 3 optional inputs: softId, callbackUrl and languagePool. It returns data, error and successful.