Data source: In-memory word list
https://context.gnist.ai/rest/profanity-filter/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (4)
check_textCheck text for profanity.
Returns whether the text contains profanity, a list of flagged words,
the total word count, and the number of distinct flagged words.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | required | Text to check for profanity. |
{
"text": "example"
}censor_textCensor profanity in text by replacing flagged words with a replacement string.
Returns the censored text, original length, and the number of words censored.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | required | Text to censor. |
replacement | string | optional | Replacement string for profane words. (default: "***") |
{
"text": "example"
}get_word_countGet the number of words in the profanity dictionary.
Returns the size of the built-in profanity word list used for filtering.
{
"query": "example"
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/profanity-filter/check_text" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"text": "example"}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/profanity-filter/check_text",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"text": "example"
},
)
print(resp.json())