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
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