Video Integration
Seamlessly integrate video content into your learning experiences. Upload, transcode, stream, and track engagement with our multimedia APIs.
Embedding a Video in a Lesson
// Upload and attach a video to a lesson
const video = await client.videos.create({
title: "Cell Division Explained",
source_url: "https://storage.example.com/cell-division.mp4",
chapters: [
{ title: "Introduction", timestamp: "0:00" },
{ title: "Mitosis", timestamp: "2:15" },
{ title: "Meiosis", timestamp: "8:30" },
{ title: "Summary", timestamp: "14:00" }
],
captions: { language: "en", auto_generate: true }
});
// Attach to a lesson
await client.lessons.update("les_abc123", {
content: {
sections: [
{ type: "video", video_id: video.id }
]
}
});Endpoints
/v1/videosList all uploaded videos with filtering and pagination.
Query Parameters
subjectstring - Filter by subjectstatusstring - Processing status (processing,ready,failed)has_captionsboolean - Only videos with captionslimitinteger - Records per page (default: 20)
/v1/videosUpload a new video. Supports direct upload or URL-based ingestion. Videos are automatically transcoded for adaptive streaming.
Request Body
titlestring required - Video titlesource_urlstring - URL to fetch the video fromchaptersobject[] - Chapter markers with titles and timestampscaptionsobject - Caption configurationthumbnail_urlstring - Custom thumbnail image
/v1/videos/:idRetrieve video details including streaming URLs, chapters, captions, and analytics.
{
"id": "vid_xyz789",
"title": "Cell Division Explained",
"status": "ready",
"duration": "16:42",
"streaming_url": "https://stream.plum.ng/vid_xyz789/manifest.m3u8",
"thumbnail_url": "https://cdn.plum.ng/thumbs/vid_xyz789.jpg",
"chapters": [
{ "title": "Introduction", "timestamp": "0:00" },
{ "title": "Mitosis", "timestamp": "2:15" },
{ "title": "Meiosis", "timestamp": "8:30" },
{ "title": "Summary", "timestamp": "14:00" }
],
"captions": [
{ "language": "en", "url": "https://cdn.plum.ng/captions/vid_xyz789_en.vtt" }
],
"analytics": {
"total_views": 342,
"avg_watch_time": "12:18",
"completion_rate": 0.73
}
}/v1/videos/:id/analyticsDetailed viewing analytics — watch time, drop-off points, chapter engagement, and rewatch patterns.
/v1/videos/:idDelete a video and all associated assets (transcoded files, captions, thumbnails).
Features
Adaptive Streaming
Videos are transcoded into multiple quality levels for smooth playback on any connection.
Auto Captions
Automatically generate captions using AI-powered speech recognition in 30+ languages.
Chapter Markers
Add chapters to make long videos navigable. Students can jump to specific topics.
Watch Analytics
Track viewing patterns, identify drop-off points, and measure content effectiveness.