AI Composition - Avatar Videos
AI Composition
The compose action uses AI to generate scenes from source video content. It analyzes captions and transcripts from the provided entries and creates a structured narration script.
Compose Scenes from Content
curl -s -X POST "$AVATAR_API/video/compose" \
-H "Authorization: Bearer $KS" \
-H "Content-Type: application/json" \
-d "{
\"id\": \"$VIDEO_ID\",
\"formatType\": \"session-highlights\",
\"duration\": 120,
\"entryIds\": [\"$SOURCE_ENTRY_1\", \"$SOURCE_ENTRY_2\"],
\"userBrief\": \"Focus on the product roadmap announcements\",
\"generateName\": true
}"
Request fields:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Video project ID |
formatType | string | yes | "session-highlights" or "video-explainer" (see below) |
duration | number | yes | Target video duration in seconds. Min: 1, max: 1200 (20 minutes) |
entryIds | array | yes | Kaltura entry IDs with captions to analyze |
userBrief | string | no | Describes the video goals, style, or focus areas for the AI |
generateName | boolean | no | Auto-generate a video name from the content |
Format types:
| Format | Source Content | Output |
|---|---|---|
session-highlights | Video captions only | Short highlights video narrated by the avatar summarizing the key points |
video-explainer | Video captions + documents | Explainer video combining multiple sources into a coherent narrative |
The compose action:
- Transitions the video status to
composing - Extracts captions and documents from the source entries
- Uses AI (AWS Bedrock Claude) to generate a structured scene-by-scene narration
- Populates the video's
scenesarray with the generated content - Transitions to
composedon success, orcompose-erroron failure
Source entries require captions or transcripts — add them via REACH before composing. The API returns CAPTIONS_NOT_FOUND if text content is missing.
Response: Returns the video with status composing. Poll video.get until status changes to composed.