apyhub

AI Image Face Detection API

Hosted on ApyHub

What it does

Face Detection identifies human faces in an image you send as a file or by URL. Use it when you need to flag portrait photos, pre-check user uploads, or build image workflows that depend on knowing whether a face is present.

Send a binary file to /file, or pass an image URL to /url. Both endpoints accept a requested_service value of azure, google, or apyhub, so you can route the request to the vision provider you want. The file endpoint also supports provider-specific credentials such as azure_key, azure_region, azure_endpoint, azure_account_id, azure_access_token, and google_key. The URL endpoint accepts nested azure and google credential objects for the same kind of provider configuration.

The response is returned under a data object with separate provider results for azure, apyhub, and google. That makes it easy to compare outputs or standardise your own downstream handling without changing the input format.

Use Face Detection for moderation checks, profile-photo validation, photo indexing, or any feature where your app needs a face-aware image signal before moving to the next step.

Provider (requested_service)Atoms
Azure500
Google500
ApyHub2000
▣ ENDPOINT 01 / 02
POST
Detect human faces (file upload)
http://localhost:8080/apyhub/detect-human-faces/file
QUICKSTARTGUIDE

Quickstart

Upload an image file to detect faces.

curl -X POST "http://localhost:8080/apyhub/detect-human-faces/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg" \
  -F "requested_service=apyhub"

What you'll get back

Returns a JSON object with a data object. The data object may include azure, apyhub, and google objects, depending on the face detection service 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.
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 an image file and runs human face detection against the selected provider. The response returns a JSON object containing a data object with provider-specific result objects for azure, apyhub, and google.

Request Body

ParameterTypeMandatoryDescription
fileStringYesBinary file upload.
azure_keyStringNoAzure key.
google_keyStringNoGoogle key.
azure_regionStringNoAzure region.
azure_endpointStringNoAzure endpoint.
azure_account_idStringNoAzure account ID.
requested_serviceENUMNoAllowed values: azure, google, apyhub. Default: apyhub.
azure_access_tokenStringNoAzure access token.

Response

Returns a JSON object with a data object field. Inside data, the response may include azure, apyhub, and google object fields, each representing the corresponding provider's face-detection response.

ParameterTypeMandatoryDescription
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

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 human faces (URL input)
http://localhost:8080/apyhub/detect-human-faces/url
QUICKSTARTGUIDE

Quickstart

Send an image URL to detect human faces in it.

curl -X POST "http://localhost:8080/apyhub/detect-human-faces/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/faces.jpg"}'

What you'll get back

Returns a JSON object with a data object field. The data object contains the face-detection result from one of the supported providers (azure, apyhub, or google), depending on the service used.

{
  "data": {
    "apyhub": {}
  }
}
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.
Azure account ID.
OAuth access token for Azure service.
google
Custom credentials for Google services.
Target language locale.
google_credential_json

About this endpoint

What it does

Detects human faces from an image URL. You send the image url and optionally choose which service to use via requested_service; the response returns a JSON object containing a data object with service-specific results.

Request Body

ParameterTypeMandatoryDescription
urlStringYesImage URL to analyze. Format: URI.
azureObjectNoCustom credentials for Azure services.
azure.keyStringNoAzure subscription key.
azure.regionStringNoAzure service region.
azure.endpointStringNoAzure endpoint URL.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoOAuth access token for Azure service.
googleObjectNoCustom credentials for Google services.
google.google_languageStringNoTarget language locale.
google.google_credential_jsonObjectNoGoogle service account credential JSON. See schema for nested fields.
requested_serviceENUMNoService to use. Allowed values: azure, google, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. The data object may contain azure, apyhub, and/or google objects, depending on the service used.

ParameterTypeMandatoryDescription
dataObjectNoContainer for service-specific response objects.
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.