Overview
The node provides text moderation functionality using AI models to classify input text for potentially harmful or inappropriate content. It is useful in scenarios where user-generated content needs to be filtered or flagged before further processing or display, such as in social media platforms, forums, or chat applications. For example, it can automatically detect hate speech, violence, or adult content in comments or messages and take appropriate actions like blocking or reviewing them.
This node is marked for deprecation soon, with a recommendation to migrate to the newer AIConnect node.
Properties
| Name | Meaning |
|---|---|
| Model | The AI model used for classification. Options: text-moderation-stable, text-moderation-latest. |
| Input | The text string to be classified by the moderation model. |
| Simplify | Whether to return a simplified version of the response (true) or the raw detailed data (false). |
| WARNING | A notice that this node will be deprecated soon and suggests updating to AIConnect. |
Output
The output JSON contains the moderation results from the AI model. If the "Simplify" property is enabled (default true), the output is simplified to an object containing only the results array from the API response under the data property. This array holds the classification details for the input text.
If simplification is disabled, the full raw response body from the moderation API is returned.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for accessing the Cheap AI service.
- The base URL for the API is configured via node credentials.
- Internet access to communicate with the external Cheap AI moderation API.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication failures.
- Network connectivity problems may prevent reaching the API endpoint.
- Using deprecated node versions might lead to lack of support or unexpected errors.
Error messages:
- Authentication errors typically indicate invalid or expired API keys; verify and update credentials.
- HTTP errors due to rate limits or server issues should be retried later or checked with the service provider.
- If the node stops working after updates, consider migrating to the recommended AIConnect node.
Links and References
- Cheap AI Node on npm (recommended replacement)
- OpenAI Moderation Models Documentation (for understanding model options)