Node.js

Content Moderation in Node.js

One npm install, one API call.

Works with Express, Fastify, NestJS, Hono, and serverless runtimes.

What it detects

  • Form submissions
  • Chat messages
  • Comments and replies
  • Profile fields
  • Uploaded media
  • Custom rules

Why developers choose Vettly

  • TypeScript SDK with full types
  • Works with native fetch on Node 18+
  • Edge-runtime compatible
  • Clean error model with retries
Example request
bash
import { Vettly } from '@vettly/sdk';

const vettly = new Vettly({ apiKey: process.env.VETTLY_API_KEY });

const result = await vettly.check({
  content: userInput,
  contentType: 'text',
  policyId: 'default',
});

if (result.action === 'block') return res.status(400).end();
Example response
json
{
  "flagged": true,
  "action": "block",
  "categories": {
    "harassment": 0.93,
    "hate": 0.02
  },
  "policy": "default",
  "latency_ms": 142
}

Compared to calling provider APIs directly

Vettly normalizes responses across providers and adds retries, evidence, and audit trails out of the box.

Get an API key

Start making decisions in minutes with a Developer plan and clear upgrade paths.

Get an API key