API Reference
Video classification
POST
/
v1
/
classifications
/
video
Video classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/video \
--header 'Content-Type: application/json' \
--data '
{
"inputs": "<string>",
"top_k": 5,
"num_frames": 16,
"frame_sampling_rate": 1,
"function_to_apply": "softmax"
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/video"
payload = {
"inputs": "<string>",
"top_k": 5,
"num_frames": 16,
"frame_sampling_rate": 1,
"function_to_apply": "softmax"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]Body
application/json
Request schema for video classification pipelines.
Video URL or local path (single or list). Required.
Number of top labels to return.
Number of frames sampled from the video to run inference on.
Sampling rate used to select frames from the video.
Function to apply to raw model outputs to obtain scores.
Available options:
sigmoid, softmax, none ⌘I
Video classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/video \
--header 'Content-Type: application/json' \
--data '
{
"inputs": "<string>",
"top_k": 5,
"num_frames": 16,
"frame_sampling_rate": 1,
"function_to_apply": "softmax"
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/video"
payload = {
"inputs": "<string>",
"top_k": 5,
"num_frames": 16,
"frame_sampling_rate": 1,
"function_to_apply": "softmax"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]