Vue Profanity Filter

Screen input in a Vue component by calling your own server endpoint.

Quick start in Vue

async function checkText(text) {
  const res = await fetch("/api/moderate", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ text }),
  });
  return (await res.json()).flagged;
}

async function onSubmit() {
  if (await checkText(message.value)) {
    error.value = "Please revise your message.";
  } else { /* submit */ }
}

Note: Never expose your API key client-side. Use a Nuxt server route or your own backend.

Why context-aware matters

A plain word list flags "this game is sick" or medical text full of anatomical terms. The Profanity API runs a five-layer pipeline that scores intent, so "die" in a gaming taunt and "die" in a real threat are handled differently. Pick a context and the engine adjusts strictness automatically.


Other integrations

Ready to ship moderation?

Get an API key and 300 free requests a month. No credit card required.

Get started free →