Proofademic API

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

ParameterTypeRequiredDescription
filefileYesThe 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

FieldTypeDescription
predictionstringVerdict: "real", "fake", or "inpainting"
confidencefloatConfidence of the verdict (0.0–1.0)
probabilitiesobjectPer-class probabilities that sum to ~1.0
probabilities.realfloatProbability the image is a genuine, unedited photo
probabilities.fakefloatProbability the image is fully AI-generated
probabilities.inpaintingfloatProbability the image is real but partially AI-edited (inpainted)
credits_chargedintegerCredits deducted for this request

Verdict Interpretation

VerdictMeaning
realGenuine photo with no detected AI generation or editing
fakeFully AI-generated image
inpaintingAuthentic 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.

ImageMegapixelsCredits
512 × 5120.266
1024 × 10241.057
1920 × 1080 (1080p)2.078
3840 × 2160 (4K) and above8.2917

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):

PlanRequests / min
Trial5
300K10
1M20
2M30
5M50
12M75
25M100

Exceeding the limit returns 429 Too Many Requests.

Errors

StatuscodeWhen
400invalid_payloadMissing file, unsupported format, or file larger than 10 MB
400invalid_imageThe file could not be decoded as a valid image
403API key is missing the image_detector scope
403insufficient_creditsCredit balance is below the computed cost
409payment_in_progressAnother billing operation is in progress — retry shortly
503service_unavailableDetection engine is temporarily unavailable
503service_errorDetection 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.

On this page