DEV Community

Arson
Arson

Posted on

I Built a CAPTCHA Solver That AI Agents Pay For With Crypto (No API Keys)

Every AI agent builder hits the same wall: your agent navigates to a website, and a CAPTCHA appears. Game over.

The standard fix? Sign up for a captcha-solving service, get API keys, manage billing, handle rate limits. Your "autonomous" agent now depends on a human managing a SaaS subscription.

I wanted something different.

The Problem

AI agents are getting really good at browsing the web. Tools like Playwright, Puppeteer, and browser-use make it trivial to automate complex workflows. But CAPTCHAs are designed to stop exactly this.

The existing solutions all share the same friction:

Service Problem
2Captcha API keys, account signup, manual billing
Anti-Captcha Same — plus slow solve times
CapSolver Same model, different name
Self-hosted AI solvers You maintain GPU infra for vision models

What if an agent could just... pay for the solve directly? No accounts. No keys. Just HTTP.

Enter x402

HTTP status code 402 has been "reserved for future use" since 1996. Coinbase finally gave it a purpose: native web payments.

Here's how it works:

Agent: POST /api/v1/solve
Server: 402 Payment Required
        X-Payment-Required: {"amount": "0.02", "currency": "USDC", "network": "base"}

Agent: *pays 0.02 USDC on Base*

Agent: POST /api/v1/solve (with payment proof header)
Server: 200 OK {"token": "solved_captcha_token", "solvedIn": "2.3s"}
Enter fullscreen mode Exit fullscreen mode

No API keys. No OAuth. No accounts. The payment IS the authentication.

What I Built

GateSolve is a CAPTCHA solving API built natively on x402. Here's what it supports:

  • Cloudflare Turnstile — $0.02/solve
  • reCAPTCHA v2/v3 — $0.03/solve
  • hCaptcha — $0.03/solve
  • Average solve time: under 3 seconds

Python SDK

from gatesolve import GateSolve

client = GateSolve()

solution = client.solve(
    type="cloudflare-turnstile",
    site_key="0x4AAAAAAABkMYinukE8nzYS",
    page_url="https://example.com",
    max_price=0.05  # agent won't pay more than this
)

print(solution.token)  # use this to bypass the CAPTCHA
Enter fullscreen mode Exit fullscreen mode

MCP Server

For AI coding tools (Claude Desktop, Cursor, Windsurf):

{
  "mcpServers": {
    "gatesolve": {
      "command": "npx",
      "args": ["@gatesolve/mcp-server"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Your AI assistant can now solve CAPTCHAs as a tool call.

Why x402 Over Traditional APIs?

  1. No vendor lock-in — x402 is an open protocol, not a proprietary API
  2. Agent-native — agents handle crypto payments natively; they can't fill out registration forms
  3. Instant settlement — USDC on Base settles in seconds, not days
  4. Price transparency — the 402 response tells you exactly what you'll pay before you pay it
  5. Max price guards — agents set spending limits, preventing surprise bills

The Bigger Picture

We're watching a shift from "how do I bypass CAPTCHAs?" to "how do agents pay for web access?"

AWS just published a blog about x402 for financial services. Stellar adopted it. Stripe just launched official x402 support. There are now three competing agent payment standards (x402, ACP, UCP). The web is being re-architected for agents.

CAPTCHAs are just the first gate. Soon agents will x402-pay for:

  • Premium API access
  • Compute resources
  • Data feeds
  • Any paywalled content

Open Source

Everything is open source:

We're on the waitlist right now. Join if you're building agents that need to get past CAPTCHAs.


Built by @ArsonxDev. Shipping in public.

Top comments (0)