Create clips from existing media
Create video clips from existing media files using start and end time parameters with FastPix API.
The clipping feature in FastPix allows users to create clips from existing video files. This functionality serves various purposes, such as highlighting key moments, improving engagement and shareability, repurposing content for different platforms, and enhancing accessibility by providing shorter, focused viewing experiences.
Clips can be commonly used for promotional content, social media snippets, educational segments, and monetization through ads. Additionally, they help improve SEO by targeting specific keywords and increasing discoverability. By extracting concise, relevant parts from existing video files, you can maximize the impact and reach of your content.
Requirements
To successfully create a clip, ensure the following:
-
Use the create media from URL endpoint to make the request. You must prepend the prefix fp_mediaId:// to the existing media ID in the payload's
urlparameter for clipping to work. -
You need to specify the
startTimeandendTimefor the clip. If these values are not provided, the default duration matches the existing media ID. -
Clipping is supported only for existing media, and both the existing media and the clipping media must be in the same workspace.
How to create clips
To create clips, follow these steps:
-
Clipping parameters: The clipping feature requires the existing media ID as the input URL for type "
video". Ensure that both the existing media and the clipping media are in the same workspace. -
Payload structure: Construct your request body as follows:
{
"inputs": [
{
"type": "video",
"url": "fp_mediaId://{Media_ID}",
"startTime": 0,
"endTime": 60
}
],
"accessPolicy":"public"
} NOTE
In the request, replace{Media_ID}with your media ID.
- Response handling: Upon successful creation, FastPix returns a response containing a new media ID and playback ID for the clip, which can be used for further operations.
Response body example
Here’s an example of the response body you can expect:
{
"success": true,
"data": {
"id": "e6d12434-1b7c-4a38-97fc-d5c281ece457",
"sourceMediaId": "fa4fa809-20f2-4ec1-b0e4-ec1a7f452c6c",
"trial": false,
"status": "Created",
"createdAt": "2025-10-29T09:53:42.727247Z",
"updatedAt": "2025-10-29T09:53:42.727252Z",
"playbackIds": [
{
"id": "8706715b-2651-4c55-84ed-77ce2b7b22b6",
"accessPolicy": "public",
"accessRestrictions": {
"domains": {
"defaultPolicy": "allow",
"allow": [],
"deny": []
},
"userAgents": {
"defaultPolicy": "allow",
"allow": [],
"deny": []
}
}
}
],
"sourceAccess": false,
"maxResolution": "1080p",
"inputs": [
{
"type": "video",
"url": "fp_mediaId://fa4fa809-20f2-4ec1-b0e4-ec1a7f452c6c",
"startTime": 0,
"endTime": 60
}
],
"subtitles": {},
"optimizeAudio": false
}
} NOTE
You can create an unlimited number of clips single source media ID. However, each clip is treated as a new media entity and is considered an on-demand video. This means that on-demand video pricing applies, which includes costs associated with encoding, storage, and delivery usage.
How to create a clip from dashboard
-
Open the FastPix Dashboard > Products > Media.
-
From the Media list, select the media you want to create a clip from.
-
On the Media details page, click Create Clips tab.
-
Enter the Start time and End time to set your clip timing. You can use the Preview Clip button to play a preview of the exact segment you selected.
The Timeline Trim Handles (red and green markers) let you adjust your clip’s start and end times by dragging them along the timeline, and the Zoom In (+) and Zoom Out (–) buttons allow you to zoom in for precision or zoom out to view more of the timeline.
- Choose your clip access using the dropdown next to Create as Public Clip, selecting Public (viewable by anyone with the playback URL) or Private (restricted by your access policy), then create the clip.
- After creation, the clip appears in your Media list as a new item, where you can check its Playback IDs and access settings in the Media Details page to confirm whether it is public or private.
Retrieve media clips by parent media ID
You can use the Get all clips of a media endpoint to fetch all media clips associated with a specific parent media ID. This is useful for managing and organizing multiple clips derived from a single source.
In the request, you need to provide the mediaId of the original video from which clips were created. The response returns the metadata, including clip media IDs and other relevant details. Here’s an example:
{
"success": true,
"data": [
{
"id": "80906e5f-2909-4191-bbbb-b7280413022d",
"duration": "00:00:05",
"status": "Ready",
"thumbnail": "https://images.fastpix.io/11d81d70-615c-4d5c-a93a-28c5de14d117/thumbnail.png",
"createdAt": "2025-10-29T09:58:21.828358Z",
"playbackIds": [
{
"id": "11d81d70-615c-4d5c-a93a-28c5de14d117",
"accessPolicy": "private"
}
]
},
{
"id": "2aea2dea-f67d-4839-bd26-4337baa95141",
"duration": "00:00:05",
"status": "Ready",
"thumbnail": "https://images.fastpix.io/9417aa80-da6b-44bf-95ef-816bd7e494b4/thumbnail.png",
"createdAt": "2025-10-29T09:58:17.776712Z",
"playbackIds": [
{
"id": "9417aa80-da6b-44bf-95ef-816bd7e494b4",
"accessPolicy": "public"
}
]
}
],
"pagination": {
"totalRecords": 2,
"currentOffset": 1,
"offsetCount": 1
}
}Updated 8 days ago