Quick Start Integrations API Reference

API Reference

Base URL: https://api.captchaoculto.com

POST /verify

Verify a verdict token from a form submission. This is the main endpoint you'll use from your backend.

Request Body (JSON)

ParameterTypeDescription
token requiredstringThe verdict token from the _co_verdict form field
api_key requiredstringYour API key (ak_...). Can also be sent as X-API-Key header.

Success Response (200)

{ "valid": true, "score": 12, "classification": "human", "threshold": 50, "session_id": "co_a1b2c3..." }

Response Fields

FieldTypeDescription
validbooleanWhether the token is valid and not expired
scoreintegerBot score from 0 (human) to 100 (bot)
classificationstring"human" (0-25), "suspicious" (26-50), or "bot" (51-100)
thresholdintegerYour configured score threshold
session_idstringUnique session identifier

Error Responses

StatusErrorDescription
400token_requiredMissing verdict token
400api_key_requiredMissing API key
401invalid_api_keyAPI key not found or inactive
400invalid_tokenToken signature invalid or expired
409already_verifiedThis token was already used (anti-replay)
GET /stats

Get usage statistics for your site. Requires your API key.

Query Parameters

ParameterTypeDescription
api_key requiredstringYour API key. Can also be sent as X-API-Key header.
actionstringOne of: summary (default), recent, distribution
limitintegerFor recent action: number of results (max 200, default 50)
monthstringFor distribution action: YYYY-MM format

Summary Response

{ "distribution": { "total": 1500, "human": 1350, "suspicious": 100, "bot": 50, "avg_score": 15.3 }, "usage": [ { "year_month": "2026-02", "total_inits": 5000, "total_scores": 2000, "total_verifications": 1500, "total_human": 1350, "total_suspicious": 100, "total_bot": 50 } ] }
GET /health

Health check endpoint. No authentication required.

{ "status": "ok", "service": "CAPTCHA Oculto", "version": "3.0.0", "architecture": "zero-kv" }

Rate Limits

EndpointLimitWindow
/init30 requestsPer minute per IP
/score20 requestsPer minute per IP
/verifyNo limitServer-side calls only

Score Classification

Score RangeClassificationRecommended Action
0 - 25humanProcess normally
26 - 50suspiciousProcess but flag for review
51 - 100botReject (phantom success recommended)

Phantom Success: Instead of showing an error to bots, return a fake success response. This prevents bots from adapting their behavior based on error messages.