Skip to main content

What You’ll Learn

In this quickstart you will:
  • Upload a video to Mavera using the Files API (presigned URL flow) so it can be used as input for analysis.
  • Create a video analysis job with a title, goal, brand/product context, and analysis settings (chunk duration, frames per chunk).
  • Poll for completion and then read full-video metrics (overall score, emotional impact, attention, CTA effectiveness) and chunk-level breakdowns.
  • Optionally use the analysis chat endpoint to ask follow-up questions (e.g. “What are the weakest moments and how can I improve them?”).
Video Analysis is built for ad creatives, product videos, and any content where you want measurable engagement and emotional signals.
Time: About 20 minutes (upload is quick; analysis can take 2–10 minutes depending on video length). Credits: Approximately 100–500 credits depending on duration; see table below.

Prerequisites

Mavera account with an active subscription and enough credits (video analysis is credit-heavy).
API key from Developer Settings.
Workspace ID where the video file and analysis will live. Find it in the dashboard or via the workspaces API.
A video file on your machine (e.g. MP4, MOV). Short clips (e.g. 15–60 seconds) are best for a first run; max size is 2 GB for video files.

Overview of the Flow

1

Upload the video

Use the Files API: request a presigned upload URL, upload the file to that URL, then create a file record. You receive a file ID (used as asset_id for video analysis).
2

Create the analysis

Call POST /video-analyses with asset_id (your file ID), plus title, goal, brand, product, intent, and analysis options. You receive an analysis ID and initial status (e.g. PENDING).
3

Poll until completed

Call GET /video-analyses/{id} periodically until status is COMPLETED. Analysis typically takes a few minutes.
4

Read results

From the completed analysis, use results.full_video_metrics for overall scores and results.chunks for segment-by-segment breakdowns. Optionally use POST /video-analyses/{id}/chat to ask questions about the analysis.

Step 1: Upload the Video (Files API)

Videos must be in Mavera’s storage before you can analyze them. The Files API uses a presigned URL flow: you never send the file bytes to the Mavera API server; you upload directly to storage.

Step 1a: Request a presigned upload URL

Send file metadata (name, type, size, workspace_id) to get an upload_url and public_url.

Step 1b: Upload the file to the presigned URL

Use a PUT request with the file body and the correct Content-Type.

Step 1c: Create the file record

Register the file with Mavera so you get a stable file ID (this is the asset_id for video analysis).
Presigned URLs expire (often within an hour). Upload the file and create the record soon after requesting the URL. If upload fails, request a new URL and retry.

Step 2: Create the Video Analysis

Pass the asset_id (your file ID) plus metadata and analysis options. The API returns an analysis ID and status (e.g. PENDING or RUNNING).

Step 3: Poll Until Completed

Analysis runs asynchronously. Poll GET /video-analyses/{id} every 15–30 seconds until status is COMPLETED.

Step 4: Read the Results

Once status is COMPLETED, the response includes a results object with full-video metrics and chunks (segment-level data).
Typical full_video_metrics fields: Chunks give you segment-level engagement, emotional valence, key moments, and optional recommendations per segment.

Step 5: Chat About the Analysis (Optional)

You can ask natural-language questions about the completed analysis (e.g. weak spots, how to improve). Use POST /video-analyses/{id}/chat.

Credit Costs

File upload and chat about results use additional credits; see Credits and the API reference.

Common Issues

Request a new upload URL and retry the PUT and file record creation. Don’t delay between getting the URL and uploading.
Use the id returned from POST /files after uploading. Ensure the file is in the same workspace you use in the analysis request.
Longer videos take longer. Poll for several minutes; if it never completes, check status or contact support.
Video files are supported up to 2 GB. Use a supported type (e.g. video/mp4, video/quicktime). See Files.
Video analysis is credit-intensive. Refill credits or use a shorter clip; see Credits.

Next Steps

Video Analysis

All metrics, chunk options, and response shapes

Files & Folders

Upload flow, folders, and using files with other APIs

Workspaces

Organize files and analyses by workspace

API Reference

Full video analysis request/response specification
Use video analysis to compare creatives, optimize ad length, or improve CTA placement—then iterate with new uploads and analyses.