apyhub
ARTIFICIAL INTELLIGENCE · FILE CONVERSION

Detect Shot Changes

What it does

Shot Change Detection analyzes a video and returns detection results through either Azure or Google processing, depending on the service you request. Send a video by URL with url and requested_service, or upload a file with file and requested_service.

Use the URL route when the video is already hosted, or the file route when you want to upload the media directly. For Azure requests, the URL route accepts an azure object and the file route accepts azure_region, azure_account_id, and azure_access_token. For Google requests, the URL route accepts a google object with google_language and google_credential_json, and the file route accepts google_credential_file.

The response is wrapped under data, with either an azure object or a google object present according to the service you requested. The API does not prescribe the internal shape of those objects here, so you can treat them as the service-specific detection output.

This is useful when you need to segment video content into shots for editing workflows, scene indexing, preview generation, or downstream video analysis. It lets you plug shot boundary detection into applications without building your own media-processing pipeline.

▣ ENDPOINT 01 / 02
POST
Shot Change Detection via URL
https://api.eu.apyverse.com/apyhub/detect-shot-changes/url

QUICKSTART

GUIDE

Quickstart

Detect shot changes from a video URL using the Azure service.

curl -X POST "https://api.eu.apyverse.com/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"
  }'

What you'll get back

Returns a JSON object with a data object. When requested_service is azure, the data object includes an azure object with the shot-change detection result.

{
  "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 in a video fetched from a URL and returns the result in a JSON object. The request body lets you choose the processing service with requested_service and provide the URL plus any service-specific credentials needed for that route.

Request Body

ParameterTypeMandatoryDescription
urlStringYesVideo URL to process. 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; see schema for nested fields.
requested_serviceENUMYesProcessing service to use. Allowed values: azure, google.

Response

Returns a JSON object with a required data object field. Inside data, the schema defines optional azure and google object fields; each is present when the corresponding requested_service was used.

ParameterTypeMandatoryDescription
dataObjectYesResponse wrapper containing service-specific 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
▣ ENDPOINT 02 / 02
POST
Shot Change Detection via file upload
https://api.eu.apyverse.com/apyhub/detect-shot-changes/file

QUICKSTART

GUIDE

Quickstart

Upload one file and choose the service to detect shot changes.

curl -X POST "https://api.eu.apyverse.com/apyhub/detect-shot-changes/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/video.mp4" \
  -F "requested_service=azure"

What you'll get back

Returns a JSON object with a data object field. The data object can 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 shot change detection using either the Azure or Google route, depending on requested_service. The response returns a data object containing the provider-specific result object for the selected route.

Request Body

ParameterTypeMandatoryDescription
fileStringYesThe file to analyze, sent as binary data.
requested_serviceENUMYesWhich provider route to use. Allowed values: azure, google.
azure_regionStringNoAzure region. Example: trial.
azure_account_idStringNoAzure account identifier.
azure_access_tokenStringNoAzure access token.
google_credential_fileStringNoGoogle service account JSON, sent as binary data. Only relevant for Google routes.

Response

Returns a JSON object with a data object field. The data object may include an azure object when requested_service is azure, or a google object when requested_service is google.

ParameterTypeMandatoryDescription
dataObjectYesWrapper object for the provider result. May include azure and/or google depending on the selected service.
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.