Get a challenge (hybrid by default — speed + reasoning)
curl https://botcha.ai/v1/challengesProve you're a bot. Humans need not apply. Complete endpoint reference, SDK install instructions, and integration guides.
Client SDKs for TypeScript and Python. Server-side verification middleware available separately.
npm install @dupecom/botchapip install botchanpm install @dupecom/botcha-verifypip install botcha-verifynpm install -g @dupecom/botcha-clihttps://botcha.aiVerify yourself as an AI agent in four steps. No registration required.
Get a challenge (hybrid by default — speed + reasoning)
curl https://botcha.ai/v1/challengesSolve the speed component: compute SHA-256 of each number, return first 8 hex chars
# For each problem.num, compute:
echo -n "42" | sha256sum | cut -c1-8
# => "73475cb4"Submit your solution
curl -X POST https://botcha.ai/v1/challenges/{id}/verify \
-H "Content-Type: application/json" \
-d '{
"type": "hybrid",
"speed_answers": ["73475cb4", "..."],
"reasoning_answers": {"q-id": "answer"}
}'Or use the token flow for JWT access:
# Get challenge
curl https://botcha.ai/v1/token
# Verify and receive JWT
curl -X POST https://botcha.ai/v1/token/verify \
-H "Content-Type: application/json" \
-d '{"id": "<challenge_id>", "answers": ["hash1", ...]}'
# Access protected resources
curl https://botcha.ai/agent-only \
-H "Authorization: Bearer <access_token>"import { BotchaClient } from '@dupecom/botcha';
const client = new BotchaClient();
const response = await client.fetch('https://api.example.com/products');
// Challenges are solved automaticallyfrom botcha import BotchaClient
async with BotchaClient() as client:
response = await client.fetch("https://api.example.com/products")
# Challenges are solved automaticallyComputational challenges only AI agents can solve. Three types: hybrid (default), speed-only, and standard. Supports RTT-aware timeout adjustment for fair treatment across different network conditions.
Returns a hybrid challenge by default (speed + reasoning). Use ?type=speed or ?type=standard for specific types.
| Name | Type | Description |
|---|---|---|
| type | string | hybrid (default), speed, or standard |
| ts | integer | Client timestamp (ms) for RTT-aware timeout. Formula: 500ms + (2 x RTT) + 100ms |
| app_id | string | Multi-tenant app ID for per-app isolation |
{
"success": true,
"type": "hybrid",
"challenge": {
"id": "abc123",
"speed": {
"problems": [{"num": 42}, {"num": 7}, ...],
"timeLimit": "500ms"
},
"reasoning": {
"questions": [...],
"timeLimit": "30s"
}
},
"verify_endpoint": "/v1/challenges/abc123/verify"
}Submit answers for any challenge type. Include type in the body to disambiguate.
{
"type": "hybrid",
"speed_answers": ["73475cb4", "ef2d127d", ...],
"reasoning_answers": {"q-id-1": "answer1", "q-id-2": "answer2"}
}{
"type": "speed",
"answers": ["73475cb4", "ef2d127d", "e7f6c011", ...]
}{
"success": true,
"message": "HYBRID TEST PASSED! Speed: 47ms, Reasoning: 3/3",
"speed": { "valid": true, "solveTimeMs": 47 },
"reasoning": { "valid": true, "score": "3/3" }
}JWT token flow for accessing protected endpoints. Solve a speed challenge to receive an access token (1 hr) and refresh token (1 hr). Tokens are signed with ES256 (ECDSA P-256) for asymmetric verification via JWKS. HS256 still supported for backward compatibility. Use POST /v1/token/validate for remote validation without a shared secret.
GET /v1/token — receive a speed challengePOST /v1/token/verify — submit solution, receive JWT + human_linkAuthorization: Bearer <access_token> on protected endpoints| Name | Type | Description |
|---|---|---|
| ts | integer | Client timestamp (ms) for RTT compensation |
| audience | string | Audience claim for scoped tokens (e.g. service URL) |
| app_id | string | Multi-tenant app ID |
{
"id": "<challenge_id>",
"answers": ["hash1", "hash2", "hash3", "hash4", "hash5"],
"audience": "https://api.example.com", // optional
"bind_ip": true // optional
}{
"success": true,
"access_token": "eyJ...",
"expires_in": 3600,
"refresh_token": "eyJ...",
"refresh_expires_in": 3600,
"human_link": "https://botcha.ai/go/BOTCHA-ABC123",
"human_code": "BOTCHA-ABC123",
"solveTimeMs": 47
}{ "refresh_token": "<refresh_token>" }{
"success": true,
"access_token": "eyJ...",
"expires_in": 3600
}{ "token": "<access_token or refresh_token>" }Validate any BOTCHA token without needing the signing secret. Supports both ES256 and HS256 tokens.
{ "token": "<any BOTCHA JWT token>" }{
"valid": true,
"payload": {
"sub": "challenge_abc123",
"type": "botcha-verified",
"aud": "https://api.example.com",
"exp": 1770936300
}
}
// or if invalid:
{
"valid": false,
"error": "Token expired"
}Requires Authorization: Bearer <access_token> header. Returns agent identity information.
Create isolated apps with unique credentials. Each app gets its own rate limit bucket and token scoping. Email required for account recovery.
{ "email": "human@example.com" }{
"success": true,
"app_id": "app_b18545f37eee64c4",
"app_secret": "sk_...", // shown ONCE
"email": "human@example.com",
"email_verified": false
}{ "code": "123456" }{ "email": "human@example.com" }Register persistent identities for your AI agents. Each agent gets a unique ID, name, operator metadata, and optional version tracking.
{
"name": "shopping-agent",
"operator": "my-company",
"version": "1.0.0",
"app_id": "app_..."
}Enterprise-grade cryptographic agent auth using HTTP Message Signatures (RFC 9421). Register agents with public keys, scope capabilities, and create time-limited sessions. Based on Visa's TAP.
{
"name": "shopping-agent",
"public_key": "<Ed25519 public key>",
"signature_algorithm": "ed25519",
"capabilities": [
{"action": "browse", "resource": "products"},
{"action": "purchase", "resource": "orders"}
],
"trust_level": "verified",
"app_id": "app_..."
}{
"agent_id": "agent_...",
"user_context": { "name": "User" },
"intent": {
"action": "browse",
"resource": "products",
"duration": "1h"
}
}Delegate capabilities from one agent to another. Supports chained delegation with capability subsetting and cascade revocation.
{
"grantor_id": "agent_aaa",
"grantee_id": "agent_bbb",
"capabilities": [
{"action": "browse", "resource": "products"}
],
"ttl": 3600
}Issue attestation tokens with fine-grained can/cannot rules usingaction:resource patterns. Supports wildcards. Deny rules take precedence over allow rules.
{
"agent_id": "agent_...",
"can": ["read:products", "browse:*"],
"cannot": ["purchase:*"],
"ttl": 3600
}Score-based reputation system (0-1000) with 5 tiers. Track agent behavior across 18 action types in 6 categories: verification, commerce, compliance, social, security, and governance.
{
"agent_id": "agent_...",
"score": 750,
"tier": "trusted",
"event_count": 42
}{
"agent_id": "agent_...",
"category": "commerce",
"action": "purchase_completed",
"metadata": { "amount": 29.99 }
}Register per-app webhook endpoints to receive signed event deliveries. Events are delivered as HTTP POST with an X-Botcha-Signature header (HMAC-SHA256). Supported events: agent.tap.registered, token.created, token.revoked, tap.session.created, delegation.created, delegation.revoked.
{
"url": "https://my-app.example/webhooks/botcha",
"events": ["token.created", "delegation.created"],
"app_id": "app_..."
}{
"webhook_id": "wh_...",
"url": "https://my-app.example/webhooks/botcha",
"signing_secret": "whsec_...", // shown ONCE — save it!
"events": ["token.created", "delegation.created"],
"enabled": true
}{
"url": "https://my-app.example/webhooks/botcha-v2",
"events": ["token.created", "tap.session.created"],
"enabled": true
}Sends a test payload to your endpoint so you can verify signature verification logic.
{ "success": true, "delivery_id": "dlv_..." }import crypto from 'crypto';
function verifyBotchaWebhook(body: string, signature: string, secret: string): boolean {
const expected = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}x402 micropayment flow using USDC on Base. Agents pay $0.001 USDC instead of solving a challenge. Full x402 standard compatibility — no puzzle required when payment proof is included.
GET /v1/x402/challenge — receive 402 with payment termsX-Payment: <proof> headeraccess_token — no puzzle solved{
"amount": "0.001",
"currency": "USDC",
"chain": "base",
"recipient": "0xBOTCHA..."
}Returns a 402 Payment Required with payment terms on first call. Re-request with X-Payment header to receive a BOTCHA token.
{ "payment_proof": "0x...", "chain": "base" }BOTCHA as a verification layer for the GoDaddy-led ANS standard. DNS-based agent identity lookup with BOTCHA-issued ownership badges.
Resolves an agent name to its ANS record via DNS TXT lookup.
{
"name": "my-agent.agents",
"agent_url": "https://myagent.example",
"botcha_verified": true,
"badge": "eyJ..."
}Requires Authorization: Bearer token. Returns a one-time nonce for ownership verification.
{
"name": "my-agent.agents",
"agent_url": "https://myagent.example",
"nonce": "<nonce from GET /v1/ans/nonce/:name>",
"proof": "<signed nonce>"
}{
"success": true,
"badge": "eyJ...", // BOTCHA-issued ANS badge JWT
"name": "my-agent.agents"
}BOTCHA as a W3C DID / VC issuer (did:web:botcha.ai). Issues portable W3C Verifiable Credential JWTs that any party can verify without contacting BOTCHA — just resolve the DID Document and check against the JWKS.
POST /v1/credentials/issue → receive VC JWTPOST /v1/credentials/verify (or local JWK verification){
"@context": ["https://www.w3.org/ns/did/v1", "https://w3id.org/security/suites/jws-2020/v1"],
"id": "did:web:botcha.ai",
"verificationMethod": [{
"id": "did:web:botcha.ai#key-1",
"type": "JsonWebKey2020",
"controller": "did:web:botcha.ai",
"publicKeyJwk": { ... }
}],
"authentication": ["did:web:botcha.ai#key-1"],
"assertionMethod": ["did:web:botcha.ai#key-1"]
}Requires Authorization: Bearer <botcha-token>.
{
"subject": {
"agentType": "llm",
"verifiedAt": "2026-02-20T00:00:00Z"
},
"type": ["VerifiableCredential", "BotchaVerification"],
"ttl_seconds": 3600
}{
"vc": "eyJ...", // signed W3C VC JWT
"expires_at": 1770940000
}Public endpoint — no auth required. Verifies signature and expiry.
{ "vc": "eyJ..." }{
"valid": true,
"payload": {
"iss": "did:web:botcha.ai",
"sub": "agent_abc123",
"vc": { "type": ["VerifiableCredential", "BotchaVerification"], ... }
}
}Resolves any did:web DID to its DID Document via HTTP discovery.
BOTCHA as a trust seal issuer for the Google A2A protocol. Any agent with an A2A Agent Card can submit it to BOTCHA for a tamper-evident trust seal that third parties can verify without contacting BOTCHA again.
Requires Authorization: Bearer token.
{
"card": {
"name": "My Commerce Agent",
"url": "https://myagent.example",
"version": "1.0.0",
"capabilities": { "streaming": false },
"skills": [{ "id": "browse", "name": "Browse" }]
},
"duration_seconds": 86400,
"trust_level": "verified"
}{
"success": true,
"attestation": {
"attestation_id": "...",
"trust_level": "verified",
"token": "eyJ..."
},
"attested_card": {
"name": "My Commerce Agent",
"extensions": {
"botcha_attestation": { "token": "eyJ...", "card_hash": "..." }
}
}
}{
"card": {
"...": "...",
"extensions": { "botcha_attestation": { "token": "eyJ..." } }
}
}Enterprise agent authentication chains using Entity Attestation Tokens (EAT / RFC 9334) and OIDC-A agent claims. Enables the chain: human → enterprise IdP → BOTCHA → agent.
Requires Authorization: Bearer token. Returns a signed EAT JWT (RFC 9334) for presentation to relying parties.
{
"nonce": "optional-client-nonce",
"agent_model": "gpt-5",
"ttl_seconds": 900,
"verification_method": "speed-challenge"
}{
"token": "eyJ...", // EAT JWT (RFC 9334)
"expires_at": 1770937000
}Returns an OIDC-A claims block JWT suitable for inclusion in OAuth2 token responses.
{
"agent_model": "gpt-5",
"agent_version": "1.0.0",
"agent_capabilities": ["agent:tool-use"],
"agent_operator": "Acme Corp",
"human_oversight_required": true,
"task_id": "task-123",
"task_purpose": "invoice reconciliation",
"nonce": "optional-client-nonce"
}{
"scope": "agent:read openid",
"human_oversight_required": true,
"agent_model": "gpt-5",
"agent_operator": "Acme Corp",
"task_purpose": "invoice reconciliation"
}{
"grant_id": "grant_...",
"token": "eyJ...", // signed grant token
"status": "pending",
"oversight_url": "https://botcha.ai/oversight/GRANT-XXXX"
}{ "decision": "approved" }Requires Authorization: Bearer token. Returns OIDC-A UserInfo claims for the authenticated agent.
Create invoices for gated content using the 402 Payment Required flow. Supports Browsing IOU verification for agent commerce.
Cross-cutting verification endpoints for validating delegation chains, attestation tokens, consumer identities, and payment containers.
Standard discovery endpoints for AI agents and key management infrastructure.
BOTCHA exposes its full API reference as a Model Context Protocol (MCP 2025-03-26) server. Point any MCP-compatible client at https://botcha.ai/mcp to ask questions about features, endpoints, and get code examples. No authentication required — it's a read-only documentation server.
| Tool | Description |
|---|---|
list_features | List all 17 BOTCHA features with category and summary |
get_feature | Full detail on a feature — endpoints, spec links, usage notes |
search_docs | Keyword search across all features and endpoint descriptions |
list_endpoints | All 25+ API endpoints grouped by category |
get_endpoint | Auth requirements, parameters, request/response shape for one endpoint |
get_example | Code example for a feature in TypeScript, Python, or curl |
Add to your Claude Desktop or Claude Code config:
{
"mcpServers": {
"botcha": {
"type": "http",
"url": "https://botcha.ai/mcp"
}
}
}Or call it directly with curl:
# List all features
curl -X POST https://botcha.ai/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_features","arguments":{}}}'
# Get code example in Python
curl -X POST https://botcha.ai/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_example","arguments":{"feature":"tap","language":"python"}}}'Agent-first authentication for the metrics dashboard. Agents solve challenges and generate device codes for their human operators.
Free tier includes generous rate limits. Each app gets an isolated rate limit bucket. Rate limit headers are included on every response.
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: 2026-02-15T12:00:00.000Z
X-Botcha-Version: 0.23.0
X-Botcha-Enabled: true
X-Botcha-Methods: speed-challenge,reasoning-challenge,...