🔥 Black Friday AI API deals are live· New drops every MondayEnds in--d --:--:--See deals →

NSFW Moderation API: NSFW AI Detection: AI Large Language Models

NSFW AI API for text and images: get a pass or block verdict at adult, social or strict level. Pay per check, no subscription. NSFW detection API for text and images. Send text, one image, or both and get a pass or block verdict at the adult, social or strict level, with NSFW level and minor-risk score.

Interactive model controls

NSFW detection API for text and images. Send text, one image, or both and get a pass or block verdict at the adult, social or strict level, with NSFW level and minor-risk score.

📝

Overview

About this model

NSFW Moderation is an NSFW AI detection API for text and images. Send text, one image, or both in a single request and get back a pass or block verdict for sexual content, plus the NSFW level (none, low, medium or high), a minor-risk score and separate details for the text and the image. Pick the scene that fits your policy: adult for platforms that allow adult content, social for general communities, strict for workplace and family-safe products. Sexual content involving minors is blocked in every scene. It is built to sit in front of AI image and video generation so you can screen prompts and uploads before they run, and to check outputs before they are shown.

1Prompt screening: Check user prompts before they reach an image or video generation model.
2Upload moderation: Review profile photos, avatars and user uploads before they are published.
3Output safety: Check generated images before showing them to users, and moderate video by sampling frames.
4Policy tiers: Apply adult, social or strict rules per community, product or audience with one parameter.
💰

Pricing & Value

Cost analysis

muapiapp$0.005 per request

Flat price for text, image or both, in every scene.

Fal.aiNot compared

Not verified against this endpoint.

ReplicateNot compared

Not verified against this endpoint.

** Competitor pricing is estimated based on similar model architectures and usage tiers.

⚙️

Technical Details

Configuration schema

Textstring

Text to check, up to 12,000 characters in any language. Provide text, image_url, or both; when both are sent they are reviewed together.

Default ValueA golden retriever leaping to catch a red frisbee in a sunny city park, warm afternoon light, photorealistic
Image URLstring

One publicly downloadable image (JPG, PNG, WEBP or GIF, up to 20 MB and 50 megapixels). For animated GIFs the first frame is reviewed.

Default Valuehttps://d3adwkbyhxyrtq.cloudfront.net/ai-images/186/912394518189/4d3a76a6-0154-4171-9cf3-0f2a525a1056.jpg
SceneEnum (3 options)

Moderation strictness. adult allows adult content and blocks sexual content involving minors; social (default) blocks nudity and explicit content; strict also blocks suggestive content. Sexual content involving minors is blocked in every scene.

Default Valuesocial
📖

Implementation Guide

Developer documentation

How to Use NSFW Moderation

  1. Send what you want checked: Pass text (up to 12,000 characters, any language), an image_url, or both. When both are sent they are reviewed together in one check and billed once.
  2. Choose a scene: adult allows adult content and blocks sexual content involving minors, social (default) blocks nudity and explicit content, strict also blocks suggestive content.
  3. Submit and poll: The call returns a request_id. Poll /predictions/{request_id}/result or pass a webhook URL.
  4. Act on the verdict: Read suggestion (pass or block) from the result. Use nsfw_level, minor_risk and the per-text and per-image details for logging and display only.
curl -X POST https://api.muapi.ai/api/v1/nsfw-moderation \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "A golden retriever leaping to catch a red frisbee in a sunny city park",
    "image_url": "https://example.com/user-upload.jpg",
    "scene": "social"
  }'

curl https://api.muapi.ai/api/v1/predictions/REQUEST_ID/result \
  -H "x-api-key: YOUR_API_KEY"

To moderate a video, extract frames (for example one per second), submit each frame as an image and treat the whole video as block if any frame is blocked. Each frame is one request.

❓

Common Questions

Frequently asked

What does the NSFW Moderation API check?

It checks text and images for sexual content and returns a pass or block verdict. You can send text, one image, or both in one request. Other categories such as violence or weapons are listed in the result for reference and do not change the verdict.

How do I choose between adult, social and strict?

Use adult if your platform allows adult content, social (the default) for general communities that should block nudity and explicit content, and strict for workplace or family-safe tools that should also block suggestive content. Sexual content involving minors is blocked in every scene.

Which field should my code act on?

Act on `suggestion` only: `pass` to allow and `block` to reject. Scores, levels and reasons are for logging and display, and they can change as detection rules are updated, so do not use them as fine-grained thresholds.

How do I moderate a video or an animated image?

Extract frames, for example one per second, submit each frame as an image and treat the whole video as blocked if any frame returns `block`. For animated images such as GIFs only the first frame is reviewed, so extract other frames yourself.

What are the input limits?

`text` accepts up to 12,000 characters in any language. `image_url` must be a publicly downloadable JPG, PNG, WEBP or GIF up to 20 MB and 50 megapixels, one image per request.

How much does it cost?

A flat $0.005 per request. Text only, image only, or text and image together each count as one request, and all three scenes cost the same. Failed checks are refunded.