apyhub
Back
▣ ARTIFICIAL INTELLIGENCE

AI Video Label Detection API

Hosted on ApyHub

What it does

Video Label Detection analyzes a video from a file upload or a URL and returns label data from either Azure or Google, depending on the service you request.

Use the /file endpoint when you have the video content in hand, or /url when the video is already hosted elsewhere. For both routes, you send requested_service as azure or google. Azure requests can include azure_region, azure_account_id, and azure_access_token on the file route, or an azure object with region, account_id, and access_token on the URL route. Google requests can include google_credential_file on the file route, or a google object with google_language and google_credential_json on the URL route.

The response is wrapped under data and includes either an azure object or a google object, depending on which provider you selected. The schemas do not define fixed label fields, so you should treat the payload as provider-specific label results rather than a rigid document shape.

Use Video Label Detection when you need to classify or index video content for moderation, search, media workflows, or internal review systems without building your own video analysis pipeline.

Provider (requested_service)Atoms
Azure500
Google500
▣ ENDPOINT 01 / 02
POST
Label Detection via file upload
https://api.eu.apyhub.com/apyhub/detect-video-labels/file

QUICKSTART

GUIDE

Quickstart

Upload a video and choose the target service with the required multipart fields.

curl -X POST "https://api.eu.apyhub.com/apyhub/detect-video-labels/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 required data object. That 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*

About this endpoint

What it does

Uploads a file for label detection and routes the request to either Azure or Google based on requested_service. The response returns a JSON object with a data object containing the provider-specific result object for the selected service.

Request Body

ParameterTypeDescription
fileBinaryThe file to analyze. Binary upload.
azure_regionStringAzure region. Example: trial.
azure_account_idStringAzure account ID.
requested_serviceENUMDetermines which provider is used. Allowed values: azure, google.
azure_access_tokenStringAzure access token.
google_credential_fileBinaryGoogle service account JSON file for Google routes. Binary upload.

Response

Returns a JSON object with a data object field. Inside data, the schema defines optional azure and google object fields; the provider-specific result is present for the service that was requested.

ParameterTypeDescription
dataObjectWrapper object containing the provider-specific result.
data.azureObjectPresent when requested_service is azure. Additional properties are allowed.
data.googleObjectPresent when requested_service is google. Additional properties are allowed.

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
Label Detection via URL
https://api.eu.apyhub.com/apyhub/detect-video-labels/url

QUICKSTART

GUIDE

Quickstart

Analyze a video from a public URL by asking the Azure label-detection route for results.

curl -X POST "https://api.eu.apyhub.com/apyhub/detect-video-labels/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 field. For requested_service: "azure", data.azure may be present and contains the Azure-specific result object.

{
  "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 labels in a video fetched from a URL. You send the video URL and choose which service to use in requested_service; the response returns a JSON object with a data object that may contain an azure object or a google object depending on the selected service.

Request Body

ParameterTypeDescription
urlStringThe video file URL to analyze. Must be a URI.
azureObjectAzure-specific credentials and settings for the Azure route.
azure.regionStringAzure region.
azure.account_idStringAzure account ID.
azure.access_tokenStringAzure access token.
googleObjectGoogle-specific settings for the Google route.
google.google_languageStringGoogle language code.
google.google_credential_jsonObjectGoogle Cloud service account JSON, required for Google video routes. Nested fields are defined in the schema.
google.google_credential_json.typeStringService account type.
google.google_credential_json.auth_uriStringGoogle OAuth auth URI.
google.google_credential_json.client_idStringGoogle client ID.
google.google_credential_json.token_uriStringGoogle token URI.
google.google_credential_json.project_idStringGoogle project ID.
google.google_credential_json.private_keyStringGoogle private key.
google.google_credential_json.client_emailStringGoogle service account email.
google.google_credential_json.private_key_idStringGoogle private key ID.
google.google_credential_json.universe_domainStringGoogle universe domain.
google.google_credential_json.client_x509_cert_urlStringGoogle client X.509 certificate URL.
google.google_credential_json.auth_provider_x509_cert_urlStringGoogle auth provider X.509 certificate URL.
requested_serviceENUMService to use. Allowed values: azure, google.

Response

Returns a JSON object with a data object field. Inside data, the response may include an azure object or a google object, depending on the selected requested_service.

ParameterTypeDescription
dataObjectWrapper object for the service-specific result.
data.azureObjectPresent when requested_service is azure. The schema does not define its inner fields.
data.googleObjectPresent when requested_service is google. The schema does not define its inner fields.
▣ 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.