apyhub
ARTIFICIAL INTELLIGENCE · IMAGE PROCESSING

AI Video Shot Change Detection API

Hosted on ApyHub

What it does

Shot Change Detection analyzes a video file or video URL and returns detection results under the requested provider response. Send the media as a binary file or as a URL, then choose requested_service as azure or google.

Use the /file endpoint when you already have the video on hand. It requires file and requested_service, and can also accept Azure credentials such as azure_region, azure_account_id, and azure_access_token, or a Google service account file in google_credential_file for Google routes. Use /url when the video is already hosted elsewhere; it requires url and requested_service, and can include Azure settings in the azure object or Google settings in the google object, including google_language and google_credential_json.

The response is wrapped in data and returns either an azure object or a google object depending on the selected service. That makes it straightforward to plug into workflows that need to segment long-form video, identify scene boundaries, or trigger downstream processing when the content changes.

If you are building media indexing, video review tooling, or highlight extraction, Shot Change Detection gives you a provider-aware endpoint for turning video input into shot-level change results.

Provider (requested_service)Atoms
Azure500
Google500
▣ ENDPOINT 01 / 02
POST
Shot Change Detection via file upload
http://localhost:8080/apyhub/detect-shot-changes/file
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/apyhub/detect-shot-changes/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. 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 shot change detection using the requested service provider. The response returns a JSON object with a data object that may include either an azure object or a google object, depending on requested_service.

Request Body

ParameterTypeMandatoryDescription
fileStringYesBinary file upload.
azure_regionStringNoAzure region. Example: trial.
azure_account_idStringNoAzure account ID.
requested_serviceENUMYesService provider to use. Allowed values: azure, google. Example: azure.
azure_access_tokenStringNoAzure access token.
google_credential_fileStringNoBinary service account JSON file for Google routes.

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.
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
Shot Change Detection via URL
http://localhost:8080/apyhub/detect-shot-changes/url
QUICKSTARTGUIDE

Quickstart

Check a video URL for shot changes using the Azure service.

curl -X POST "http://localhost:8080/apyhub/detect-shot-changes/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 response payload.

{
  "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 shot changes for a video file provided by URL and returns a JSON object with the detected result under data. The response shape varies by requested_service: either data.azure or data.google is present.

Request Body

ParameterTypeMandatoryDescription
urlStringYesVideo file URL. Must be a valid URI.
azureObjectNoAzure-specific configuration.
azure.regionStringNoAzure region.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoAzure access token.
googleObjectNoGoogle-specific configuration.
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 azure and/or google objects; data.azure is present when requested_service is azure, and data.google is present when requested_service is google.

ParameterTypeMandatoryDescription
dataObjectYesResult wrapper object. Contains azure and/or google depending on requested_service.
data.azureObjectNoPresent when requested_service is azure.
data.googleObjectNoPresent when requested_service is google.

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.