About this endpoint
What it does
Extracts frames from one or more video URLs and returns a JSON object containing the total frame count and an items array of result objects.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| mode | ENUM | Yes | Extraction mode. Allowed values: count (extract frameCount evenly spaced frames), scenes (extract a frame at every scene change), interval (extract one frame every everySeconds seconds), timestamps (extract frames at the exact times listed in timestamps). |
| width | Integer | No | Resize frames to this width while keeping aspect ratio. Never upscales. 0 keeps the original size. |
| format | ENUM | No | Output image format. Allowed values: jpg, png, webp. jpg is smallest, png is lossless, webp is a compromise. |
| quality | Integer | No | Quality for jpg and webp, from 1 to 100. Higher values produce better quality and larger files. Ignored for png. |
| videoUrls | String Array | No | Direct links to video files. Supported file types include mp4, mov, webm, mkv, and m4v. Links must be public and point directly to the file. YouTube, TikTok, Instagram, and Facebook page links are not supported and are skipped. |
| frameCount | Integer | No | Used in count mode. Number of evenly spaced frames to extract per video, limited by maxFramesPerVideo. |
| timestamps | String Array | No | Used in timestamps mode. Times to extract, as seconds such as 12.5 or as HH:MM:SS such as 00:01:02.5. Times beyond the video end are skipped. |
| contactSheet | Boolean | No | Also creates one tiled grid image per video with all frames and their timecodes. This adds one extra result row of type contact_sheet. |
| everySeconds | Number | No | Used in interval mode. Extracts one frame every this many seconds, starting at 0. |
| sceneThreshold | Number | No | Used in scenes mode. Sensitivity from 0.01 to 1. Lower values detect more scene changes; higher values detect only hard cuts. |
| maxVideoMinutes | Integer | No | Skips videos longer than this many minutes. Safety guard against huge files and surprise cost. |
| maxFramesPerVideo | Integer | No | Hard cap on frames per video in any mode. Maximum 500. |
Response
Returns a JSON object with a count integer field and an items array. Each item is one extracted frame (type: frame) or one contact sheet per video (type: contact_sheet). Success response uses 200.
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Total number of result rows in items (frames plus contact sheets). |
| items | Object Array | Array of result rows, one per extracted frame and one per contact sheet. |
| items[].type | String | frame for an extracted frame, or contact_sheet for the tiled overview image. |
| items[].videoUrl | String | The video URL this row came from. |
| items[].mode | String | Extraction mode used: count, scenes, interval or timestamps. |
| items[].frameIndex | Integer | Position of the frame in the results for this video, starting at 0. null for contact sheets. |
| items[].timestampSec | Number | Time of the frame in the video, in seconds. null for contact sheets. |
| items[].timecode | String | Time of the frame as HH:MM:SS.mmm. null for contact sheets. |
| items[].sceneScore | Number | Scene-change score (0–1) in scenes mode. null in other modes. |
| items[].frames | Integer | Number of frames in the contact sheet (contact_sheet rows only). |
| items[].imageUrl | String | Link to the extracted image (jpg, png or webp). |
| items[].key | String | File name of the image, e.g. 1-001.jpg or 1-sheet.jpg. |
| items[].width | Integer | Width of the output image in pixels. |
| items[].height | Integer | Height of the output image in pixels. |
| items[].videoWidth | Integer | Width of the source video in pixels. |
| items[].videoHeight | Integer | Height of the source video in pixels. |
| items[].durationSec | Number | Length of the source video in seconds. |
| items[].fps | Number | Frame rate of the source video. |
| items[].extractedAt | String | Time the image was extracted (ISO 8601, UTC). |
| items[].cached | Boolean | true if the result was served from cache. |
| items[].cacheAgeSeconds | Integer | Age of the cached result in seconds (only when cached is true). |



