Blasp

API Documentation

Everything you need to integrate the Blasp profanity filter into your application.

Authentication

All API requests require a Bearer token. Generate one from your dashboard after signing in.

Header
Authorization: Bearer YOUR_API_TOKEN

Filter Endpoint

POST/api/filter

Send text for profanity detection and filtering. Returns the cleaned text along with metadata about any detected profanity.

Request Body

ParameterTypeRequiredDescription
textstringYesThe text to filter. Max 10,000 characters.
languagestringNoLanguage code: en, de, fr, es. Defaults to your account setting.

Response

FieldTypeDescription
originalstringThe original input text
filteredstringThe text with profanity masked
has_profanitybooleanWhether profanity was detected
profanities_countintegerNumber of profanities found
profanities_foundstring[]List of unique profanities detected

Example Response

200 OK
{
  "original": "You are a damn idiot",
  "filtered": "You are a **** *****",
  "has_profanity": true,
  "profanities_count": 2,
  "profanities_found": ["damn", "idiot"]
}

Code Examples

Integration examples in popular languages.

curl -X POST https://blasp.app/api/filter \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"text": "Some text to filter"}'

Multi-Language Support

Filter profanity in multiple languages. Set a default language in your dashboard settings, or override it per request using the language parameter.

Supported Languages

CodeLanguage
enEnglish (default)
deGerman (Deutsch)
frFrench (Français)
esSpanish (Español)

Example: Filtering German Text

Pass the language parameter to filter text in a specific language.

curl -X POST https://blasp.app/api/filter \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"text": "Das ist scheiße", "language": "de"}'

Example Response

200 OK
{
  "original": "Das ist scheiße",
  "filtered": "Das ist *******",
  "has_profanity": true,
  "profanities_count": 1,
  "profanities_found": ["scheiße"]
}

Tip: You can set your default language in API Settings so you don't need to include it in every request.

Rate Limits & Quotas

API requests are subject to both per-minute rate limits and monthly quotas:

  • Rate limit: 60 requests per minute (all users)
  • Monthly quota: 1,000 requests/month (Free tier) or unlimited (Pro)

When you exceed either limit, the API returns a 429 Too Many Requests response.

HeaderDescription
X-RateLimit-LimitMaximum requests per minute
X-RateLimit-RemainingRemaining requests in current window
Retry-AfterSeconds to wait (only on 429 responses)

Error Responses

StatusMeaning
401Missing or invalid API token
422Validation error (e.g. missing text field or exceeds 10,000 chars)
429Rate limit or quota exceeded (see details below)

429 Response Details

There are two scenarios that return a 429 status code:

Rate Limit Exceeded (60 requests/minute)
{
  "message": "Too many requests."
}
Monthly Quota Exceeded (Free tier: 1,000 requests/month)
{
  "message": "Monthly API quota exceeded. Upgrade to Pro for unlimited requests.",
  "usage": 1000,
  "limit": 1000
}

Note: Pro subscribers have unlimited monthly requests.