SpamShield

API Docs

Endpoints for spam/ham prediction.

Base URL:

Endpoints

GET /health

Returns {"ok": true} when the model artifacts are loaded (plus a total scan counter).

POST /predict
Request JSON
{
  "text": "Win a FREE prize now!!!"
}
Response JSON (success)
{
  "ok": true,
  "label": "spam",
  "total_scans": 12
}

Code examples

Python
Example request
Example output
JavaScript
Example request
Example output