Automate NSFW moderation.
Automatically moderate user uploads and AI-generated content with one API.
API playground
5 free credits to test your integrationAPI reference
Get API keyhttps://isthisnsfw.net/api/v1/moderateCheck text for NSFW content.
1 credit / requestBody parameters
application/jsoninput.typestring- "text"
input.textstring- The text to check. 1–12,000 characters.
thresholdnumber · optional- Default 0.5. Accepts 0.01–0.99.
curl https://isthisnsfw.net/api/v1/moderate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: request_001" \
-H "Content-Type: application/json" \
-d '{
"input": {
"type": "text",
"text": "A walk in the mountains."
},
"threshold": 0.5
}'Authentication & retries
Include these headers with every request. Create an API key in your account and keep it on your server.
Authorization: Bearer YOUR_API_KEY
Idempotency-Key: YOUR_REQUEST_IDGenerate a unique Idempotency-Key for each new check (8–128 letters, numbers, hyphens or underscores). Reuse it when retrying the same content: completed checks return the saved result without another charge. Use a new key after a failed check.
Errors and retries
400- Invalid request. Check the fields, threshold and idempotency key.
401- Missing or invalid API key.
402- Insufficient credits. Add credits to continue.
409- Request still processing, or the key was reused with different content.
413 / 415 / 422- Media too large, unsupported format or unreadable video.
429- Too many requests. Follow the Retry-After header.
502 / 503 / 504- Processing failed or unavailable. Reserved credits are refunded.
{"code":-1,"message":"Not enough credits. Add credits and try again."}Moderation for user uploads and AI output
An upload pipeline cannot rely on someone opening every file. Is this NSFW? Your application needs a consistent answer for each incoming item, whether it is a profile photo, a community attachment or a newly generated image. Call the API before publication and use the returned scores in your own approval rules.
AI image products can check outputs before delivery. Communities can screen attachments before they enter a feed. Marketplaces can review new product images, and dating platforms can apply the same photo policy across profile submissions.
Start with one integration and reuse it across image, video and text inputs. Keep the moderation decision associated with your own content ID so your application can approve, hold or reject the correct item.
Add checks to your content pipeline
Create an account, generate an API key and use the playground to test representative inputs. Send the key from your server, never from a public client. Images accept a public HTTPS URL or base64; video accepts a direct public HTTPS URL; text accepts a string.
Call the API whenever your platform receives a new upload or produces an output. Give each item its own idempotency key and reuse that key when retrying the same content. Pace requests to the account rate limit and honor Retry-After on a 429 response. A completed request with the same key returns its existing result without another charge.
Read the verdict and four category scores, then apply your product policy. Publish accepted items, hold uncertain cases for review and handle rejected content in your own application. Store the result alongside the item so moderation does not depend on a person revisiting the playground.
Turn NSFW scores into moderation rules
The API returns Sexual, Nudity, Violence and Gore scores. Those categories let your application distinguish different risks instead of treating every flag as the same problem. A score is a risk estimate, not a complete understanding of the content or its context.
Suggestive content can imply sexuality through clothing, pose or framing without depicting explicit activity. Nudity is a separate consideration: a medical image, a classical painting and an explicit photograph may require different treatment under your policy. Asking “is this image NSFW?” is only useful when the answer is tied to the audience and the rules of your product.
Use representative accepted and rejected examples to choose a threshold. Lower thresholds flag more items and create more review work; higher thresholds can miss more problematic content. Evaluate false positives and missed cases together. The same NSFW detector can support different policies, but a threshold does not replace a written policy.
Moderate AI-generated images and illustrations
Check the generated output, not just the prompt. An AI image service can produce an unexpected detail even from an ordinary request. Place the check after generation and before an image enters a gallery, customer download or public feed.
An AI NSFW detector can misread stylized anatomy, unusual proportions and abstract scenes. Include photographs, anime, drawings and the styles your product actually produces in your evaluation set. Test the final resolution and crop used in production.
Separate uncertain results from clear policy violations in your own workflow. A review queue allows your team to inspect ambiguous items without blocking every borderline illustration or automatically publishing every low-scoring output.
File handling and data retention
Submitted content is sent to the service for detection. Temporary file copies are deleted when processing completes or fails. We do not maintain a submitted-file library, publish customer files, manually view them as part of detection or use submissions to train our own models.
Detection results and operational records are separate from the submitted content. We retain scores, request identifiers, processing status and credit records to support usage history, retries and billing. The original file and text are not stored in those records.
Service providers process content under their applicable terms. Our deletion statement covers copies controlled by this application, not a blanket retention promise for every provider. Review the Privacy Policy before connecting a production workload, and submit only content your organization is entitled to process.
Read the Privacy PolicyWhat does NSFW mean for your platform?
NSFW means “not safe for work.” In a moderation policy, it usually signals sexual content, nudity or graphic material that should not appear unexpectedly. The API also reports Violence and Gore as separate risks.
Your platform determines what happens after a flag. An art marketplace, a general-audience community and a workplace product can have different acceptance rules. Use the NSFW scanner as a classification input, then make your own allow, review or reject decision.
API pricing
Get 5 free credits when you register, once. Images and text use 1 credit per check; videos use 3. The same balance works on the website and through the API.
A $10 pack adds 10,000 credits: $0.001 per image or text check, or $0.003 per video. Credits do not expire. There is no subscription or automatic overage billing; failed checks restore their credits.
Images & text · 1 credit
Videos · 3 credits
One content moderation API
Check images, video and text through one content moderation API. Keep the same response structure and four risk categories across your product, whether you are reviewing profile pictures, community uploads or generated images before publication.
Start with the NSFW detection API reference. The image moderation API accepts a public HTTPS URL or base64 data. The text moderation API accepts a text string, and the video moderation API accepts a direct public HTTPS video URL.
Keep the API call in your backend. Connect it to your upload queue or generation jobs and apply the result before an item becomes public. Start with a review stage, measure errors on your own content and automate the decisions your evaluation supports.
Evaluate before you automate
Medical images, artwork and swimwear catalogs can produce false positives. Cropping, collages, low resolution and obscured details can hide problematic content. Short scenes may be missed in video; video checks cover visual content, not audio. Text checks can misunderstand irony, quotations, slang and metaphor.
We do not claim a measured accuracy rate without a published benchmark. Validate the API on your own content, record errors and keep a review path for ambiguous cases. A score cannot establish consent, age, intent or the full context of a submission.
FAQ
Can I call the API for every upload?
Yes. Call the endpoint each time your application receives content or generates an image. Each call checks one input and returns its own result. The current limit is one request per second per account; honor Retry-After on a 429 response.
Can I test Is This NSFW before integrating?
New accounts receive 5 free credits once, with no monthly reset. Use them in the API playground or from your server. The playground accepts a local video upload or a video URL; API video calls use a URL. Images and text use 1 credit; videos use 3. Test examples from your own workload before buying more credits.
What does the API return?
A verdict, an overall risk score, separate Sexual, Nudity, Violence and Gore scores, the applied threshold and credits used. Your application decides whether to publish, reject or hold an item for review.
How do retries affect billing?
Use a unique idempotency key for each item. Reusing the same key with the same request returns a completed result without charging again. Failed checks restore their credits. A changed item needs a new key.
Are customer files stored or used for training?
We delete temporary file copies when processing finishes or fails. We do not maintain a submitted-file library, publish customer files, manually review them as part of detection or train our own models on submissions. Result and billing records are retained separately. See the Privacy Policy for provider-processing details.
Which video inputs can my application send?
Send a direct public HTTPS URL to an MP4, MOV or WebM file, up to 100 MiB, 120 minutes and 4096 pixels per side. Each video check costs 3 credits. This NSFW video detector assesses visual content, not audio; brief or obscured scenes can be missed.
Can I moderate user-generated text through the same API?
Yes. Send up to 12,000 characters per text request. NSFW text detection returns the same risk categories. Test slang, quotations and domain-specific language used by your community, since context can affect the result.
Does Is This NSFW work with AI-generated images?
You can check generated images, photographs, anime and drawings through the image input. Evaluate the styles and output resolutions your product uses. Unusual anatomy and abstract details can cause false positives or misses.
What happens when my account runs out of credits?
The API returns HTTP 402. Add a $10 pack for 10,000 credits, then resume sending requests. Credits do not expire, and the same balance covers API and playground use. There is no automatic overage billing.