← Back to all APIs

Verify Semaphore

$0.001

Verify a Semaphore ZK proof locally using Groth16 (embedded official vkey). No external dependency — pure on-device verification. Accepts the standard Semaphore proof format with merkleTreeDepth, merkleTreeRoot, nullifier, message, scope, and points.

POST https://x402.freeq.one/tools/verify_semaphore
Request body
JSON
{
  "proof": {
    "merkleTreeDepth": 20,
    "merkleTreeRoot": "0x...",
    "nullifier": "0x...",
    "message": "0x...",
    "scope": "0x...",
    "points": ["0x...", "0x...", "0x...", "0x...", "0x...", "0x...", "0x...", "0x..."]
  }
}
Try it (x402 payment flow)
curl -X POST https://x402.freeq.one/tools/verify_semaphore \ -H "Content-Type: application/json" \ -d '{"proof":{"merkleTreeDepth":20,"merkleTreeRoot":"0x1","nullifier":"0x1","message":"0x1","scope":"0x1","points":["0x1","0x1","0x1","0x1","0x1","0x1","0x1","0x1"]}}'

Without payment, the server returns 402 Payment Required with x402 challenge details. A paying agent signs a USDC transaction on Base and retries with the payment header.

Response example
JSON
{
  "valid": true,
  "method": "semaphore-official-vkey",
  "duration_ms": 2729,
  "timestamp": "2026-08-21T05:46:34.286Z"
}