Supabase
Content Moderation with Supabase
Drop moderation into your Supabase stack.
Edge Functions, Database Webhooks, and Realtime patterns.
What it detects
- • Insert payloads via webhooks
- • Edge Function inputs
- • Realtime broadcast events
- • Storage uploads
- • Auth signup metadata
- • Custom rules
Why developers choose Vettly
- • Edge Functions run the SDK natively
- • Database Webhooks trigger checks on insert
- • Persist decisions in Postgres for audit
- • Pairs with RLS for tenant-aware moderation
Example request
bash// supabase/functions/moderate-comment/index.ts
import { Vettly } from 'npm:@vettly/sdk';
const vettly = new Vettly({ apiKey: Deno.env.get('VETTLY_API_KEY')! });
Deno.serve(async (req) => {
const { content, user_id } = await req.json();
const result = await vettly.check({ content, contentType: 'text', policyId: 'comments' });
if (result.action === 'block') {
return new Response(JSON.stringify({ blocked: true }), { status: 400 });
}
return new Response(JSON.stringify({ ok: true }));
});Example response
json{
"flagged": true,
"action": "block",
"categories": {
"harassment": 0.93,
"hate": 0.02
},
"policy": "default",
"latency_ms": 142
}Compared to building moderation in Postgres triggers
Edge Functions give you a clean place to call Vettly without putting HTTP calls inside SQL triggers.
Keep exploring
AI Chatbot Moderation API
Moderate inputs and LLM outputs in real time. Block prompt injection, NSFW content, and policy violations before users see them.
Vettly vs OpenAI Moderation
Multi-modal coverage, dashboards, and provider freedom vs text-only checks.
Content Moderation API
One endpoint for text, image, and video moderation.
Content Moderation in Next.js
Add content moderation to a Next.js App Router project in minutes. Route Handlers, Server Actions, edge runtime, policy setup, and safe error handling.