skills$openclaw/2captcha
adinvadim2.2k

by adinvadim

2captcha – OpenClaw Skill

2captcha is an OpenClaw Skills integration for coding workflows. Solve CAPTCHAs using 2Captcha service via CLI. Use for bypassing captchas during web automation, account creation, or form submission.

2.2k stars274 forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

name2captcha
descriptionSolve CAPTCHAs using 2Captcha service via CLI. Use for bypassing captchas during web automation, account creation, or form submission. OpenClaw Skills integration.
owneradinvadim
repositoryadinvadim/2captcha
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @adinvadim/2captcha
last updatedFeb 7, 2026

Maintainer

adinvadim

adinvadim

Maintains 2captcha in the OpenClaw Skills directory.

View GitHub profile
File Explorer
3 files
.
_meta.json
275 B
README.md
3.9 KB
SKILL.md
3.3 KB
SKILL.md

name: 2captcha description: Solve CAPTCHAs using 2Captcha service via CLI. Use for bypassing captchas during web automation, account creation, or form submission. homepage: https://github.com/adinvadim/2captcha-cli

2Captcha Skill

Solve CAPTCHAs programmatically using the 2Captcha human-powered service.

Installation

# One-line install
curl -fsSL https://raw.githubusercontent.com/adinvadim/2captcha-cli/main/solve-captcha \
  -o /usr/local/bin/solve-captcha && chmod +x /usr/local/bin/solve-captcha

# Verify
solve-captcha --version

Configuration

# Save your 2Captcha API key
mkdir -p ~/.config/2captcha
echo "YOUR_API_KEY" > ~/.config/2captcha/api-key

# Or use environment variable
export TWOCAPTCHA_API_KEY="your-key"

Get your API key at https://2captcha.com/enterpage

Quick Reference

Check Balance First

./solve-captcha balance

Image CAPTCHA

# From file
./solve-captcha image /path/to/captcha.png

# From URL  
./solve-captcha image "https://site.com/captcha.jpg"

# With options
./solve-captcha image captcha.png --numeric 1 --math
./solve-captcha image captcha.png --comment "Enter red letters only"

reCAPTCHA v2

./solve-captcha recaptcha2 --sitekey "6Le-wvk..." --url "https://example.com"

reCAPTCHA v3

./solve-captcha recaptcha3 --sitekey "KEY" --url "URL" --action "submit" --min-score 0.7

hCaptcha

./solve-captcha hcaptcha --sitekey "KEY" --url "URL"

Cloudflare Turnstile

./solve-captcha turnstile --sitekey "0x4AAA..." --url "URL"

FunCaptcha (Arkose)

./solve-captcha funcaptcha --public-key "KEY" --url "URL"

GeeTest

# v3
./solve-captcha geetest --gt "GT" --challenge "CHALLENGE" --url "URL"

# v4
./solve-captcha geetest4 --captcha-id "ID" --url "URL"

Text Question

./solve-captcha text "What color is the sky?" --lang en

Finding CAPTCHA Parameters

reCAPTCHA sitekey

Look for:

  • data-sitekey attribute in HTML
  • k= parameter in reCAPTCHA iframe URL
  • Network request to google.com/recaptcha/api2/anchor

hCaptcha sitekey

Look for:

  • data-sitekey in hCaptcha div
  • Network requests to hcaptcha.com

Turnstile sitekey

Look for:

  • data-sitekey in Turnstile widget
  • cf-turnstile class elements

Workflow for Browser Automation

  1. Detect CAPTCHA - Check if page has captcha element
  2. Extract params - Get sitekey/challenge from page source
  3. Solve via CLI - Call solve-captcha with params
  4. Inject token - Set g-recaptcha-response or callback

Example: Inject reCAPTCHA Token

// After getting token from solve-captcha
document.getElementById('g-recaptcha-response').value = token;
// Or call callback if defined
___grecaptcha_cfg.clients[0].callback(token);

Cost Awareness

  • Check balance before heavy automation
  • Image: ~$0.001 per solve
  • reCAPTCHA/hCaptcha/Turnstile: ~$0.003 per solve

Error Handling

Common errors:

  • ERROR_ZERO_BALANCE - Top up account
  • ERROR_NO_SLOT_AVAILABLE - Retry in few seconds
  • ERROR_CAPTCHA_UNSOLVABLE - Bad image or impossible captcha
  • ERROR_WRONG_CAPTCHA_ID - Invalid task ID

Notes

  • Solving takes 10-60 seconds depending on type
  • reCAPTCHA v3 may need multiple attempts for high scores
  • Some sites detect automation - use carefully
  • Tokens expire! Use within 2-5 minutes
README.md

solve-captcha

Solve CAPTCHAs from the command line using 2Captcha human-powered service.

Features

  • 10 captcha types — Image, reCAPTCHA v2/v3, hCaptcha, Turnstile, FunCaptcha, GeeTest, Amazon WAF
  • Zero dependencies — Pure Python 3 stdlib
  • Human-first design — Clear output, helpful errors, progress indicators
  • Script-friendly--json output, proper exit codes, --quiet mode
  • Flexible config — Flag > env > config file precedence

Installation

# Quick install (one line)
curl -fsSL https://raw.githubusercontent.com/adinvadim/2captcha-cli/main/solve-captcha \
  -o /usr/local/bin/solve-captcha && chmod +x /usr/local/bin/solve-captcha

# Or with Homebrew (coming soon)
# brew install adinvadim/tap/solve-captcha

# Or clone manually
git clone https://github.com/adinvadim/2captcha-cli.git
cd 2captcha-cli
chmod +x solve-captcha
sudo ln -s $(pwd)/solve-captcha /usr/local/bin/

Configuration

API key lookup order:

  1. --api-key / -k flag
  2. TWOCAPTCHA_API_KEY environment variable
  3. ~/.config/2captcha/api-key file
# Option 1: Environment
export TWOCAPTCHA_API_KEY="your-key"

# Option 2: Config file
mkdir -p ~/.config/2captcha
echo "your-key" > ~/.config/2captcha/api-key

Usage

Quick examples

# Image captcha
solve-captcha image captcha.png
solve-captcha image https://example.com/captcha.jpg --math

# reCAPTCHA v2
solve-captcha recaptcha2 -s 6Le-wvkSAAAA... -u https://example.com

# hCaptcha
solve-captcha hcaptcha -s a5f74b19-9e45... -u https://example.com

# Cloudflare Turnstile
solve-captcha turnstile -s 0x4AAA... -u https://example.com

# Check balance
solve-captcha balance

Commands

CommandDescription
image <file|url>Solve image captcha (OCR)
recaptcha2Solve reCAPTCHA v2
recaptcha3Solve reCAPTCHA v3
hcaptchaSolve hCaptcha
turnstileSolve Cloudflare Turnstile
funcaptchaSolve Arkose Labs FunCaptcha
geetestSolve GeeTest v3
geetest4Solve GeeTest v4
amazonSolve Amazon WAF CAPTCHA
text <question>Solve text question
balanceCheck account balance

Global flags

FlagDescription
-h, --helpShow help
-V, --versionShow version
-k, --api-keyAPI key (overrides env/config)
-j, --jsonOutput full JSON response
-q, --quietSuppress progress output
-v, --verboseVerbose debug output
-t, --timeoutTimeout in seconds (default: 180)
--no-colorDisable colored output

Image captcha options

solve-captcha image captcha.png [options]
OptionDescription
--phraseAnswer contains multiple words
--case-sensitiveCase-sensitive answer
--numeric N0=any, 1=numbers, 2=letters, 3=either, 4=both
--mathRequires calculation
--min-length NMinimum answer length
--max-length NMaximum answer length
--comment TEXTInstructions for solver
--lang LANGLanguage pool (en, rn)

Output

Human mode (default)

$ solve-captcha image captcha.png
Submitting image captcha...
Solving... 12s
✓ Solved in 0.00025 USD
abc123

JSON mode

$ solve-captcha --json image captcha.png
{
  "errorId": 0,
  "status": "ready",
  "solution": {"text": "abc123"},
  "cost": "0.00025"
}

Quiet mode (for scripts)

TOKEN=$(solve-captcha -q recaptcha2 -s KEY -u URL)

Exit codes

CodeMeaning
0Success
1General error
2Invalid usage / missing args
3Timeout
4Authentication error
130Interrupted (Ctrl-C)

Environment

Respects standard conventions:

  • NO_COLOR — Disable colors
  • TERM=dumb — Disable colors
  • Non-TTY stderr — Disable progress/colors

License

MIT © Vadim Kostin (@adinvadim)

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

Configuration

```bash

FAQ

How do I install 2captcha?

Run openclaw add @adinvadim/2captcha in your terminal. This installs 2captcha into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/adinvadim/2captcha. Review commits and README documentation before installing.