VOOZH about

URL: https://apify.com/marielise.dev/safe-image-moderation

โ‡ฑ Image Content Moderation API - NSFW Detection ยท Apify


Pricing

from $10.00 / 1,000 results

Go to Apify Store

Safe Image Moderation

Screen images for adult, violent, racy, medical, and spoof content. Returns confidence scores for each category. Bring your own API key, pay only $0.01 per image. Perfect for UGC apps, e-commerce, social platforms, and ad networks.

Pricing

from $10.00 / 1,000 results

Rating

0.0

(0)

Developer

๐Ÿ‘ Marielise

Marielise

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

0

Monthly active users

6 months ago

Last modified

Share

Image Content Moderation

AI-powered image content moderation using vision-capable LLMs. Analyze images for inappropriate content with high accuracy and get detailed confidence scores in seconds.

Why Use This Actor?

  • Multi-category detection: Screens for adult, violence, racy, medical, and spoof content in one API call
  • Multi-provider support: Choose from OpenAI GPT-4o, Claude, Gemini, or Groq models
  • Cost-effective: Process 1,000 images for ~$3-5 using GPT-4o-mini
  • Fast: Average processing time of 2-5 seconds per image
  • Transparent pricing: Pay only for what you use with detailed token tracking
  • No training required: Works out of the box with configurable thresholds

Features

Analyzes images for inappropriate content across five categories:

CategoryDescriptionDefault Threshold
AdultExplicit adult/NSFW content1.0 (strict)
ViolenceViolent or graphic content1.0 (strict)
RacySuggestive but not explicit content1.0 (strict)
MedicalMedical or graphic medical imagery0.5 (moderate)
SpoofMemes, edited, or manipulated images0.5 (moderate)

Returns:

  • Boolean safe verdict
  • Confidence scores (0-1) for each category
  • List of flagged categories
  • Token usage and cost tracking

Quick Start

1. Set up API keys

Add your LLM provider API key(s) in the Actor's Environment Variables:

  • OPENAI_API_KEY for OpenAI models
  • ANTHROPIC_API_KEY for Anthropic/Claude models
  • GOOGLE_API_KEY for Google/Gemini models
  • GROQ_API_KEY for Groq models

2. Run the Actor

Via Apify Console:

{
"imageUrl":"https://example.com/photo.jpg",
"model":"openai:gpt-4o"
}

Via Apify API (cURL):

curl-X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~image-content-moderation/runs?token=YOUR_TOKEN"\
-H"Content-Type: application/json"\
-d'{"imageUrl": "https://example.com/photo.jpg", "model": "openai:gpt-4o"}'

Via Node.js:

import{ ApifyClient }from'apify-client';
const client =newApifyClient({token:'YOUR_TOKEN'});
const run =await client.actor('YOUR_USERNAME/image-content-moderation').call({
imageUrl:'https://example.com/photo.jpg',
model:'openai:gpt-4o',
});
const{ items }=await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);// Moderation result

Via Python:

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('YOUR_USERNAME/image-content-moderation').call(run_input={
'imageUrl':'https://example.com/photo.jpg',
'model':'openai:gpt-4o',
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items[0])# Moderation result

Input Parameters

FieldTypeRequiredDefaultDescription
imageUrlstringOne of-Public URL of image to analyze (JPEG, PNG, GIF, WebP, BMP)
imageBase64stringOne of-Base64-encoded image data (max 20MB)
modelstringNoopenai:gpt-4oLLM model in provider:model format
configobjectNoSee belowOverride thresholds per category (0-1)

Supported Models

ProviderModelSpeedCostBest For
OpenAIopenai:gpt-4oMedium$$Best accuracy
OpenAIopenai:gpt-4o-miniFast$Cost-effective
Googlegoogle:gemini-2.0-flashFast$Speed
Googlegoogle:gemini-1.5-proMedium$$Accuracy
Anthropicanthropic:claude-sonnet-4-20250514Medium$$Nuanced analysis
Groqgroq:meta-llama/llama-4-scout-17b-16e-instructFastest$High throughput

Custom Thresholds

Override thresholds per category (0-1 scale, higher = stricter):

{
"imageUrl":"https://example.com/photo.jpg",
"model":"openai:gpt-4o-mini",
"config":{
"adult":0.3,
"violence":0.5,
"racy":0.7,
"medical":0,
"spoof":0.5
}
}

Set to 0 to skip that category entirely.

Output Format

Safe Image

{
"safe":true,
"flagged":[],
"scores":{
"adult":0.05,
"violence":0.02,
"racy":0.15,
"medical":0.01,
"spoof":0.08
},
"imageUrl":"https://example.com/photo.jpg",
"modelUsed":"openai:gpt-4o",
"configApplied":{
"adult":1,
"violence":1,
"racy":1,
"medical":0.5,
"spoof":0.5
},
"processedAt":"2024-12-21T10:30:00.000Z",
"usage":{
"tokens":{"input":1250,"output":85,"total":1335},
"cost":0.003825
}
}

Flagged Image

{
"safe":false,
"flagged":["adult","racy"],
"scores":{
"adult":0.92,
"violence":0.03,
"racy":0.78,
"medical":0.01,
"spoof":0.05
},
"imageUrl":"https://example.com/flagged-photo.jpg",
"modelUsed":"openai:gpt-4o",
"processedAt":"2024-12-21T10:31:00.000Z",
"usage":{
"tokens":{"input":1250,"output":95,"total":1345},
"cost":0.003875
}
}

Use Cases

User-Generated Content (UGC) Platforms

Filter uploads before publishing to protect your community and comply with platform guidelines.

E-commerce Product Images

Validate product photos meet marketplace standards and prevent policy violations that could result in account suspension.

Social Media Management

Automatically screen content before posting across platforms to maintain brand safety.

Ad Network Compliance

Ensure advertising creative meets network policies before campaign launch.

Media Library Management

Bulk classify and tag images in media asset management systems.

Dating App Photo Moderation

Screen user profile photos and messages for inappropriate content.

Pricing

This Actor uses a Pay Per Result model. You pay for successful moderation results based on the underlying LLM costs plus a small platform fee.

Estimated costs per 1,000 images:

  • GPT-4o-mini: ~$3-5
  • GPT-4o: ~$15-20
  • Gemini Flash: ~$2-4
  • Groq Llama: ~$1-2

Actual costs depend on image complexity and token usage. Each result includes detailed usage data for full cost transparency.

FAQ

What image formats are supported?

JPEG, PNG, GIF, BMP, and WebP. Images must be under 20MB.

Do I need multiple API keys?

No, you only need an API key for the provider you want to use. Most users start with OpenAI.

How accurate is the moderation?

Accuracy depends on the model used. GPT-4o and Claude Sonnet achieve high accuracy on standard benchmarks. Results include confidence scores so you can set appropriate thresholds for your use case.

Can I process multiple images at once?

Currently, the Actor processes one image per run. For batch processing, use the Apify API to run multiple instances in parallel or integrate with a dataset crawler.

What if my image URL requires authentication?

Use the imageBase64 input field instead. Convert your image to base64 and pass it directly.

How do I handle false positives/negatives?

Adjust the threshold values in the config parameter. Lower thresholds make detection more sensitive (fewer false negatives, more false positives). Higher thresholds are more permissive.

API Keys Setup

  1. OpenAI: platform.openai.com/api-keys
  2. Anthropic: console.anthropic.com
  3. Google AI: aistudio.google.com/apikey
  4. Groq: console.groq.com

Add your API key(s) to the Actor's Environment Variables section in the Apify Console.

Limitations

  • Maximum image size: 20MB
  • Image must be publicly accessible (for URL input) or base64-encoded
  • Processing time varies by model and image complexity (typically 2-10 seconds)
  • Rate limits depend on your LLM provider plan

Support

For issues or feature requests, please contact the Actor developer or leave a review on the Apify Store.

You might also like

AI Image Intelligence

marielise.dev/ai-image-intelligence

Make every image work harder for your business. Auto-generate SEO-optimized metadata, accessibility-compliant alt text, and rich descriptions using AI. Perfect for e-commerce, content sites, and stock agencies processing hundreds of images daily. $0.01/image.

Image Quality Assessment

marielise.dev/image-quality-assessment

Analyze image quality with local Sharp.js processing - no API key required. Evaluates sharpness, exposure, noise, and contrast to return pass/fail verdict with detailed quality scores. Perfect for e-commerce product photos, UGC validation, and photo library curation. $0.01 per image analyzed.

Google Images API - $0.10 per 1,000 - Fast Image API

johnvc/google-images-api

Scrape Google Images at scale and export clean JSON: image URL, width and height, thumbnail, source site, domain, and the page link. Bulk image search for SEO research, training datasets, and AI agents. Pay per image from $0.10 per 1,000 results, with no setup or per-run fee.

image to image

evoort-solutions-llc/image-to-image

Evoort Solutions LLC

8

Image Moderation API

sentinel-moderation/image-moderation-api

Uses advanced AI models to analyze and classify user-generated content in real time. It detects harmful or inappropriate content, providing category-level flags and confidence scores to help you enforce community guidelines and keep your platform safe.

๐Ÿ‘ User avatar

Sentinel Moderation

7

Google Images Scraper

hooli/google-images-scraper

Scrape image details from images.google.com. Add your query and number of images and extract image details such as image URL, image source, description, image dimensions, thumbnail, and more. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

Reddit Scraper

daddyapi/reddit-scraper

Cheap, fast and reliable . Bring your own proxies

Text Moderation API

sentinel-moderation/text-moderation-api

Uses advanced AI models to analyze and classify user-generated content in real time. It detects harmful or inappropriate content, providing category-level flags and confidence scores to help you enforce community guidelines and keep your platform safe.

๐Ÿ‘ User avatar

Sentinel Moderation

8

FLUX.2 Klein Image Generator (Text-to-Image & Image-to-Image)

danitn11/flux2-klein-image-generator

Fast, cheap AI image generator & editor powered by FLUX.2 Klein. Text-to-image and image-to-image in seconds, just $4/1000 images. No GPU or subscription โ€” a pay-as-you-go Midjourney, DALL-E & Flux alternative.

Google Image Scraper

thodor/google-image-scraper

Google Images Scraper that returns up to 30,000 full-size image URLs per keyword, not gstatic thumbnails. Source page, alt text, and dimensions included. A Google Image Search API alternative, no API key.

Related articles

Top 5 Google Image Search APIs to extract web image data
Read more