apyhub
ARTIFICIAL INTELLIGENCE · IMAGE PROCESSING

AI Video Object Detection API

Hosted on ApyHub

What it does

Video Object Detection lets you send a video file or a video URL and get detected-object results back through either Azure or Google routes.

Use the POST /file endpoint when you want to upload a video directly. It requires file and requested_service, and supports Azure credentials through azure_region, azure_account_id, and azure_access_token, or Google credentials through google_credential_file. Use the POST /url endpoint when the video is already hosted online. It requires url and requested_service, and supports Azure settings in azure.region, azure.account_id, and azure.access_token, or Google settings in google.google_language and google.google_credential_json.

The response is wrapped under data and returns an azure object when you request Azure, or a google object when you request Google. The schemas do not define the internal object shape, so you should treat the provider payload as structured detection output specific to that route.

Video Object Detection is a fit for moderation pipelines, media indexing, and automated review flows where you need object detection results from uploaded footage or a video link without building separate integrations for each provider.

Provider (requested_service)Atoms
Azure500
Google500
▣ ENDPOINT 01 / 02
POST
Object Detection via file upload
http://localhost:8080/apyhub/detect-video-objects/file
QUICKSTARTGUIDE

Quickstart

Upload a video file and tell the API which service to use.

curl -X POST "http://localhost:8080/apyhub/detect-video-objects/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/video.mp4" \
  -F "requested_service=azure" \
  -F 'azure_access_token="your-azure_access_token"' \
  -F 'azure_account_id="your-azure_account_id"' \
  -F 'azure_region="your-azure_region"'

What you'll get back

Returns a JSON object with a 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.

{
  "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 video file and runs object detection using either Azure or Google, based on the requested_service value. The response returns a JSON object whose data field contains the provider-specific result object for the service you selected.

Request Body

ParameterTypeMandatoryDescription
fileStringYesVideo file to analyze. Binary upload.
azure_regionStringNoAzure region. Example: trial.
azure_account_idStringNoAzure account ID.
requested_serviceENUMYesDetection provider to use. Allowed values: azure, google. Example: azure.
azure_access_tokenStringNoAzure access token.
google_credential_fileStringNoGoogle service account JSON file. Binary upload. Used for Google routes.

Response

Returns a JSON object with a required 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; both provider objects are open-ended and may include additional properties.

ParameterTypeMandatoryDescription
dataObjectYesResponse wrapper object. Contains provider-specific result data.
data.azureObjectNoPresent when requested_service is azure. Open-ended object with additional properties.
data.googleObjectNoPresent when requested_service is google. Open-ended object with additional properties.

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
Object Detection via URL
http://localhost:8080/apyhub/detect-video-objects/url
QUICKSTARTGUIDE

Quickstart

Detect objects in a video from a public URL by specifying the video source and the video backend to use.

curl -X POST "http://localhost:8080/apyhub/detect-video-objects/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://assets.apyhub.com/samples/sample.mp4",
    "requested_service": "azure",
    "azure": {
        "access_token": "your-access_token",
        "account_id": "your-account_id",
        "region": "your-region"
    }
  }'

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.
body*
azure
google
google_credential_json
Google Cloud service account JSON (required for Google video routes).

About this endpoint

What it does

Detects objects in a video provided by 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 video URL to process. Must be a URI.
azureObjectNoAzure-specific settings. Includes region, account_id, and access_token when provided.
azure.regionStringNoAzure region value.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoAzure access token.
googleObjectNoGoogle-specific settings. Includes google_language and google_credential_json when 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_serviceENUMYesService 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
dataObjectYesContainer for the service-specific result.
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
▣ 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.