Serverless AI Spam Detection

AI powered spam detection service that identifies spam content with high accuracy and confidence scoring.

Endpoint

Spam detection for text content

POSThttps://api.xtartapp.com/text/spam-detection

*Authentication

You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.

Request body

NameTypeRequiredMaxDescription
textstringYes2500The text to analyze for spam content

Response

NameTypeDescription
dataobjectThe data of the spam detection
data.isSpambooleanWhether the text is spam or not
data.confidencenumberConfidence score between 0 and 1, where 1 means highest confidence
data.categorystringThe category of spam if applicable (e.g., 'commercial', 'phishing', 'scam', etc.)
metadataobjectMetadata about the spam detection process
metadata.costnumberThe cost of the spam detection request

Errors

{
   "error": "string", 
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADOccurs when the input parameter is invalid or missing.
400INPUT_TOO_LONGOccurs when the input parameter exceeds 2500 characters.
400SPAM_DETECTION_ERRORError analyzing content for spam.
400HARM_CONTENTThe content is harmful and cannot be processed.
400INSUFFICIENT_BALANCEThe user has insufficient balance.
401UNAUTHORIZEDThe token is invalid.
429TOO_MANY_REQUESTSThe request limit has been reached.