Download OpenAPI specification:
✨ Classify text as SPAM or NOSPAM.
| text required | string (Text) |
Threshold (number) or Threshold (null) (Threshold) | |
Any of number (Threshold) | |
| property name* additional property | any |
{- "text": "string",
- "threshold": 0
}{ }✨ Classify a single text for toxicity. Uses thread offload to avoid blocking the event loop.
| text required | string (Text) |
| threshold | number (Threshold) Default: 0.5 |
| verdict required | string (Verdict) |
| toxic required | number (Toxic) |
| neutral required | number (Neutral) |
| raw required | Array of any (Raw) |
{- "text": "string",
- "threshold": 0.5
}{- "verdict": "string",
- "toxic": 0,
- "neutral": 0,
- "raw": [
- null
]
}✨ Classify multiple texts for toxicity in one call. Uses thread offload to avoid blocking the event loop.
| texts required | Array of strings (Texts) |
| threshold | number (Threshold) Default: 0.5 |
| verdict required | string (Verdict) |
| toxic required | number (Toxic) |
| neutral required | number (Neutral) |
| raw required | Array of any (Raw) |
{- "texts": [
- "string"
], - "threshold": 0.5
}[- {
- "verdict": "string",
- "toxic": 0,
- "neutral": 0,
- "raw": [
- null
]
}
]✨ Perform both spam and toxicity checks simultaneously.
This endpoint runs both classifiers in parallel and returns a combined result, which is more efficient than making two separate API calls.
Args: payload: Contains text and optional thresholds for both checks
Returns: Combined result with spam detection, toxicity detection, and overall verdict
| text required | string (Text) |
Spam Threshold (number) or Spam Threshold (null) (Spam Threshold) | |
Any of number (Spam Threshold) | |
| toxicity_threshold | number (Toxicity Threshold) Default: 0.5 |
| text required | string (Text) | ||
required | object (Spam) | ||
| |||
required | object (Toxicity) | ||
| |||
| is_safe required | boolean (Is Safe) | ||
| verdict required | string (Verdict) | ||
{- "text": "string",
- "spam_threshold": 0,
- "toxicity_threshold": 0.5
}{- "text": "string",
- "spam": { },
- "toxicity": { },
- "is_safe": true,
- "verdict": "string"
}