Skip to content

Analyse a container ​

The Aive API allows you to start an analysis process on an uploaded container.

The analysis extracts additional information from the media content. The amount of information extracted depends on the selected analysis level.

The analysis process is asynchronous and can take time depending on the size and complexity of the container.

Prerequisites ​

Before starting an analysis:

  • The container must exist.
  • The container upload process must be completed successfully.
  • The container's uploadStatus must be succeeded.

A container that is still being uploaded or extracted cannot be analyzed.

Automatic analysis ​

Some workspaces are configured to start container analysis automatically after a successful upload.

If this feature has been enabled for your workspace by the Aive team:

  • you do not need to call the analyseContainer mutation;
  • analysis starts automatically once the container extraction has completed successfully;
  • you can proceed directly to Monitor analysis status.

If you are unsure whether automatic analysis is enabled for your workspace, contact the Aive team.

Start container analysis ​

Use the analyseContainer mutation to start the analysis process.

Mutation ​

graphql
mutation AnalyseContainer($input: AnalyseContainerInput!) {
  analyseContainer(input: $input) {
    ... on AnalyseContainerResult {
      result
    }
    ... on AnalyseContainerError {
      code
      message
    }
  }
}

Variables ​

json
{
  "input": {
    "id": "<container_id>",
    "sendNotification": true,
    "manifestLevel": "S"
  }
}

Parameters ​

ParameterTypeDescription
idIDThe ID of the container to analyze. It must have completed its upload extraction successfully.
sendNotificationBooleanIf enabled, an email notification is sent when the analysis completes.
manifestLevelEnumThe depth of information to extract during the analysis. See Analysis levels.
laneStringProcessing lane used for the analysis. Administrator only — external API clients should not provide this field.
checkManifestBooleanEnables manifest validation before starting the analysis. Administrator only — external API clients should not provide this field.

Analysis levels ​

The manifestLevel parameter controls the depth of the analysis.

Higher levels extract more information and may require more processing time.

LevelDescriptionWhat's extracted
SExtracts a basic amount of information.Audio: speech transcription, audio event detection, key-moment identification, and the most relevant audio highlights. Video: each shot's focal point, shot detection, thumbnails, and the most relevant video highlights.
MExtracts more information than S.Same audio as S. Video: adds dominant color analysis, additional shot-level metadata, and on-screen text recognition.
LExtracts more information than M. The minimum level required to score a container.Same audio as M. Video: adds object detection, scene detection, and automatic content description.
XLExtracts the highest amount of information. Recommended when scoring a container.Same audio as L. Video: adds action recognition, human detection, and logo detection.

Choose the analysis level according to your use case and the amount of information required. If you plan to score the container afterwards, manifestLevel: L is the minimum required, but the score is computed from the analysis results, so scoring is most relevant when the container was analyzed with manifestLevel: XL. See the ManifestLevel reference for the exact, versioned breakdown.

Monitor analysis status ​

The analysis runs asynchronously as a background job.

The analysis happens separately for each stream (audio or video) inside the container. To get each analysis progress, you can either:

  • subscribe to the analysisCompleted webhook event
  • set sendNotification: true to receive an email
  • query the container to get its streams list. For each stream you can read its analysisStatus value. Once all streams in a container have an analysisStatus value of succeeded, the container becomes usable for all Aive features.

See Event handling for details, including the event payload and the full list of status values.

Notifications ​

If sendNotification is set to true, Aive sends an email notification when the analysis process completes.

Set it to false if you're subscribed to the analysisCompleted webhook event instead.

Retry behavior ​

Calling analyseContainer on a container that is already being analyzed, or has already been analyzed, is ignored — the API does not start a new analysis process in this case.

Errors ​

Error codeDescription
alreadyInProgressThe container is already being analyzed.

See Error handling for how these typed errors are returned.

Analysis results ​

The analysis results are processed internally by Aive.

The public API does not currently expose the extracted analysis data to API clients — the result of an analysis is that the container becomes eligible for scoring at the requested manifestLevel.

Best practices ​

  • Check that a workspace has automatic analysis enabled before calling analyseContainer yourself, to avoid confusion over which trigger started the job.
  • Analyze with manifestLevel: L at minimum if you plan to score the container, but prefer manifestLevel: XL for the most relevant score, since scoring is computed from the analysis results.
  • Prefer subscribing to the analysisCompleted webhook event over polling the streams' analysisStatus.
  • Do not provide lane or checkManifest; they are reserved for Aive administrators.