Developer
API Documentation
Detect AI-generated images programmatically.
Authentication
All API requests require a Bearer token. Generate one in your API keys page.
Authorization: Bearer sk_live_…
POST /api/detect
Analyze an image and receive a verdict with confidence and reasoning.
Request
curl -X POST https://truthlenai.lovable.app/api/detect \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "imageDataUrl": "data:image/jpeg;base64,..." }'Response 200
{
"verdict": "AI Generated",
"confidence": 92,
"riskLevel": "High",
"suspectedModel": "Midjourney v6",
"reasoning": ["..."],
"artifacts": ["..."],
"metadataNotes": "...",
"scanId": "uuid"
}Errors
400— invalid image402— monthly plan limit reached403— plan does not include API access413— image too large (max 6MB)429— rate limited
Try it interactively in the web playground.