gatesolve
Solve CAPTCHAs with x402 micropayments. Built for AI agents.
Install
pip install gatesolve
Quick Start
from gatesolve import GateSolve
gs = GateSolve()
# Solve a Cloudflare Turnstile CAPTCHA
solution = gs.solve(
captcha_type="turnstile",
sitekey="0x4AAAAAAAB...",
pageurl="https://example.com",
)
print(solution.token) # Use this to bypass the CAPTCHA
print(solution.solve_time) # e.g. "1.8s"
print(solution.payment.amount) # e.g. "0.02"
Async
import asyncio
from gatesolve import AsyncGateSolve
async def main():
async with AsyncGateSolve() as gs:
solution = await gs.solve(
captcha_type="turnstile",
sitekey="0x4AAAAAAAB...",
pageurl="https://example.com",
)
print(solution.token)
asyncio.run(main())
With Playwright
from gatesolve import GateSolve
from playwright.sync_api import sync_playwright
gs = GateSolve()
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("https://protected-site.com")
sitekey = page.locator("[data-sitekey]").get_attribute("data-sitekey")
solution = gs.solve(
captcha_type="turnstile",
sitekey=sitekey,
pageurl=page.url,
)
page.evaluate(f"""
document.querySelector('[name="cf-turnstile-response"]')
.value = '{solution.token}';
""")
page.click("button[type=submit]")
Configuration
gs = GateSolve(
base_url="https://api.gatesolve.dev", # API endpoint
wallet_address="0x...", # Your USDC wallet
network="base", # Base L2 (default)
max_price=0.05, # Max price per solve
timeout=30, # Timeout in seconds
max_retries=3, # Auto-retry on failure
)
Supported CAPTCHAs
| Type | SDK Name | Price |
|---|---|---|
| Cloudflare Turnstile | turnstile |
$0.02 |
| reCAPTCHA v2 | recaptcha_v2 |
$0.03 |
| reCAPTCHA v3 | recaptcha_v3 |
$0.02 |
| hCaptcha | hcaptcha |
$0.03 |
How x402 Works
- You call
gs.solve() - SDK sends request to GateSolve API
- API returns HTTP 402 with payment details
- SDK pays via USDC on Base L2
- API returns the CAPTCHA solution
No API keys. No accounts. The payment IS the authentication.
Error Handling
from gatesolve import GateSolve, SolveError, RateLimitError
gs = GateSolve()
try:
solution = gs.solve(...)
except RateLimitError as e:
print(f"Rate limited, retry in {e.retry_after}s")
except SolveError as e:
print(f"Solve failed: {e.message} (status: {e.status_code})")
Links
- Website: gatesolve.dev
- Docs: gatesolve.dev/docs
- Playground: gatesolve.dev/playground
- Twitter: @ArsonxDev
License
MIT
Metadata
Release files for gatesolve 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gatesolve-0.2.0.tar.gz | 5.4 kB | Without provenance | Details for gatesolve-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gatesolve-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for gatesolve-0.2.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / gatesolve-0.2.0.tar.gz
| Download URL | gatesolve-0.2.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2df89c7cbba39043f7001b874b5d13af3bdd400ddffafd3e5d6b2c304047bfb
|
|
BLAKE2b-256 checksum How to use checksums |
0c36f24c50401adcbb361b8e7d802884368dedcf35f2a89de10bd4dd3d8fae49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / gatesolve-0.2.0-py3-none-any.whl
| Download URL | gatesolve-0.2.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64a4907ca17e549c24c3d3743d59ff0a6359e3c99298f6d6434ec652abc48451
|
|
BLAKE2b-256 checksum How to use checksums |
cae2c846b1662fd030067e7dfa1d769610856f36b4b9c3fec1679d183fff8543
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for gatesolve 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.