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
Name | Type | Required | Max | Description |
---|---|---|---|---|
text | string | Yes | 2500 | The text to analyze for spam content |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the spam detection |
data.isSpam | boolean | Whether the text is spam or not |
data.confidence | number | Confidence score between 0 and 1, where 1 means highest confidence |
data.category | string | The category of spam if applicable (e.g., 'commercial', 'phishing', 'scam', etc.) |
metadata | object | Metadata about the spam detection process |
metadata.cost | number | The cost of the spam detection request |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the input parameter is invalid or missing. |
400 | INPUT_TOO_LONG | Occurs when the input parameter exceeds 2500 characters. |
400 | SPAM_DETECTION_ERROR | Error analyzing content for spam. |
400 | HARM_CONTENT | The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance. |
401 | UNAUTHORIZED | The token is invalid. |
429 | TOO_MANY_REQUESTS | The request limit has been reached. |