SFW API vs OpenAI omni-moderation
Last updated 2026-11-17
OpenAI's moderation endpoint (omni-moderation-latest) is free and takes text and images in one call. For images it returns one sexual-content score next to violence and self-harm. The SFW API covers nudity only and grades it: a level from 0 to 3, three scores, art and adult-object flags, and a policy verdict. Facts below are from OpenAI's moderation guide, API reference, model page and data-controls page in November 2026.
| SFW API | OpenAI omni-moderation | |
|---|---|---|
| Price | 500 free credits/month, then $10 for 10,000 ($1.00/1k), down to $0.50/1k | free |
| Account | SFW API key | OpenAI API key; free tier in supported countries |
| Image output | level 0–3, three scores, art and sex_object flags, policy verdict | one sexual score (0–1) and boolean, plus violence and self-harm categories |
| Revealing vs implied vs explicit | separate levels with calibrated scores (50 = threshold) | not distinguished: sexual only |
| GIF/video | GIFs and videos (paid accounts) frame by frame on the same endpoint, one credit per frame | not documented for the moderation endpoint |
| Inputs | URL, upload or base64; JPEG, PNG, WebP, GIF, AVIF, HEIC, MP4, WebM, … | image URL or base64 data URL, up to 20 MB |
| Limits | per key and account, see Rate limits | free tier 250 requests/min and 5,000/day |
| Data | processed in memory in Germany, nothing stored | not used for training, no retention, ZDR eligible |
| Score stability | versioned model, metrics per version on Accuracy | OpenAI notes that thresholds on category_scores may need recalibration as the model is upgraded |
OpenAI's endpoint is enough if you already call OpenAI, want a free yes/no on clearly sexual images and also need text, violence or self-harm checks in the same request. Choose the SFW API when the line you draw is finer than "sexual or not": allowing swimwear but blocking implied nudity, treating drawings differently from photos, or checking GIFs and videos frame by frame. Some teams run both: OpenAI for text, the SFW API for images.
Mapping sexual to levels
| OpenAI | SFW API |
|---|---|
sexual high, flagged | usually level 3 Explicit, sometimes level 2 Implied Nudity |
sexual low | level 0 Everyday, level 1 Revealing or level 2: the score does not separate them |
| no equivalent | art flag (drawings, anime, statues), sex_object flag (adult toys) |
The threshold that matters for most products, between swimwear (level 1) and implied nudity (level 2), has no counterpart in OpenAI's categories. That is what the SFW API's levels are for; see Understanding levels.
The same check in both
// OpenAI
const m = await openai.moderations.create({
model: 'omni-moderation-latest',
input: [{ type: 'image_url', image_url: { url: 'https://example.com/photo.jpg' } }],
});
const blocked = m.results[0].categories.sexual;
// SFW API
const r = await api.analyzeUrl('https://example.com/photo.jpg', { policy: { block_level: 2 } });
const blocked = r.policy?.blocked; // also r.nudity.level, r.nudity.scores, r.flagsRelated
- Understanding levels
- Filter AI-generated images before showing them
- vs Google SafeSearch
- Pricing
- Accuracy and methodology
- Quickstart
Next steps
Read the quickstart for a first request, see pricing for the free tier and prepaid packs, or get a free API key and start with your own images.