Content filter
Pass content_filter on a Lightning TTS request to have the text checked against a profanity word list before synthesis. Off by default. The filter never rewrites your text — it either lets the request through or rejects it.
Request
Omitting content_filter is the same as disabling it. There is no account-level default that switches it on.
Actions
reject returns HTTP 400 and synthesizes nothing:
The response reports the number of matches and the locale checked. The matched terms are never returned or logged.
flag synthesizes normally and records the match, so you can measure the false-positive rate on your own traffic before enforcing.
On the WebSocket endpoints a blocked request arrives as a JSON frame carrying the same error_code and match_count.
Endpoint support
Supported on lightning_v3.1 and lightning_v3.1_pro.
Matching
Matching is whole-word, not substring, so Scunthorpe, assess and cocktail pass. The lists consulted are the one for the request’s locale plus English, which is always checked because English profanity is common in code-mixed text.
Mild expletives are out of scope by design, and terms whose whole-word form has an everyday sense are deliberately not listed, so the filter favours precision over recall.
A rejected request never reaches the worker, so it costs no synthesis time.
Behaviour during an outage
If no verdict is returned, the request fails open and the audio is synthesized unfiltered rather than the request failing. The event is logged. If your compliance posture requires the opposite, use flag mode alongside your own check.
Example
Clean text synthesizes exactly as it would without the parameter. Matching text returns 400 with CONTENT_FILTER_BLOCKED and produces no audio.
Note
- Input only. The filter inspects the text you submit, not the generated audio.
- No custom lists. The lists are server-side and not configurable per account today.
Related
- Pronunciation Dictionaries replace specific tokens before synthesis, which is the right tool for substitution rather than rejection.
- Math notation is another opt-in normalization flag on the same request.

