apyhub
ARTIFICIAL INTELLIGENCE · IMAGE PROCESSING

Person Detection

What it does

Person Detection identifies people in a video or image file and returns the results in a service-specific response under data.azure or data.google, depending on the requested_service you send.

Use POST /file when you want to upload a binary file directly. Send file and requested_service, and include the Azure fields azure_region, azure_account_id, and azure_access_token when using Azure, or google_credential_file when using Google. Use POST /url when the media is already hosted online; send url plus requested_service, and add the matching Azure or Google credential object as needed.

Person Detection fits workflows that need to detect people in uploaded media before further processing, such as content moderation, media indexing, or downstream computer-vision analysis. The API does not invent extra metadata in the schema: it returns the provider-specific payload in data.azure or data.google, so you can pass the detected results into your own logic.

If you are routing between providers, the same service name covers both Azure and Google paths, making it straightforward to switch between file upload and URL-based processing without changing the overall integration pattern.

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

QUICKSTART

GUIDE

Quickstart

Send the image or video URL and choose the detection service to get person-detection results.

curl -X POST "https://api.eu.apyverse.com/apyhub/detect-persons/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 result for the requested service: azure when requested_service is azure, or 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

Accepts a media URL and runs person detection using the selected provider. The request body includes the URL plus requested_service, and the response returns a JSON object with a data object containing provider-specific results.

Request Body

ParameterTypeMandatoryDescription
urlStringYesMedia URL to analyze. Must be a URI.
azureObjectNoAzure-specific configuration. Includes region, account_id, and access_token if provided.
azure.regionStringNoAzure region.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoAzure access token.
googleObjectNoGoogle-specific configuration. Includes google_language and google_credential_json if provided.
google.google_languageStringNoGoogle language code.
google.google_credential_jsonObjectNoGoogle Cloud service account JSON. Required for Google video routes. See schema for nested fields.
requested_serviceENUMYesProvider to use. Allowed values: azure, google.

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
dataObjectYesProvider-specific response payload. May include azure and/or google objects depending on the requested service.
data.azureObjectNoPresent when requested_service is azure.
data.googleObjectNoPresent when requested_service is google.

Body

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

QUICKSTART

GUIDE

Quickstart

Detect persons in an uploaded image with the Azure route by sending the file and requested_service.

curl -X POST "https://api.eu.apyverse.com/apyhub/detect-persons/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 data object. The data 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 person detection using the requested provider route. The response is a JSON object containing a data object with provider-specific results under azure or google, depending on requested_service.

Request Body

ParameterTypeMandatoryDescription
fileStringYesFile to analyze, sent as binary data.
azure_regionStringNoAzure region to use.
azure_account_idStringNoAzure account identifier.
requested_serviceENUMYesProvider route to use. Allowed values: azure, google.
azure_access_tokenStringNoAzure access token.
google_credential_fileStringNoService account JSON for Google routes, sent as binary data.

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
dataObjectYesContainer for provider-specific detection results.
data.azureObjectNoPresent when requested_service is azure. Additional properties are allowed.
data.googleObjectNoPresent when requested_service is google. Additional properties are allowed.

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.