Skip to main content
POST
Create a new segmentation for a file

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

file_id
string<uuid>
required

The ID of the file to segment

Body

application/json

Segmentation configuration

Segmentation configuration (root level) with optional thumbnails configuration.

strategy
enum<string>
required

Segmentation strategy - determines which config you must provide

Available options:
uniform,
shot-detector,
manual,
narrative
uniform_config
object

🎯 REQUIRED when strategy = 'uniform' - Configuration for uniform segmentation.

shot_detector_config
object

🎯 REQUIRED when strategy = 'shot-detector' - Configuration for shot detection segmentation.

manual_config
object

🎯 REQUIRED when strategy = 'manual' - Configuration for manual segmentation.

narrative_config
object

🎯 REQUIRED when strategy = 'narrative' - Configuration for narrative-based chapter segmentation using AI analysis.

keyframe_config
object

When provided, will be used to extract keyframes for the segmentation.

start_time_seconds
number

Optional: The start time of the video in seconds to start segmenting from

Required range: x >= 0
end_time_seconds
number

Optional: The end time of the video in seconds to stop segmenting at

Required range: x >= 0
thumbnails_config
object

Configuration for segment thumbnails. Optional.

Response

Segmentation created successfully

segmentation_id
string<uuid>
required

Unique identifier for the segmentation job

status
enum<string>
required

Status of the segmentation job. If a job has the status 'not_applicable' it means that we were unable to find any appropriate scenes for this video. This can be possible if you use the shot-detector strategy.

Available options:
pending,
processing,
completed,
failed,
not_applicable
created_at
number
required

Unix timestamp in milliseconds when the segmentation was created

Required range: x >= 0
file_id
string<uuid>
required

ID of the file this segmentation belongs to

segmentation_config
object
required

Configuration for video segmentation. Choose a strategy and provide ONLY the corresponding config:

uniform: Provide uniform_config, do NOT provide other configs • shot-detector: Provide shot_detector_config, do NOT provide other configs • manual: Provide manual_config, do NOT provide other configs • narrative: Provide narrative_config, do NOT provide other configs

Optionally specify start_time_seconds and end_time_seconds to limit segmentation to a portion of the video.

thumbnails_config
object
required
total_segments
number

Total number of segments in this segmentation (only present when status is completed)

Required range: x >= 0
total_shots
number

Total number of shots in this segmentation (only present when status is completed and segmentation_config.strategy is 'shot-detector')

Required range: x >= 0
total_chapters
number

Total number of chapters in this segmentation (only present when status is completed and segmentation_config.strategy is 'narrative')

Required range: x >= 0
data
object

Segment data with pagination (only present when status is completed and segments exist)