Skip to main content

Analyze Video

POST /v1/videos/:id/analyze

Start an asynchronous analysis job that generates subtitles, detects key events, and extracts metadata from the video.

Path parameters

ParameterTypeRequiredDescription
idstringYesVideo ID

Request body

All optional.

ParameterTypeDescription
videoContextstringWhat the video shows
companyContextstringCompany or product background
languagestringLanguage code (see codes)
tonestringDesired tone, e.g. professional, casual
contentStylestringhow-to (default), sop, promotional, training, announcement
productNamestringReferenced by name when contentStyle is promotional
scriptSourcestringvideo (default), transcript, original, custom
customScriptstringYour own script. Required when scriptSource is custom.
scriptSkillIdstringBrand Kit script skill, applied as a style guide
forceRefreshbooleanRe-run even if a cached analysis exists
keyEventsarrayPre-identified moments to build the script around, instead of detecting them
analysisModelstringModel used to analyze the footage (gemini)
subtitleModelstringModel used to generate subtitles (openai or gemini)
autoZoombooleanGenerate zoom moments from detected interactions

keyEvents accepts either plain strings or { text, timestamp } objects. It's the hook for callers that already know the steps - a recorder that logged every click, for instance - and want the script built around them rather than rediscovered.

Content style

contentStyle shapes the structure and register of the generated script. An SOP reads as numbered procedure; a training video builds up concepts; a promotional video leads with outcomes. Getting this right matters more than editing the result afterwards.

Script source

ValueWhat happens
videoAnalyzes the footage and writes a script from what it sees. The default.
transcriptReuses what the speaker actually said, cleaned up
originalKeeps the speaker's own audio rather than generating narration
customUses the script you pass in customScript, timed to the footage
curl -X POST https://api.vidocu.ai/v1/videos/vid_abc123/analyze \
-H "Authorization: Bearer vdo_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"contentStyle": "sop",
"language": "de",
"companyContext": "Industrial label printers for pharmaceutical packaging"
}'

Example

curl -X POST https://api.vidocu.ai/v1/videos/vid_.../analyze \
-H "Authorization: Bearer vdo_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"videoContext": "Product demo for new dashboard",
"language": "en",
"tone": "professional"
}'

Response 202 Accepted

{
"jobId": "analysis_1708300000000_abc1234",
"status": "pending"
}

If an analysis is already running for this video, the existing job is returned instead:

Response 200 OK (existing job)

{
"jobId": "analysis_1708300000000_abc1234",
"status": "processing",
"message": "Analysis already in progress"
}

Polling for completion

Use the Jobs endpoint to poll for progress:

curl https://api.vidocu.ai/v1/jobs/analysis_1708300000000_abc1234 \
-H "Authorization: Bearer vdo_live_your_key_here"

Or set up webhooks to receive a video.analyzed event when the job completes.

Errors

StatusCodeCause
400validation_errorInvalid request body
401authentication_errorInvalid or missing API key
404not_foundVideo not found
423lockedThe video is locked - unlock it in the Vidocu app before you re-analyze it
Locked videos

A locked video's content is frozen through its approval cycle, so this endpoint returns 423 Locked. Check locked on GET /v1/videos/:id first. Exporting a locked video still works.

Next steps

Once analysis completes: