AI Image Detector
Detect AI-generated images via the Proofademic REST API — upload an image and get a real, fake, or inpainting verdict with confidence scores.
POST /api/image-detector/predict/
Analyze an image to determine whether it was generated or edited by AI. Returns a verdict (real, fake, or inpainting) with confidence and per-class probabilities.
Authentication: X-API-Key header with image_detector scope
The image is sent as multipart/form-data — not JSON.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The image to analyze, sent as multipart/form-data. Maximum 10 MB. |
Supported formats: JPEG, PNG, WebP, GIF, BMP, TIFF.
Example
Request
curl -X POST https://developer-portal.proofademic.ai/api/image-detector/predict/ \
-H "X-API-Key: YOUR_API_KEY" \
-F "[email protected];type=image/jpeg"Response (200 OK)
{
"prediction": "real",
"confidence": 0.9964,
"probabilities": {
"real": 0.9964,
"fake": 0.0013,
"inpainting": 0.0022
},
"credits_charged": 6
}Response Fields
| Field | Type | Description |
|---|---|---|
prediction | string | Verdict: "real", "fake", or "inpainting" |
confidence | float | Confidence of the verdict (0.0–1.0) |
probabilities | object | Per-class probabilities that sum to ~1.0 |
probabilities.real | float | Probability the image is a genuine, unedited photo |
probabilities.fake | float | Probability the image is fully AI-generated |
probabilities.inpainting | float | Probability the image is real but partially AI-edited (inpainted) |
credits_charged | integer | Credits deducted for this request |
Verdict Interpretation
| Verdict | Meaning |
|---|---|
real | Genuine photo with no detected AI generation or editing |
fake | Fully AI-generated image |
inpainting | Authentic image with AI-edited (inpainted) regions |
The prediction is the class with the highest probability; confidence equals that class's probability.
Credit Cost
Image detection is priced by resolution (megapixels), not word count:
tokens = 197 + 50 × megapixels
credits = max(6, round(tokens / 36.5))Every request costs at least 6 credits. Images larger than 4K UHD (3840 × 2160, ≈8.3 MP) are virtually downscaled before pricing, so the charge is capped at 17 credits regardless of how large the upload is.
| Image | Megapixels | Credits |
|---|---|---|
| 512 × 512 | 0.26 | 6 |
| 1024 × 1024 | 1.05 | 7 |
| 1920 × 1080 (1080p) | 2.07 | 8 |
| 3840 × 2160 (4K) and above | 8.29 | 17 |
The exact credits_charged is returned in every successful response. See Credits for balances, plans, and billing.
Rate Limits
The image_detector scope is rate-limited per plan (requests per minute):
| Plan | Requests / min |
|---|---|
| Trial | 5 |
| 300K | 10 |
| 1M | 20 |
| 2M | 30 |
| 5M | 50 |
| 12M | 75 |
| 25M | 100 |
Exceeding the limit returns 429 Too Many Requests.
Errors
| Status | code | When |
|---|---|---|
400 | invalid_payload | Missing file, unsupported format, or file larger than 10 MB |
400 | invalid_image | The file could not be decoded as a valid image |
403 | — | API key is missing the image_detector scope |
403 | insufficient_credits | Credit balance is below the computed cost |
409 | payment_in_progress | Another billing operation is in progress — retry shortly |
503 | service_unavailable | Detection engine is temporarily unavailable |
503 | service_error | Detection engine returned an error |
Credits are reserved before analysis and automatically refunded if detection fails, so failed requests do not cost credits.
See Error Handling for the common error response shape.
GET /api/image-detector/health/
Check availability of the image detection engine. No authentication required.
Request
curl https://developer-portal.proofademic.ai/api/image-detector/health/Response (200 OK)
{
"status": "healthy",
"upstream": { "status": "healthy", "rabbitmq_ready": true },
"circuit": { "status": "closed", "failures": 0 }
}When the engine is unreachable or degraded, the endpoint returns 503 with "status": "unhealthy". The circuit field reflects the internal circuit breaker, which opens after repeated upstream failures and recovers automatically.