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
bashimport { 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.
Keep exploring
Content Moderation API
One endpoint for text, image, and video moderation.
Image Moderation API
Policy-driven image checks with clear allow, review, and block actions.
Video Moderation API
Async video moderation without stitching together multiple vendors.
Content Moderation in Next.js
Add content moderation to a Next.js App Router project in minutes. Server-side API routes, React Server Components, and edge runtime examples.
Get an API key
Start making decisions in minutes with a Developer plan and clear upgrade paths.
Get an API key