Skip to main content
You can classify a video either from a file or a URL.
This section explains how to make a request using a file. For a URL, the process is similar, with the main difference being the endpoint to call in step 1.

Submission guidelines

Video analysis involves processing the video to extract specific frames. For this, the guidelines to follow are similar to those for images:
  • Send the video “closest” to the source to the system: this means, for example, not sending a video of a photo for photo analysis, or a video filmed from another video.
  • In the case of videos taken from social media, the most accurate results are obtained by sending videos without superimposed texts or modifications typical of social shares.
  • If available from other sources, avoid submitting social links due to the post-processing of various platforms.
During submission, it is possible to exclude morphing models. We advise against enabling the morphing model in the absence of faces to avoid the risk of false positives.

Frame extraction strategy selection

Only for videos, it is necessary to select a frame extraction strategy: these will then be analyzed by the detection models. The frame extraction strategies are described below:

Time-spaced

With this mode, N frames (depending on the “Maximum number of frames” selection) are extracted, equally spaced along the duration of the video. In order to enable this, you must add the following parameters:
frames controls how many frames to extract at least. You can select between 5, 10 and 30. A higher number of analyzed frames corresponds to a higher number of credits used for the analysis.

Key frames

  • Key frames - Default: with this mode, up to N iframes are extracted. These frames represent sudden scene changes in the video and are therefore potentially of interest for analyzing different scenes.
  • Key frames - Color: with this mode, up to N frames are extracted that represent the “average” frame of a scene, calculated based on the colors within the image.
  • Key frames - Flow: with this mode, up to N frames are extracted that represent the “stillest” frame of a scene, calculated relative to the previous frame of the scene.
frames controls how many frames to extract at least. You can select between 5, 10 and 30. A higher number of analyzed frames corresponds to a higher number of credits used for the analysis.

Faces

With this mode, the system looks for frames containing at least one face: starting from time-spaced sampling, it searches the video for frames with faces until it reaches the number of frames to analyze. It is the suggested strategy for face swap and morphing detection, together with with_morphing=true.
  • It is an alternative to key frames: when ensure_face_per_frame=true, key_frames and key_frames_method are ignored.
  • The search is time-limited: on videos where faces are rare or absent, fewer frames may be analyzed. Frames that are not analyzed are refunded once the analysis is complete.
  • The search may increase the processing time and, depending on your pricing plan, the cost of each frame.
Face extraction is a pricing plan feature: if your plan does not include it, ensure_face_per_frame is ignored and the video is analyzed with the other strategies.

Specific moments

If you already know which moments of the video are relevant (e.g. the seconds where a face appears or a suspicious scene starts), you can ask the system to analyze exactly those moments: one frame is extracted at each listed timecode.
  • Timecodes are comma-separated and in HH:MM:SS.mmm format (hours, minutes, seconds and milliseconds), measured from the beginning of the video. Duplicates are counted once.
  • When frames_timestamps is provided, it takes precedence over the other strategies: frames, key_frames, key_frames_method and ensure_face_per_frame are ignored.
  • One frame is charged for each distinct timecode. You can list up to 30 timecodes if your pricing plan lets you choose the number of frames, otherwise up to the default number of frames (10).
  • Timecodes beyond the end of the video are skipped; if none of them falls within the video, the classification ends with an error.
The same applies to the audio track of the video, analyzed with with_audio=true: with audio_timestamps the system analyzes a short audio chunk centred on each listed timecode instead of chunks spread over the whole track. Timecodes close enough to fall within the same chunk are analyzed together, and one audio chunk is charged for each distinct timecode (chunks that are not produced are refunded once the analysis is complete). You can list up to 30 audio timecodes if your pricing plan lets you choose the number of audio chunks, otherwise up to 5.
Specific moments are a pricing plan feature, enabled separately for frames and for audio: if your plan does not include them, frames_timestamps and audio_timestamps are ignored. Malformed timecodes or more timecodes than allowed are rejected with a 400 error.

Submit a video using the API

To classify a video, you need to make a POST request to /api/classification_video with the required parameters (for details on the parameters, refer to the API Reference section).
In the response you will receive the identifier of the classified video. To analyze specific moments of the video and of its audio track instead:

Retrieve the results

Use the provided identifier to retrieve the classification results by making a GET request to /api/classification_video/{identifier} (for details on how to structure this request, see the API Reference section).
The response will provide the classification results for the video in JSON format. For video classification, the video is divided into frames. In the response, you will find a results array that includes the classification outcomes for each model applied to each analyzed frame, and a verdicts array containing the results for each heuristic used.
The classification may not be finished yet! If the classification is not yet complete, continue sending the GET request until the result is available.

Guidelines on interpreting the results

The results of the video contains both the global verdicts and the individual result on the single analyzed frames. We suggest looking at interpreting image result

Heatmaps on video

For heatmaps on video, the considerations are the same as those on images. The only addition is that to analyze the heatmap, you need to click on Frames and analyze the heatmap of each individual frame.

See also

Classify an image

Start an image classification and find out if your image is real or artificially generated!

Classify a speech

Find out how to start a speech classification and discover whether your speech is authentic or artificially generated