Authentication

The TruthLens API uses simple Bearer token authentication. You send your API key in the HTTP Authorization header.

Header Format


Authorization: Bearer YOUR_API_KEY
    

Example


curl https://api.aitruthlens.org/v1/detect/text \
  -H "Authorization: Bearer sk_test_123456" \
  -H "Content-Type: application/json" \
  -d '{"text": "The quick brown fox jumps over the lazy dog"}'
    

If your key is missing or invalid, the API returns:


{
  "error": "unauthorized"
}