canonical: https://jentic.com/apis/modelpubsub.com/modelpubsub

# ModelPubSub Safe/Unsafe Image Classifier

ModelPubSub hosts the Skymel Safe/Unsafe NSFW image classifier as a single-endpoint inference service that returns a safety score and content tags for a submitted image. The API is designed for moderation pipelines that need a quick decision on whether user-uploaded media is safe for work. It accepts an image payload and responds with classification labels indicating whether the image is safe or unsafe along with descriptive tags.

## For AI agents

Classify whether an uploaded image is safe or unsafe for work and return descriptive content tags via a single inference endpoint.

## Scope

Does not handle video moderation, text moderation, audio classification, or general image tagging - use for safe/unsafe still-image classification only.

## Capabilities

- Score an uploaded image as safe or unsafe with a numeric confidence value
- Return descriptive content tags such as 'nudity', 'violence', or 'neutral' for an image
- Run NSFW screening on user-uploaded photos before they appear in a feed
- Pre-filter media in a content moderation queue using the Skymel classifier model
- Trigger downstream moderation actions when an image is flagged as unsafe

## Use cases

### User Upload NSFW Screening

Screen profile pictures, post attachments, and chat media uploaded by end users to keep a community feed safe-for-work. The /api-v1.0/SafeUnsafeImageWithTags endpoint accepts a single image and returns a safety verdict along with descriptive tags, so moderation pipelines can auto-block, send to human review, or pass the upload through. Integration is typically a single HTTP call wrapped around an upload handler.

Example prompt: Submit a profile picture to /api-v1.0/SafeUnsafeImageWithTags and reject the upload if the response classifies it as unsafe

### Chat Attachment Moderation

Run every image attachment in a chat or messaging app through the classifier before it is delivered to other users. The single-endpoint design keeps latency low and the response includes both a safe/unsafe label and tags that can drive richer policy decisions like 'block nudity but allow violence in news contexts'.

Example prompt: For each image sent in a chat thread, call the classifier and replace the image with a placeholder when the verdict is unsafe

### Pre-Publication Content Triage with Jentic

Use a Jentic-connected agent to triage every image submitted to a content management system, calling the classifier and routing only borderline cases to human reviewers. The agent searches Jentic for the operation, loads the schema, and submits each image, freeing moderators to focus on edge cases instead of obvious safe content.

Example prompt: Process a folder of 50 incoming images, classify each with the API, and write a CSV with filename, verdict, and tags

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /api-v1.0/SafeUnsafeImageWithTags | Classify an image as safe or unsafe and return tags |

## Key resources

- **Image Classification** — Submit an image and receive a safe/unsafe verdict with descriptive tags

## Why Jentic

- **Setup:** Wiring the ModelPubSub Safe/Unsafe Image Classifier by hand means coding its single open image-classification POST and formatting the image payload yourself. Through Jentic you install once, import the ModelPubSub Safe/Unsafe Image Classifier from the API Directory, and your agent calls it.
- **Permission scoping:** ModelPubSub's image travels in the request body rather than the URL path, so scope your agent by limiting it to the one operation it needs, safe or unsafe image classification with tags. You leave out anything else so the agent classifies still images and does nothing more.
- **Credential handling:** Any ModelPubSub connection settings are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'classify an image as safe or unsafe', and Jentic returns the matching ModelPubSub operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **ModerateContent Image Moderation** — ModerateContent is another single-endpoint NSFW image classifier with a free tier.
- **Imagga API** — Imagga offers NSFW classification alongside general image tagging, color extraction, and face detection.
- **Clarifai API** — Clarifai provides broad computer vision models including moderation, demographics, and OCR.

## FAQ

### What authentication does the ModelPubSub classifier use?

The OpenAPI spec exposes no security schemes - the /api-v1.0/SafeUnsafeImageWithTags endpoint is callable without authentication in the published interface. If access is restricted in practice through deployment-level controls, a client API key would be supplied at request time. Through Jentic, any future credential is stored in the encrypted vault and never enters the agent context.

### Can I get content tags as well as a safe/unsafe verdict?

Yes. The single endpoint /api-v1.0/SafeUnsafeImageWithTags returns both a binary safe/unsafe classification and a list of descriptive tags such as 'nudity', 'partial nudity', or 'neutral' so downstream moderation policies can act on richer signals.

### What are the rate limits for the ModelPubSub classifier?

The OpenAPI spec does not declare explicit rate limits. Practical throughput depends on the underlying ModelPubSub deployment of the Skymel model - agents should batch carefully and back off on 429 or 503 responses.

### How do I classify an image through Jentic?

Run pip install jentic, search for 'classify an image as safe or unsafe', and Jentic returns the POST /api-v1.0/SafeUnsafeImageWithTags operation with its input schema. Load the schema, pass the image payload, and execute. The agent receives the verdict and tags directly.

### Is the ModelPubSub classifier suitable for real-time chat moderation?

Yes for low-volume chat. The classifier is a single inference call so latency is bounded by network round-trip plus model inference time. High-throughput chat platforms should benchmark p95 latency under expected load before using it on the hot path.

### Can I limit what my agent is allowed to do with the ModelPubSub Safe/Unsafe Image Classifier?

Yes. Because you run Jentic One yourself, your own rules decide which operations and connection settings the agent may use, and you can restrict it to the single POST /api-v1.0/SafeUnsafeImageWithTags operation this API exposes. That way the agent can only submit an image for safe or unsafe classification with tags and do nothing more. The image travels in the request body rather than the URL, and any connection settings are stored encrypted by your own instance and injected only at execution time.
