AI chapter detection and video segmentation
| Method | Path | Summary |
|---|---|---|
GET | /videos/{videoId}/chapters | List chapters for a video |
POST | /videos/{videoId}/chapters | Create a chapter |
POST | /videos/{videoId}/chapters/detect | Start AI chapter detection |
{% api-endpoint method=“GET” path=“/videos/{videoId}/chapters” /%}
List chapters for a video
Operation ID: listChapters
| Name | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | - |
List of chapters
| Field | Type | Required | Description |
|---|---|---|---|
chapters | object[] | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.chapters.listChapters("abc-123");
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.chapters.list_chapters(
video_id="abc-123"
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X GET 'https://api.wave.online/videos/abc-123/chapters' \
-H 'Authorization: Bearer YOUR_API_KEY'
{% /tab %} {% /tabs %}
{% api-endpoint method=“POST” path=“/videos/{videoId}/chapters” /%}
Create a chapter
Operation ID: createChapter
| Name | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | - |
Content-Type: application/json
| Required
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | - |
description | string | No | - |
startTime | number | Yes | - |
endTime | number | Yes | - |
Chapter created
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | - |
videoId | string | No | - |
title | string | No | - |
description | string | No | - |
startTime | number | No | - |
endTime | number | No | - |
thumbnailUrl | string (uri) | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.chapters.createChapter("abc-123", {
title: "example-value",
description: "example-value",
startTime: 1,
endTime: 1,
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.chapters.create_chapter(
video_id="abc-123",
title="example-value",
description="example-value",
start_time=1,
end_time=1
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/videos/abc-123/chapters' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"title": "example-value",
"description": "example-value",
"startTime": 1,
"endTime": 1
}'
{% /tab %} {% /tabs %}
{% api-endpoint method=“POST” path=“/videos/{videoId}/chapters/detect” /%}
Start AI chapter detection
Operation ID: detectChapters
| Name | Type | Required | Description |
|---|---|---|---|
videoId | string | Yes | - |
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
minDuration | number | No | Default: 30 |
maxChapters | integer | No | - |
includeDescriptions | boolean | No | Default: true |
includeThumbnails | boolean | No | Default: true |
Detection job started
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | - |
status | string | No | Values: pending, processing, completed, failed, cancelled |
progress | integer | No | - |
createdAt | string (date-time) | No | - |
{% tabs %} {% tab label=“TypeScript” %}
import { WaveClient } from "@wave/sdk";
const client = new WaveClient({ apiKey: "your-api-key" });
const result = await client.chapters.detectChapters("abc-123", {
minDuration: 30,
maxChapters: 1,
includeDescriptions: true,
includeThumbnails: true,
});
console.log(result);
{% /tab %} {% tab label=“Python” %}
from wave_sdk import WaveClient
client = WaveClient(api_key="your-api-key")
result = client.chapters.detect_chapters(
video_id="abc-123",
min_duration=1,
max_chapters=1,
include_descriptions=True,
include_thumbnails=True
)
print(result)
{% /tab %} {% tab label=“cURL” %}
curl -X POST 'https://api.wave.online/videos/abc-123/chapters/detect' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"minDuration": 30,
"maxChapters": 1,
"includeDescriptions": true,
"includeThumbnails": true
}'
{% /tab %} {% /tabs %}