Next.js
Content Moderation in Next.js
Drop-in moderation for App Router projects.
Route Handlers, Server Actions, and edge-compatible SDK usage.
What it detects
- • Comment forms
- • AI chatbot inputs and outputs
- • User profile fields
- • Image uploads
- • Marketplace listings
- • Custom rules
Why developers choose Vettly
- • Works in App Router and Pages Router
- • Edge-compatible SDK
- • TypeScript-first with full type safety
- • Pairs cleanly with Server Actions
Example request
bash// app/api/moderate/route.ts
import { Vettly } from '@vettly/sdk';
const vettly = new Vettly({ apiKey: process.env.VETTLY_API_KEY! });
export async function POST(req: Request) {
const { content } = await req.json();
const result = await vettly.check({ content, contentType: 'text', policyId: 'default' });
if (result.action === 'block') {
return Response.json({ error: result.categories }, { status: 400 });
}
return Response.json({ ok: true });
}Example response
json{
"flagged": true,
"action": "block",
"categories": {
"harassment": 0.93,
"hate": 0.02
},
"policy": "default",
"latency_ms": 142
}Compared to rolling your own classifier
Vettly returns decisions, not raw scores - your route handler stays a few lines instead of a classification pipeline.
See the AI chatbot patternKeep 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 Node.js
Add content moderation to any Node.js service in minutes. Works with Express, Fastify, NestJS, Hono, and any HTTP framework.
Get an API key
Start making decisions in minutes with a Developer plan and clear upgrade paths.
Get an API key