osec Captcha: Invisible, private captcha. A drop-in reCAPTCHA swap
reCAPTCHA's free tier dropped to 10,000 checks a month. osec Captcha makes the visitor's browser solve a small proof-of-work puzzle instead: no image puzzles, no tracking cookies, no Google.
What it does
- No puzzles for people, no cookies, no tracking
- reCAPTCHA-style /siteverify: swap in a few lines
- Difficulty rises for IPs that hammer your forms
- Works with plain HTML forms, React and WordPress
What goes in, what comes out
- What goes in
- A widget in your form with your site key. On submit your server receives the field osec-captcha-response and posts it with your secret.
- What comes out
- {"success": true, "error-codes": [], "challenge_ts": "..."}, the same shape as reCAPTCHA's siteverify.
- Example
- curl -X POST https://api.osec.one/tools/captcha/siteverify -d secret=oss_YOUR_SECRET -d response="$OSEC_CAPTCHA_RESPONSE"
- Limits
- Each solution works once and expires after 10 minutes. Verifications are not counted against the request quota and are limited to 10 per second per IP address. It raises the cost of automated form posts; a person paid to fill forms still gets through.
How to set it up
Invisible proof-of-work: the browser solves a small puzzle, people see a check mark. A drop-in for reCAPTCHA's siteverify.
- Console → Site keys → New key (list your hostnames). Copy the secret.
- Add the widget inside your form and load the script.
- On submit your server gets the field osec-captcha-response.
- POST it with your secret to /captcha/siteverify. Accept the form only if success is true.
- Coming from reCAPTCHA: change the script, the field name and the verify URL. The response shape is the same.
html
<form action="/contact" method="post">
<input name="email">
<div class="osec-captcha" data-sitekey="osk_YOUR_SITEKEY"></div>
<button>Send</button>
</form>
<script src="https://osec.one/assets/osec-captcha/osec-captcha.js" async defer></script>bash: verify on your server
curl -X POST https://api.osec.one/tools/captcha/siteverify -d secret=oss_YOUR_SECRET -d response="$OSEC_CAPTCHA_RESPONSE"
# {"success": true, "error-codes": [], "challenge_ts": "..."}Good to know
- Each solution works once and expires after 10 minutes.
- Error codes: invalid-input-secret, missing-input-response, invalid-input-response, timeout-or-duplicate, sitekey-mismatch.
- Verification calls are not counted against your daily quota. They are limited to 10 per second per IP address.
- Difficulty per key (Site keys → Snippets). It rises automatically for IPs that ask for many puzzles.
- JS API: osecCaptcha.render(el, {sitekey}), osecCaptcha.getResponse(), osecCaptcha.reset(), data-callback="fn".