API Documentation

The AI Lens API allows developers to programmatically scan files and text for forensic risk signals. Our API is completely stateless—all data is processed in-memory and discarded. Only lightweight, non-identifying metadata is recorded for audit logging.

POST/api/analyze

The primary endpoint for analyzing images, documents, and text. AI Lens utilizes a hybrid architecture, routing the payload to the local forensic engine, and for images, securely querying Sightengine for external GenAI detection.

[ CLIENT REQUEST ] ──(Multipart/JSON)──> [ /api/analyze ]
                                               │
                           ┌───────────────────┴───────────────────┐
                           ▼                                       ▼
             [ Local Forensic Engine ]               [ Sightengine Integration ]
             • EXIF & Image Metadata                 • GenAI Detection Model
             • PDF/DOCX Structure                    • (api.sightengine.com)
             • Text Entropy Analysis                 • Fallback / Graceful Degrade
                           │                                       │
                           └───────────────────┬───────────────────┘
                                               ▼
                                   [ Evidence Fusion ]
                                   • Weighted Risk Scoring
                                   • Confidence Calculation
                                               │
[ JSON RESPONSE ] <────────────────────────────┘