ScamAI raised $2.6M to combat AI-powered scams
scam.ai

~/docs cat errors.md

Errors

Errors are conventional HTTP:

error codes
400  Bad Request        malformed request or missing file
401  Unauthorized       x-api-key header absent or incorrect
402  Payment Required   out of credits (data.reason: INSUFFICIENT_CREDITS)
403  Forbidden          key not scoped for this detection
409  Conflict           IDEMPOTENCY_IN_FLIGHT — retry shortly for the result
413  Payload Too Large  file exceeds the cap for its media type
415  Unsupported Media  not an image, video, or audio file
422  Unprocessable      the platform looked and could not judge (e.g. no
                        face). reasons[] carries stable codes — render them,
                        do not retry
429  Too Many Requests  rate/burst limit hit
502  Bad Gateway        detector unavailable — retry, then contact support

A 422 is an answer, not an outage: the model looked and declined to judge. The body carries the stable reasons and a request_id — render the reasons, do not retry.

422 body
{
  "success": false,
  "error": "not_assessable",
  "message": "no detector could score this media",
  "reasons": ["no_face"],
  "request_id": "ea75…"
}

Keep the id (or request_id on an error) from every response for tracing and support at [email protected].