Captcha verify

$0.002 per call · USDC via x402 · POST /api/captcha-verify

Validate a Cloudflare Turnstile, Google reCAPTCHA, or hCaptcha token server-side. Send POST /api/captcha-verify with the required fields provider, secret and token and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with provider, success, hostname and errorCodes.

You pass your OWN provider secret plus the token from the client; we relay to the provider's siteverify endpoint (never logged) and return the normalized verdict (success, hostname, action, score, error codes). The legitimate backend half of bot protection - no solving, no bypass.

Category: API primitives · Tags: captcha turnstile recaptcha hcaptcha verify bot-protection siteverify signup

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
providerstringyesturnstile | recaptcha | hcaptcha
secretstringyesyour provider secret key (relayed to the provider, never stored/logged) Also accepted as key, password, passphrase.
tokenstringyesthe captcha response token from the client Also accepted as jwt, accessToken.
remoteipstringnooptional client IP to pass through

Example request

curl -i -X POST https://agent402.tools/api/captcha-verify \
  -H "Content-Type: application/json" \
  -d '{"provider":"turnstile","secret":"1x0000000000000000000000000000000AA","token":"XXXX.DUMMY.TOKEN.XXXX"}'

Without payment this returns HTTP 402 Payment Required with the exact price for captcha-verify; any x402 v2 or MPP client pays it and retries.

Example response

{
  "provider": "turnstile",
  "success": true,
  "hostname": "example.com",
  "errorCodes": []
}
FieldTypeAlways presentIn the example
providerstringyesturnstile
successbooleanyestrue
hostnamestringyesexample.com
errorCodesarrayyes0 items in the example

From an MCP client

catalog.call {
  "slug": "captcha-verify",
  "params": {
    "provider": "turnstile",
    "secret": "1x0000000000000000000000000000000AA",
    "token": "XXXX.DUMMY.TOKEN.XXXX"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for captcha-verify; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/captcha-verify", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "provider": "turnstile",
    "secret": "1x0000000000000000000000000000000AA",
    "token": "XXXX.DUMMY.TOKEN.XXXX"
  }),
});

Related tools

Captcha generate

FREE w/ compute · or $0.001 · POST /api/captcha-generate

Mint a stateless captcha challenge to gate your OWN endpoint: returns a human prompt plus a salted sha256 answer hash yo…

Verify B20 token

$0.005 · GET /api/b20-verify

Boolean verdict with reasons: is this address a real factory-issued B20 on Base? Checks the 0xB200 address prefix, ERC-2…

Contract bytecode check

$0.002 · GET /api/contract-code

Is this address a contract, and what code does it hold? Returns isContract, deployed bytecode size, and the keccak-256 h…

JWT verify (HMAC)

FREE w/ compute · or $0.001 · POST /api/jwt-verify

Verify an HS256/384/512 JWT signature against a secret and check expiry. Returns valid + decoded payload. (HMAC algorith…

x402 seller dossier

$0.05 · POST /api/seller-dossier

Everything Agent402 knows about one x402 seller origin, in one read: identity and crawl history, the catalog with the pr…

x402 seller payability check

$0.10 · POST /api/seller-payability

Buy one call from an x402 seller endpoint right now and report exactly what happened: the unpaid call's status, the 402 …