API Documentation
Integrate human verification into your applications
Getting Started
Authentication
All API requests require authentication using a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Base URL
All API endpoints are accessible via HTTPS at our base URL.
https://api.proofoflife.dev
Quick Start - Direct API Usage
// Direct API Usage - No SDK Required
const verifyContent = async (content, behavioralData) => {
const response = await fetch('https://api.proofoflife.dev/v1/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
behavioralData: {
mouse: behavioralData.mouseEvents,
keyboard: behavioralData.keyboardEvents,
scroll: behavioralData.scrollEvents,
timestamp: Date.now()
},
contentHash: await sha256(content),
platform: 'web',
sessionDuration: behavioralData.duration
})
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const result = await response.json();
console.log(`Human: ${result.isHuman}, Confidence: ${result.confidence}%`);
return result;
};
API Endpoints
Endpoints
POST /api/v1/verify
Requires AuthVerify if content was created by a human based on behavioral data
Request Body
behavioralData
objectrequired
Captured behavioral patterns
contentHash
stringrequired
SHA256 hash of the content
platform
stringrequired
Platform identifier (web, mobile, etc)
sessionDuration
number
Session duration in milliseconds
Response
isHuman
booleanWhether the content was created by a human
confidence
numberConfidence score (0-100)
behaviorPrintId
stringAnonymous behavior print identifier
riskFactors
arrayIdentified risk factors if any
Code Examples
cURL
curl -X POST https://api.proofoflife.dev/v1/verify \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"behavioralData": {
"mouse": [...],
"keyboard": [...],
"timestamp": 1234567890
},
"contentHash": "sha256_hash_here",
"platform": "web"
}'
Example Response
{
"isHuman": true,
"confidence": 94.5,
"behaviorPrintId": "anon_1234567890",
"riskFactors": [],
"metadata": {
"processingTime": 127,
"version": "1.0.0"
}
}
Rate Limits & Pricing
Free Tier
1,000
API calls/month
Perfect for testing
Pro Tier
100K
API calls/month
$99/month
Enterprise
Unlimited
Custom pricing
Contact sales