Image Inference
AI detection for images
Image AI detection - Analyze if an image is AI-generated.
Processes images entirely in memory with zero data retention. Supports JPEG, PNG, WebP formats up to 100 MB.
Authentication: OAuth JWT or Organization API Key in Authorization header.
mTLS (optional): If your client requires mTLS, also include X-Client-Cert header.
Primary authentication method - Required for all endpoints except /health.
Three Authentication Methods:
1. OAuth 2.0 Client Credentials (Recommended)
Get token:
curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_ID" \
-d "client_secret=YOUR_SECRET"
Use token:
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...
- Token lifetime: 1 hour
- Fast local JWT verification (<1ms)
- Recommended for all M2M integrations
2. OAuth + mTLS (High Security)
Get token (certificate replaces secret):
curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
-H "X-Client-Cert: $(base64 -w 0 client.crt)" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_ID"
Use token + certificate:
Authorization: Bearer eyJhbGc...
X-Client-Cert: LS0tLS1CRUdJTi...
- Certificate authenticates token request (no client_secret)
- Certificate also required on all API calls
- Required for government/healthcare/financial clients
- Complies with RFC 8705
3. Organization API Key (Legacy)
Authorization: Bearer enterprise-YOUR_API_KEY
- Long-lived until revoked
- No token refresh needed
- Simple but less secure than OAuth
For mTLS clients only: Base64-encoded client certificate.
Required only when your client has requires_mtls=true in configuration.
Example:
X-Client-Cert: $(base64 -w 0 client.crt)
Image inference results
Bad request - Invalid input data
Unauthorized - Invalid or missing authentication
Forbidden - Permission denied or missing mTLS certificate
Image file too large (max 100 MB)
POST /image HTTP/1.1
Host: enterprise.bitmind.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: image/jpeg
Accept: */*
Content-Length: 8
"binary"{
"isAI": true,
"confidence": 0.8234,
"processingTime": 0.045
}Last updated