API Live Q1 2026
Targe Text Analysis API
Real-time human verification through behavioral analysis and zero-knowledge proofs.
Overview
Base URL: https://api.targe.io/v1
Authentication: Bearer token (API key in Authorization header)
Version: 1.0
The Targe API enables real-time verification of human-authored text through keystroke dynamics, linguistic analysis, and zero-knowledge cryptographic proofs. The system provides binary classification (human/AI) with confidence scores, typically responding in under 200ms.
Authentication
All API requests require authentication using a Bearer token in the Authorization header:
Authorization: Bearer targe_live_xxxxxxxxxxxxxxxxxxxx
Get API Key
POST /api/v1/auth/register
Request Body:
{
"email": "[email protected]",
"platform": "chat_app",
"company": "Your Company Name"
}
Response:
{
"api_key": "targe_live_xxxxxxxxxxxxxxxxxxxx",
"environment": "production",
"created_at": 1701360000000,
"rate_limits": {
"verifications_per_hour": 1000,
"sessions_per_hour": 10,
"concurrent_sessions": 100
}
}
REST API Endpoints
The Targe API provides four core endpoints for text verification:
1. Request Challenge
POST /api/v1/text/challenge
Initiates a verification session by providing a unique challenge nonce that prevents replay attacks.
Request Body:
{
"session_id": "optional_client_session_id"
}
Response:
{
"challenge_id": "550e8400-e29b-41d4-a716-446655440000",
"nonce": "a3f5b9c8d2e1f0a9b8c7d6e5f4a3b2c1",
"timestamp": 1701360000000,
"expires_in": 60,
"session_id": "client_or_generated_session_id"
}
Key Features:
- Challenge expires in 60 seconds
- Single-use nonce prevents proof replay
- Session ID can be provided or auto-generated
2. Verify Text Authorship
POST /api/v1/text/verify
Core verification endpoint that validates zero-knowledge proof and returns human/AI classification.
Request Body:
{
"challenge_id": "550e8400-e29b-41d4-a716-446655440000",
"proof": "base64_encoded_zkproof",
"public_inputs": {
"challenge_nonce": "a3f5b9c8d2e1f0a9b8c7d6e5f4a3b2c1",
"timestamp": 1701360005000,
"text_feature_hash": "blake3_hash_of_features"
},
"confidence": 0.96,
"text_length": 142,
"session_id": "client_session_id"
}
Response (Human Verified):
{
"verification_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"human": true,
"confidence": 0.96,
"valid_until": 1701363600000,
"session_id": "client_session_id",
"verified_at": 1701360005123,
"verification_time_ms": 28
}
Response (AI Detected):
{
"verification_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"human": false,
"confidence": 0.89,
"reason": "Atypical keystroke patterns detected",
"indicators": ["uniform_timing", "no_corrections", "paste_detected"],
"session_id": "client_session_id",
"verified_at": 1701360005123
}
Response (Challenge Required):
{
"verification_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"human": null,
"confidence": 0.62,
"challenge_required": true,
"challenge": {
"type": "contextual",
"prompt": "Based on our conversation, what was the main topic?",
"challenge_id": "new_challenge_id",
"nonce": "new_challenge_nonce"
},
"session_id": "client_session_id"
}
Key Features:
- Binary human/AI classification
- Confidence score (0.0-1.0)
- Verification valid for 1 hour
- Adaptive challenges for ambiguous cases
- <200ms response time (typical)
3. Continuous Session Verification
POST /api/v1/text/verify/session
Lightweight re-verification for ongoing chat sessions without full challenge/response cycle.
Request Body:
{
"session_id": "client_session_id",
"verification_id": "previous_verification_id",
"proof": "base64_encoded_zkproof",
"public_inputs": {
"challenge_nonce": "session_specific_nonce",
"timestamp": 1701360065000,
"text_feature_hash": "blake3_hash"
},
"confidence": 0.97
}
Response:
{
"verification_id": "new_verification_id",
"human": true,
"confidence": 0.97,
"session_valid": true,
"valid_until": 1701363665000,
"verified_at": 1701360065089
}
Key Features:
- Optimized for ongoing sessions
- Links to previous verification
- Faster than initial verification
- Maintains session continuity
4. Check Verification Status
GET /api/v1/text/verification/{verification_id}
Retrieves existing verification result without performing new verification.
Response (Active):
{
"verification_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"human": true,
"confidence": 0.96,
"verified_at": 1701360005123,
"expires_at": 1701363600000,
"still_valid": true,
"session_id": "client_session_id"
}
Response (Expired/Not Found):
{
"error": "Verification not found or expired",
"code": "VERIFICATION_EXPIRED"
}
Key Features:
- No verification performed (lookup only)
- Check if verification still valid
- Results cached for 1 hour
- Audit trail available for 24 hours
Error Responses
All endpoints return errors in this format:
{
"error": "Error description",
"code": "ERROR_CODE",
"details": {
"field": "Additional context"
}
}
Error Codes
| Code | HTTP Status | Description | Resolution |
|---|---|---|---|
INVALID_API_KEY |
401 | Invalid authentication | Check Authorization header format |
RATE_LIMIT_EXCEEDED |
429 | Too many requests | Wait for rate limit reset |
INVALID_PROOF |
400 | Proof format invalid | Regenerate proof client-side |
PROOF_VERIFICATION_FAILED |
400 | Cryptographic verification failed | Check feature validity |
CHALLENGE_EXPIRED |
400 | Challenge older than 60s | Request new challenge |
CHALLENGE_NOT_FOUND |
400 | Challenge ID not found | Verify challenge_id parameter |
SESSION_RATE_LIMITED |
429 | Session exceeded rate limit | Space out verifications |
INSUFFICIENT_DATA |
400 | Not enough behavioral data | Collect more keystrokes (>10) |
SERVICE_UNAVAILABLE |
503 | System temporarily unavailable | Retry with exponential backoff |