apyhub
ARTIFICIAL INTELLIGENCE · FILE SECURITY

AI Image Explicit Content Detection API

Hosted on ApyHub

What it does

Explicit Content Detection checks an image file or image URL for explicit or sensitive content and returns provider-specific results from ApyHub, Azure, or Google.

Send a binary file to POST /file, or send a url to POST /url. Both endpoints accept an optional requested_service value of azure, google, or apyhub, so you can route the request to the detector you want to use. The file endpoint also accepts Azure credentials such as azure_key, azure_region, azure_endpoint, azure_account_id, and azure_access_token. The URL endpoint supports nested azure and google credential objects when you need to supply your own provider settings.

The response contains a data object with provider keys for azure, apyhub, and google. Each provider entry is returned as that provider’s own response object, so you can inspect the scan result in the format that matches the backend you chose.

Use Explicit Content Detection to screen uploaded user images, moderate public listings, or flag unsafe media before it reaches a feed, checkout flow, or review queue.

Provider (requested_service)Atoms
Azure500
Google500
ApyHub2000
▣ ENDPOINT 01 / 02
POST
Detect explicit or sensitive content
http://localhost:8080/apyhub/detect-explicit-or-sensitive-content/file
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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 playground…

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

ParameterTypeMandatoryDescription
fileStringYesBinary file upload.
azure_keyStringYes (if azure is selected in requested_service)Azure key.
google_keyStringYes (if google is selected in requested_service)Google key.
azure_regionStringNoAzure region.
azure_endpointStringYes (if azure is selected in requested_service)Azure endpoint URL.
azure_account_idStringYes (if azure is selected in requested_service)Azure account ID.
requested_serviceENUMNoService to use. Allowed values: azure, google, apyhub. Default: apyhub.
azure_access_tokenStringNoAzure 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.

ParameterTypeMandatoryDescription
dataObjectNoWrapper for provider-specific results.
data.azureObjectNoResponse object from Microsoft Azure Computer Vision.
data.apyhubObjectNoResponse object from ApyHub Vision detector.
data.googleObjectNoResponse object from Google Cloud Vision.

Body

Name
Type
Description
bodyREQUIRED
object

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
http://localhost:8080/apyhub/detect-explicit-or-sensitive-content/url
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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": {
    "apyhub": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading playground…

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

ParameterTypeMandatoryDescription
urlStringYesURL of the content to analyze. Must be a valid URI.
azureObjectNoCustom credentials for Azure services.
azure.keyStringYes (if azure is selected in requested_service)Azure subscription key.
azure.regionStringNoAzure service region.
azure.endpointStringYes (if azure is selected in requested_service)Azure endpoint URL.
azure.account_idStringYes (if azure is selected in requested_service)Azure account ID.
azure.access_tokenStringNoOAuth access token for Azure service.
googleObjectNoCustom credentials for Google services.
google.google_languageStringNoTarget language locale.
google.google_credential_jsonObjectYes (if google is selected in requested_service)Google service account credential JSON. See schema for nested fields.
requested_serviceENUMNoWhich 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.

AttributeTypeMandatoryDescription
dataObjectNoContainer for provider-specific results.
data.azureObjectNoResponse object from Microsoft Azure Computer Vision.
data.apyhubObjectNoResponse object from ApyHub Vision detector.
data.googleObjectNoResponse object from Google Cloud Vision.

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.