apyhub
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
http://localhost:8080/apyhub/detect-video-labels/file
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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*
Service account JSON (Google routes).

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

ParameterTypeMandatoryDescription
fileStringYesThe file to analyze. Binary upload.
azure_regionStringNoAzure region. Example: trial.
azure_account_idStringNoAzure account ID.
requested_serviceENUMYesDetermines which provider is used. Allowed values: azure, google.
azure_access_tokenStringNoAzure access token.
google_credential_fileStringNoGoogle 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.

ParameterTypeMandatoryDescription
dataObjectYesWrapper object containing the provider-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

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
http://localhost:8080/apyhub/detect-video-labels/url
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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

ParameterTypeMandatoryDescription
urlStringYesThe video file URL to analyze. Must be a URI.
azureObjectNoAzure-specific credentials and settings for the Azure route.
azure.regionStringNoAzure region.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoAzure access token.
googleObjectNoGoogle-specific settings for the Google route.
google.google_languageStringNoGoogle language code.
google.google_credential_jsonObjectNoGoogle Cloud service account JSON, required for Google video routes. Nested fields are defined in the schema.
google.google_credential_json.typeStringNoService account type.
google.google_credential_json.auth_uriStringNoGoogle OAuth auth URI.
google.google_credential_json.client_idStringNoGoogle client ID.
google.google_credential_json.token_uriStringNoGoogle token URI.
google.google_credential_json.project_idStringNoGoogle project ID.
google.google_credential_json.private_keyStringNoGoogle private key.
google.google_credential_json.client_emailStringNoGoogle service account email.
google.google_credential_json.private_key_idStringNoGoogle private key ID.
google.google_credential_json.universe_domainStringNoGoogle universe domain.
google.google_credential_json.client_x509_cert_urlStringNoGoogle client X.509 certificate URL.
google.google_credential_json.auth_provider_x509_cert_urlStringNoGoogle auth provider X.509 certificate URL.
requested_serviceENUMYesService 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.

ParameterTypeMandatoryDescription
dataObjectYesWrapper object for the service-specific result.
data.azureObjectNoPresent when requested_service is azure. The schema does not define its inner fields.
data.googleObjectNoPresent when requested_service is google. The schema does not define its inner fields.

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.