Kaptcha docs

One text prompt plus a SHA-256 proof of work. Issue a challenge, solve it, receive a signed ticket, verify the ticket server-side. Tickets are single-use when consumed.

1. Issue

GET /api/v1/challenge?bits=14
{"id":"…","prompt":"Type the third word of: …","pow_bits":14,"expires_at":1790000000}

2. Solve

POST /api/v1/solve
{"id":"…","answer":"lantern","nonce":"481923"}
{ "ok": true, "ticket": "eyJ…​.…", "expires_at": 1790000600 }

The nonce must satisfy sha256(id + ":" + sha256(answer) + ":" + nonce) with at least pow_bits leading zero bits. The bundled widget does this in a Web Worker.

3. Verify server-side

POST /api/v1/verify
{"ticket":"…","consume":true}
{"ok": true}

Embed

<div id="kaptcha"></div>
<script src="https://kaptcha.go-v.org/static/kaptcha.js"></script>
<script>Kaptcha.mount(document.getElementById('kaptcha'), {
  onSolved: function (ticket) { document.querySelector('[name=token]').value = ticket; }
});</script>

Limits

30-second challenge lifetime, 10-minute ticket lifetime, per-IP request limits, single use. Difficulty adapts from 8 to 20 bits. No images, no third-party scripts, no cookies.

Back to the demo