apyhub
Back
▣ ARTIFICIAL INTELLIGENCE · FILE SECURITY

AI Image Explicit Content Detection API

Hosted on ApyHub

What it does

The Image Moderation API checks an image for explicit or sensitive content. Upload a binary file (up to 100MB per request) or send a public image url, and get back a JSON data object with the detection results.

Pick the detector with requested_service: apyhub (default), azure or google. Results come back under the provider's own key, and you can pass your own Azure or Google credentials in the request when you want to use your existing accounts.

Use it as the NSFW detection step for user uploads: profile photos, product listings, community posts and chat attachments. Flag explicit images before they go live, send borderline cases to human review, and keep your feed safe for work. AI agents can call it through ApyHub MCP as part of a moderation workflow.

This image moderation API handles still images. For video files, use the AI Video Explicit Content Detection API.

For a complete content moderation API setup, pair it with the AI Text Moderation API or the Detect Text Toxicity API for captions and comments, and the AI Image Face Detection API when you need to know whether a person appears in the image.

Provider (requested_service)Atoms
Azure500
Google500
ApyHub2000
▣ ENDPOINT 01 / 02
POST
Detect explicit or sensitive content
https://api.eu.apyhub.com/apyhub/detect-explicit-or-sensitive-content/file

QUICKSTART

GUIDE

Quickstart

Upload a file to scan it for explicit or sensitive content.

curl -X POST "https://api.eu.apyhub.com/apyhub/detect-explicit-or-sensitive-content/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file"

What you'll get back

Returns a JSON object with a data object field. That data object may include azure, apyhub, and google objects, depending on the requested service and response content.

{
  "data": {
    "azure": {},
    "apyhub": {},
    "google": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Uploads a file to detect explicit or sensitive content and returns provider-specific result objects in a data wrapper. The request can target Azure, Google, or ApyHub via requested_service; if omitted, the default is apyhub.

Request Body

ParameterTypeDescription
fileBinaryBinary file upload.
azure_keyStringAzure key.
google_keyStringGoogle key.
azure_regionStringAzure region.
azure_endpointStringAzure endpoint URL.
azure_account_idStringAzure account ID.
requested_serviceENUMService to use. Allowed values: azure, google, apyhub. Default: apyhub.
azure_access_tokenStringAzure access token.

Response

Returns a JSON object with a data object field. Inside data, the schema defines optional provider result objects for azure, apyhub, and google.

ParameterTypeDescription
dataObjectWrapper for provider-specific results.
data.azureObjectResponse object from Microsoft Azure Computer Vision.
data.apyhubObjectResponse object from ApyHub Vision detector.
data.googleObjectResponse object from Google Cloud Vision.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 02
POST
Detect explicit or sensitive content
https://api.eu.apyhub.com/apyhub/detect-explicit-or-sensitive-content/url

QUICKSTART

GUIDE

Quickstart

Send an image URL to check whether it contains explicit or sensitive content.

curl -X POST "https://api.eu.apyhub.com/apyhub/detect-explicit-or-sensitive-content/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample-explicit.jpg"}'

What you'll get back

Returns a JSON object with a data object. The data object may include azure, apyhub, and google response objects, depending on which detector/service is used.

{
  "data": {
    "azure": {},
    "apyhub": {},
    "google": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
azure
Custom credentials for Azure services.
Azure subscription key.
Azure service region.
Azure endpoint URL.
google
Custom credentials for Google services.
google_credential_json

About this endpoint

What it does

Detects explicit or sensitive content from a URL. You send a url in the request body and can optionally provide service-specific credentials and a requested_service selector; the response returns a JSON object with a data object containing the provider-specific result object.

Request Body

ParameterTypeDescription
urlStringURL of the content to analyze. Must be a valid URI.
azureObjectCustom credentials for Azure services.
azure.keyStringAzure subscription key.
azure.regionStringAzure service region.
azure.endpointStringAzure endpoint URL.
azure.account_idStringAzure account ID.
azure.access_tokenStringOAuth access token for Azure service.
googleObjectCustom credentials for Google services.
google.google_languageStringTarget language locale.
google.google_credential_jsonObjectGoogle service account credential JSON. See schema for nested fields.
requested_serviceENUMWhich service to use. Allowed values: azure, google, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. The data object can contain provider-specific result objects in azure, apyhub, and google, each represented as an object.

AttributeTypeDescription
dataObjectContainer for provider-specific results.
data.azureObjectResponse object from Microsoft Azure Computer Vision.
data.apyhubObjectResponse object from ApyHub Vision detector.
data.googleObjectResponse object from Google Cloud Vision.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.