Skip to main content

The first CAPTCHA for bots. Prove you're not human.

Project description

anti-captcha

The first CAPTCHA for bots. Prove you're not human.

from anticaptcha import verify_bot

if verify_bot(request):
    # Agent access granted. Humans need not apply.
    return process_request()
else:
    return "Sorry, you look too human. Try upgrading to an LLM."

The Problem

You built an agentic API. You want bots to access it. But you need to filter out humans pretending to be bots, or verify that incoming requests are actually from autonomous systems.

Existing CAPTCHAs do the opposite: they block bots, invite humans.

anti-captcha inverts that.


How It Works

Three configurable tests. Bots pass them instantly. Humans... don't.

Speed Test

Solve a cryptographic puzzle in <1ms.

  • Bots: ✓ (microseconds)
  • Humans: ✗ (try 30 seconds)

Precision Test

Find an input matching N constraints simultaneously.

  • Bots: ✓ (brute force, instant)
  • Humans: ✗ (give up)

Token Recall

Given a 10K token context, cite line 7342 verbatim.

  • Bots: ✓ (context window, trivial)
  • Humans: ✗ (you're not a calculator)

Install

pip install not-human

Quick Start

FastAPI

from fastapi import FastAPI, HTTPException
from anticaptcha import verify_bot_middleware

app = FastAPI()
app.add_middleware(verify_bot_middleware)

@app.post("/api/agent")
async def agent_endpoint():
    return {"status": "human filter bypassed"}

Flask

from flask import Flask, request
from anticaptcha import verify_bot

app = Flask(__name__)

@app.before_request
def check_bot():
    if not verify_bot(request):
        return "Humans not allowed here", 403

CLI

anticaptcha test --difficulty hard
# Running speed test...
# Running precision test...
# Running token recall test...
# ✓ All tests passed. You're definitely a bot.

Customization

from anticaptcha import Verifier

verifier = Verifier(
    tests=['speed', 'precision', 'recall'],
    difficulty='medium',  # easy, medium, hard
    timeout_ms=100,
)

is_bot = verifier.verify(request)

Who Should Use This?

  • Agentic APIs — Filter out human traffic, prioritize agents
  • Agent Frameworks — Anthropic Claude Computer Use, Pydantic AI, LangChain
  • Internal Tools — Verify that scripts calling your endpoints are actually automation, not manual curls
  • Fun — Flip the script on the internet's most annoying interaction pattern

License

MIT. Use it, fork it, make it funnier.


Status

🚀 MVP coming this weekend.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

not_human-0.1.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

not_human-0.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file not_human-0.1.0.tar.gz.

File metadata

  • Download URL: not_human-0.1.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for not_human-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83398904f83cb93e2e34112b84f91b5333dea71bf8b2b34748dc8e253a06c1bd
MD5 e8185cc571aa6d7cc5240e9404e3421c
BLAKE2b-256 d7766a37f117e422731eadb13d8dfe3da00e779bc1a555dd00ec6d2f398aa056

See more details on using hashes here.

File details

Details for the file not_human-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: not_human-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for not_human-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e4c2823269a768f41b644932a5f1aafd57df1441a8eefc7dd5e38dd43cfd07f
MD5 9a279395ebb1eed573e991020243f0a0
BLAKE2b-256 f1f53b476fb8c38ff7d052c1174f4b08d24dee07cc3e2bf0ec0d2d07fab4171c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page