Create intelligent segments for video or audio files based on shot detection or narrative analysis.
Audio File Support:
Note: YouTube URLs and audio files are supported for narrative-based segmentation only. Shot-based segmentation requires direct video file access. Use Cloudglue Files, HTTP URLs, or files from data connectors for shot-based segmentation.
Narrative Segmentation Strategies:
YouTube URLs and Audio Files: Automatically use the ‘balanced’ strategy. The strategy field is ignored, and other strategies will be rejected with an error.
Chapter Count Parameters:
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Segmentation job parameters
Input video or audio file URL. Supports URIs of files uploaded to Cloudglue Files endpoint, public HTTP URLs, YouTube URLs (narrative criteria only), and files which have been granted access to Cloudglue via data connectors.
⚠️ Important: YouTube URLs and audio files are ONLY supported for narrative-based segmentation. Shot-based segmentation requires direct video file access and does not support YouTube URLs or audio files. For YouTube URLs and audio files with narrative segmentation, the 'balanced' strategy is automatically used regardless of the strategy field value. Other strategies will be rejected with an error. For files via our Data connectors, see our documentation on data connectors for setup information.
Segmentation criteria: • shot: Detect scene changes and shot boundaries using computer vision (not supported for YouTube URLs or audio files) • narrative: Identify logical narrative segments and chapters using AI analysis (supports YouTube URLs and audio files)
shot, narrative Configuration for shot-based segmentation. Only provide when criteria is 'shot'.
Configuration for narrative-based segmentation. Only provide when criteria is 'narrative'.
Successful response
Unique identifier for the segment job
ID of the file this segment belongs to
Object type, always 'segments'
segments Current status of the segment job
pending, processing, completed, failed Segment criteria used for this job
shot, narrative Unix timestamp in milliseconds when the job was created
Configuration used for shot-based segmentation (only present when criteria is 'shot')
Configuration used for narrative-based segmentation (only present when criteria is 'narrative')
Total number of segments generated (only present when status is 'completed')
x >= 0Total number of shots in the original video (only present when criteria is 'shot')
x >= 0Total number of chapters in the video (only present when criteria is 'narrative')
x >= 0Array of generated segments (only present when status is 'completed')
Array of shots in the original video (only present when criteria is 'shot')
Array of narrative chapters in the video (only present when criteria is 'narrative')