apyhub
ARTIFICIAL INTELLIGENCE · IMAGE PROCESSING

Face Detection

What it does

Face Detection analyzes an image or video from a URL or uploaded file and returns detection results for the service you choose. Send the media, pick requested_service as azure or google, and get back the provider-specific response under data.azure or data.google.

Use the /url route when your media is already hosted, or /file when you need to upload it directly. The URL route accepts url plus optional provider credentials: azure.region, azure.account_id, azure.access_token, or google.google_language and google.google_credential_json. The file route accepts file plus azure_region, azure_account_id, azure_access_token, or google_credential_file for Google routes.

Face Detection is a good fit for moderation, content tagging, and media workflows that need to identify faces before downstream processing. The response is wrapped in a single data object, with the chosen provider's result nested inside it. No extra fields are exposed beyond the provider output.

If you already have an Azure or Google vision setup, this service gives you a consistent entry point for either source format while keeping the response shape simple.

▣ ENDPOINT 01 / 02
POST
Face Detection via URL
https://api.eu.apyverse.com/apyhub/video-detect-faces/url

QUICKSTART

GUIDE

Quickstart

Detect faces in an image or video by sending its URL and choosing the face-detection service provider.

curl -X POST "https://api.eu.apyverse.com/apyhub/video-detect-faces/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.mp4","requested_service":"azure"}'

What you'll get back

Returns a JSON object with a data object field. The data object contains the provider-specific result under azure when requested_service is azure, or under google when requested_service is google.

{
  "data": {
    "azure": {}
  }
}
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
google
google_credential_json
Google Cloud service account JSON (required for Google video routes).

About this endpoint

What it does

Detects faces from an image or video URL and returns a JSON object with a data object. The data object contains either an azure object or a google object depending on the requested service.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe source URL to analyze. Must be a URI.
requested_serviceENUMYesWhich service to use: azure or google.
azureObjectNoAzure-specific configuration. Include the fields below when using the Azure route.
azure.regionStringNoAzure region.
azure.account_idStringNoAzure account identifier.
azure.access_tokenStringNoAzure access token.
googleObjectNoGoogle-specific configuration. Include the fields below when using the Google route.
google.google_languageStringNoGoogle language setting.
google.google_credential_jsonObjectNoGoogle Cloud service account JSON. Required for Google video routes. See schema for nested fields.

Response

Returns a JSON object with a data object field. The data object may contain an azure object when requested_service is azure, or a google object when requested_service is google.

ParameterTypeMandatoryDescription
dataObjectYesResponse wrapper object. May contain service-specific result data.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
POST
Face Detection via file upload
https://api.eu.apyverse.com/apyhub/video-detect-faces/file

QUICKSTART

GUIDE

Quickstart

Upload a file and tell the API whether to process it with Azure or Google face detection.

curl -X POST "https://api.eu.apyverse.com/apyhub/video-detect-faces/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg" \
  -F "requested_service=azure"

What you'll get back

Returns a JSON object with a required data object. That object may include an azure object when requested_service is azure, or a google object when requested_service is google.

{
  "data": {
    "azure": {}
  }
}
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*
Service account JSON (Google routes).

About this endpoint

What it does

Uploads a file and runs face detection using the requested provider route. The response is a JSON object with a data object that may include either an azure object or a google object, depending on the requested_service value.

Request Body

ParameterTypeMandatoryDescription
fileStringYesBinary file upload.
azure_regionStringNoAzure region.
azure_account_idStringNoAzure account ID.
requested_serviceENUMYesAllowed values: azure, google.
azure_access_tokenStringNoAzure access token.
google_credential_fileStringNoBinary file upload. Service account JSON (Google routes).

Response

Returns a JSON object with a required data object field. Inside data, the response may include an azure object when requested_service is azure, or a google object when requested_service is google.

ParameterTypeMandatoryDescription
dataObjectYesResponse wrapper. May contain azure and/or google objects depending on the requested service.

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.

▣ 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.