Video Files
Video Files are what video jungle consumes, generates, and returns. Video Files can be analyzed for what they contain, along with their dialogue for retrieval and generation.
The video file model
The video file model contains all the information about the properties of the videos themselves. Things like frame rates, file formats, tracks, and more.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the video file
- Name
name
- Type
- string
- Description
(Optional) Name of video file
- Name
filename
- Type
- string
- Description
URL for direct access to download video file
- Name
description
- Type
- string
- Description
(Optional) Description of video file.
- Name
duration
- Type
- float
- Description
Duration of file in seconds.
- Name
hash
- Type
- string
- Description
MD5 hash of the video file
- Name
size
- Type
- integer
- Description
Size of file in bytes.
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the video was created on video jungle.
- Name
recorded_at
- Type
- timestamp
- Description
(Optional) Timestamp of when the video was recorded.
List all videos
This endpoint allows you to retrieve a paginated list of all your videos. By default, a maximum of ten videos are shown per page.
Optional attributes
- Name
limit
- Type
- integer
- Description
Limit the number of videos returned.
Request
curl -G https://api.video-jungle.com/video-file \
-H "Authorization: Bearer {token}" \
-d limit=10
Response
[
{
"id": "20a0c41d-c042-46ae-87e1-1d66d6bf59c2",
"filename": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=LURidZHG4qpmf%2Fxl54VTmWAYDcU%3D&Expires=1717103703",
"description": null,
"duration": 27.431,
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"hash": "b305f783e3a7c946b1e893b68504a11b20cb28aa9f66631f06b1277cf7c7212b",
"s3_file_key": "612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4",
"name": "Name here",
"thumbnail": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/thumbnail.png?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=K2beQI7G5lyOn365%2BnVOdACyWYc%3D&Expires=1717103703",
"fps": 29.97,
"size": 2383641,
"created_at": "2024-05-27T13:55:12.716461",
"key": "152accb9-291b-4703-9b8a-5562032e76d2",
}
]
Create a video file
Create a new video file. You will get back UUID to upload the file to.
Required attributes
- Name
name
- Type
- string
- Description
Name for the video file
- Name
filename
- Type
- string
- Description
Filename of the original video file
- Name
upload_method
- Type
- string
- Description
Method of uploading. Options include 'direct' (upload directly to S3), 'file-no-chunk' (upload directly to Video Jungle's API), or 'web-ui' (Allows you to embed an upload into a web page with Filepond.)
Request
import ApiClient from '@skate85/videojungle-api'
const client = new ApiClient(token)
await client.video.create({
name: 'skateboard',
filename 'skate.mp4',
upload_method: 'file-no-chunk'
})
Response
{
...depends on upload method
}
Search video files
Search for video files by keywords
Required attributes
- Name
query
- Type
- string
- Description
Keywords to search for
Optional attributes
- Name
limit
- Type
- integer
- Description
Limit the number of videos returned.
- Name
project_id
- Type
- string
- Description
Limit the search to a specific project.
- Name
query_img
- Type
- string
- Description
Search for videos similar to an image using Base64 encoded version.
- Name
query_audio
- Type
- string
- Description
Search for videos similar to an audio file using Base64 encoded version.
Request
from videojungle import ApiClient
client = ApiClient(token)
videos = client.videos_files.search(query="skateboard")
print(videos)
Response
[
{
"scene_changes": [
{
"images": [
"612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/analysis/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-001-01.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/analysis/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-001-02.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/analysis/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-001-03.jpg"
],
"end_frame": "3717",
"detections": [
{
"description": "The image shows a computer screen with a video call interface open, displaying a person's face and the text \"MCPC Hackathon\" on their screen. The background of the video call is a room with rows of chairs facing towards a stage where there are large screens displaying the same text.",
"detected_items": [
"MCPCHackathon"
]
},
{
"description": "The image shows a computer screen with two windows open. On the left, there is a web browser displaying a webpage that appears to be related to Google Docs or similar collaboration tools. The right window has a video call interface showing a person's face and part of their body, suggesting they are participating in a virtual meeting or discussion. There is also text overlaying the image that reads \"so let's just jump right into Claude. So.\" which seems to be an informal greeting or introduction.",
"detected_items": [
"Professional Plan",
"Good morning",
"KP"
]
},
{
"description": "The image shows a screenshot of a computer screen with an open web browser displaying a search bar that reads \"Allow tool from 'gotta-eat' (local).\" The user is prompted to run the search by clicking on the \"Run search-restaurants from gotta-eat\" link. There are two options available: \"Allow for This Chat\" and \"Allow Once.\" Additionally, there's a warning message at the bottom of the page indicating that the search will go to restaurants if it's not allowed.",
"detected_items": [
"can you find an indian restaurant for two tomorrow?"
]
}
],
"start_frame": "1",
"end_timecode": "00:01:01.950",
"images_local": [
"/scratch/7be72342-8a07-4b9d-9a60-4d3055b79b71/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-001-01.jpg",
"/scratch/7be72342-8a07-4b9d-9a60-4d3055b79b71/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-001-02.jpg",
"/scratch/7be72342-8a07-4b9d-9a60-4d3055b79b71/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-001-03.jpg"
],
"scene_number": "1",
"length_frames": "3717",
"length_seconds": "61.950",
"start_timecode": "00:00:00.000",
"length_timecode": "00:01:01.950",
"end_time_seconds": "61.950",
"start_time_seconds": "0.000"
},
{
"images": [
"612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/analysis/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-002-01.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/analysis/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-002-02.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/analysis/7be72342-8a07-4b9d-9a60-4d3055b79b71-Scene-002-03.jpg"
],
"end_frame": "4187",
"detections": [
{
"description": "The image shows a conversation between two individuals, with one person asking the other to find an Indian restaurant for tomorrow. The second person is providing information about searching restaurants from a local directory.",
"detected_items": [
"can you find an indian restaurant for two tomorrow?"
]
},
{
"description": "The image shows a computer screen with a web browser open, displaying a search results page for \"Indian restaurants.\" The user has selected the option to run a tool from \"gotta-eat\" (local) and is prompted to allow the tool to be used. There are two buttons labeled \"Allow for\" and \"Allow Once,\" which suggest that the user can either accept or decline the tool's use at any time. Additionally, there is a small window on the right side of the screen showing a man's face, possibly indicating that he is participating in a video call or webinar.",
"detected_items": [
"Claude",
"3.21",
"Claudio",
"3.21"
]
},
{
"description": "The image shows a screenshot of a web browser with a pop-up window open. The pop-up window is titled \"Allow tool from 'gottaeat' (local)\" and contains two buttons: \"Allow for this chat\" and \"Allow Once.\" There's also a warning message that reads, \"Malicious MCP servers or conversation content could potentially trick Claude into attempting harmful actions through your installed tools. Review each action carefully before approving.\" Additionally, there's a text overlay at the bottom of the image that says, \"So it's another tool to call out and see.\"",
"detected_items": [
"The image shows a screenshot of a web browser with a search bar that says \"View Result from search-restaurants from gotta-eat (local)\". There is also a pop-up window with the title \"Allow tool from 'gotta-eat' (local)?\" and options to allow or deny the tool. The text in the pop-up window reads: \"Malicious MCP servers on conversation content could potentially trick Claude into attempting harmful actions through your installed tools. Review each action carefully before approving.\" Below the pop-up window",
"there are two buttons labeled \"Allow for this Chat\" and \"Allow Once\". At the bottom of the image",
"there is a comment that says \"So it's another tool to call out and see\"."
]
},
]
],
"script": "1\n00:00:00,000 --> 00:00:10,000\n This Wednesday, I participated in a hackathon in New York City for Anthropix's new model context protocol.\n\n2\n00:00:10,000 --> 00:00:15,000\n Now the hackathon was a little bit unique in that it was just three hours.\n\n3\n00:00:15,000 --> 00:00:20,000\n And of course, I didn't quite get to finish building what I wanted to build.\n\n4\n00:00:20,000 --> 00:00:27,000\n So I spent an extra two hours maybe and built a whole prototype to showcase what we were aiming for.\n\n5\n00:00:27,000 --> 00:00:31,000\n And so let's just jump right into Claude.\n\n6\n00:00:31,000 --> 00:00:34,000\n So in this case, I have Claude open.\n\n7\n00:00:34,000 --> 00:00:37,000\n And if you look over here, I have these tools available.\n\n8\n00:00:37,000 --> 00:00:41,000\n And so these tools are what we built during the hackathon.\n\n9\n00:00:41,000 --> 00:00:49,000\n So can you find an Indian restaurant for two tomorrow?\n\n10\n00:00:49,000 --> 00:01:00,000\n And so when I call out to Claude, Claude is going to intelligently discover and choose which tool would be most appropriate to respond with.\n\n11\n00:01:00,000 --> 00:01:05,000\n So in this case, it's going to search restaurants is one that I've built actually with my partner.\n\n12\n00:01:05,000 --> 00:01:08,000\n And this other one, find reservation times.\n\n13\n00:01:08,000 --> 00:01:13,000\n So it's another tool to call out and see what we can do here.\n\n14\n00:01:13,000 --> 00:01:19,000\n And then sometimes, yep, there goes Claude is going to let us see those restaurants.\n\n15\n00:01:19,000 --> 00:01:21,000\n So I'm going to allow for the chat.\n\n16\n00:01:21,000 --> 00:01:32,000\n And if we wait a second, we will see a video player pops up showcasing the restaurant and all the things that are available.\n\n17\n00:01:32,000 --> 00:01:38,000\n You see, we also get some information about the restaurant and what times we have.\n\n18\n00:01:38,000 --> 00:01:42,000\n So let's kind of go back and walk through what happened a little bit slower.\n\n19\n00:01:42,000 --> 00:01:50,000\n So in this case, Claude called the search restaurants tool with a cuisine of Indian.\n\n20\n00:01:50,000 --> 00:01:54,000\n Claude just decided to do that and decided that that was the query it should make.\n\n21\n00:01:54,000 --> 00:01:59,000\n And it got back this venue ID of 7291.\n\n22\n00:01:59,000 --> 00:02:02,000\n Next, Claude decided to find reservation times.\n\n23\n00:02:02,000 --> 00:02:12,000\n And so these are the parameters that Claude called the final reservation times tool with to try and find a reservation for.\n\n24\n00:02:12,000 --> 00:02:18,000\n So in this case, the tool is calling out to resi via their API.\n\n25\n00:02:18,000 --> 00:02:23,000\n And so we can see what comes back the entire raw result.\n\n26\n00:02:23,000 --> 00:02:26,000\n And we really just dump that right back into the result.\n\n27\n00:02:26,000 --> 00:02:32,000\n So that allows us to do things like ask questions about that specific restaurant.\n\n28\n00:02:32,000 --> 00:02:38,000\n What kind of things are on the menu?\n\n29\n00:02:38,000 --> 00:02:42,000\n And we don't need to think about that data type at all.\n\n30\n00:02:42,000 --> 00:02:45,000\n We don't need to think about menu items.\n\n31\n00:02:45,000 --> 00:02:53,000\n We just take all of that context that comes back from the search result and automatically Claude will discover what things are there on the restaurant.\n\n32\n00:02:53,000 --> 00:02:58,000\n So in this case, we've got signature items that appear to be very popular.\n\n33\n00:02:58,000 --> 00:03:04,000\n Finally, we have the result times that get put back in for when we can go.\n\n34\n00:03:04,000 --> 00:03:10,000\n But, you know, the thing closest to my heart is being able to check out the vibes of a restaurant.\n\n35\n00:03:10,000 --> 00:03:21,000\n And so what happens here is that Anthropic calls to the tool and the tool actually search social media for videos relevant to the restaurant.\n\n36\n00:03:21,000 --> 00:03:36,000\n And so I can see and kind of scrub through videos of, you know, what's going on in this restaurant, what kind of food they have, what it looks like from the inside, all in one spot.\n\n37\n00:03:36,000 --> 00:03:44,000\n So if how does this all work? How does this all come together? Let me pull up an example.\n\n38\n00:03:44,000 --> 00:03:55,000\n And so in this case, the way that it works is that you have Claude running and Claude is actually a model context protocol client, I believe is what it's called.\n\n39\n00:03:55,000 --> 00:04:01,000\n And so it discovers all of the model context protocol servers you have running on your laptop.\n\n40\n00:04:01,000 --> 00:04:09,000\n So in our case, the model context protocol server that we built was called Gotta Eat and we expose a few different tools.\n\n41\n00:04:09,000 --> 00:04:14,000\n So the fine reservation times, the search restaurants, those both call out to Resy.\n\n42\n00:04:14,000 --> 00:04:22,000\n The Let Me See calls out to Serper to look for social media videos that are relevant to our individual search.\n\n43\n00:04:22,000 --> 00:04:34,000\n So that's just a very high level overview of model context protocol and kind of why it's so exciting to build with and give tools to LLMs and agents.\n\n44\n00:04:34,000 --> 00:04:42,000\n Yeah, if you want to see more, tell me. Thanks.\n\n",
"created_at": "2024-12-13T20:04:06.158000",
"updated_at": "2024-12-13T20:04:06.158000",
"video_id": "7be72342-8a07-4b9d-9a60-4d3055b79b71",
"user_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"video": {
"id": "7be72342-8a07-4b9d-9a60-4d3055b79b71",
"name": "MCP Hackathon NYC 2024",
"fps": 60,
"description": null,
"thumbnail": "https://vj-video.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/thumbnail.png?AWSAccessKeyId=AKIATTF3CDVL4EYACA6F&Signature=lkGAPoQm572%2FRxnkbi1vSurpQso%3D&Expires=1735419846",
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"created_at": "2024-12-13T20:00:52.852531",
"recorded_at": null,
"url": "https://vj-video.s3.us-east-1.amazonaws.com//612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/video.mp4?AWSAccessKeyId=AKIATTF3CDVL4EYACA6F&Signature=Jej6ZhvIUGD3ndRdoShQL3GfqbA%3D&Expires=1735419846",
"download_url": "https://vj-video.s3.us-east-1.amazonaws.com//612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/video.mp4?response-content-disposition=attachment%3B%20filename%3DMCP%20Hackathon%20NYC%202024-2024-12-13T20%3A00%3A52.852531.mp4&AWSAccessKeyId=AKIATTF3CDVL4EYACA6F&Signature=s3ww2daYd0RH1rC95eBFEojCIyw%3D&Expires=1735419846",
"thumbnail_url": "https://vj-video.s3.us-east-1.amazonaws.com/https%3A//vj-video.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/7be72342-8a07-4b9d-9a60-4d3055b79b71/thumbnail.png%3FAWSAccessKeyId%3DAKIATTF3CDVL4EYACA6F%26Signature%3DlkGAPoQm572%252FRxnkbi1vSurpQso%253D%26Expires%3D1735419846?AWSAccessKeyId=AKIATTF3CDVL4EYACA6F&Signature=0bgs7ky42ikXXi%2FkM581zXLTpwk%3D&Expires=1735419846"
}
}
]
Retrieve a video file
This endpoint allows you to retrieve a video by its id. Also includes any video analysis which has been done on the video.
Request
curl https://app.video-jungle.com/video-file/:video_uuid \
-H "Authorization: Bearer {token}"
Response
{
"id": "20a0c41d-c042-46ae-87e1-1d66d6bf59c2",
"filename": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=JFmrgjtay%2Fkv0bWojnM138d%2BCL8%3D&Expires=1717105885",
"description": null,
"duration": 27.431,
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"hash": "b305f783e3a7c946b1e893b68504a11b20cb28aa9f66631f06b1277cf7c7212b",
"s3_file_key": "612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/bongo-class.mp4",
"name": "Kirk Bonga",
"thumbnail": "https://video-jungles.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/thumbnail.png?AWSAccessKeyId=AKIAQJX2XANMJM4ARNVV&Signature=bHL7TDhFeQDt2NRTGv8Ed5LzDm0%3D&Expires=1717105885",
"fps": 29.97,
"size": 2383641,
"created_at": "2024-05-27T13:55:12.716461",
"key": "152accb9-291b-4703-9b8a-5562032e76d2",
"inferences": [],
"analysis": [
{
"id": "e93e9c93-b1ab-49cc-8c6b-4c31e74cf1ad",
"script": "1\n00:00:00,000 --> 00:00:03,000\n (upbeat drum music)\n\n2\n00:00:03,000 --> 00:00:06,000\n (upbeat drum music)\n\n3\n00:00:06,400 --> 00:00:09,400\n (upbeat drum music)\n\n4\n00:00:09,400 --> 00:00:12,400\n (upbeat drum music)\n\n5\n00:00:12,400 --> 00:00:14,980\n (upbeat music)\n\n",
"video_file_id": "20a0c41d-c042-46ae-87e1-1d66d6bf59c2",
"scene_changes": [
{
"images": [
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-001-01.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-001-02.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-001-03.jpg"
],
"end_frame": "298",
"start_frame": "1",
"end_timecode": "00:00:09.943",
"scene_number": "1",
"length_frames": "298",
"length_seconds": "9.943",
"start_timecode": "00:00:00.000",
"length_timecode": "00:00:09.943",
"end_time_seconds": "9.943",
"start_time_seconds": "0.000"
},
{
"images": [
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-002-01.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-002-02.jpg",
"612afec9-bcb2-47ca-807b-756d6e83b4b7/20a0c41d-c042-46ae-87e1-1d66d6bf59c2/analysis/20a0c41d-c042-46ae-87e1-1d66d6bf59c2-Scene-002-03.jpg"
],
"end_frame": "451",
"start_frame": "299",
"end_timecode": "00:00:15.048",
"scene_number": "2",
"length_frames": "153",
"length_seconds": "5.105",
"start_timecode": "00:00:09.943",
"length_timecode": "00:00:05.105",
"end_time_seconds": "15.048",
"start_time_seconds": "9.943"
}
],
"created_at": "2024-05-27T13:55:15.899784",
"updated_at": "2024-05-27T13:55:15.899784",
"key": "be4237c2-7a72-4bab-aa17-98b2fa4e0471"
}
]
}
Update a video file
Update a video's name.
Optional attributes
- Name
videoName
- Type
- string
- Description
New name for the video.
Request
import ApiClient from '@skate85/videojungle'
const client = new ApiClient(token)
await client.videos.update('xgQQXg3hrtjh7AvZ', {
videoName: 'oldSkate',
})
Response
{
}
Upload a video file
Update the actual video file. Assumes the initial video was created with the upload_method of 'direct-no-chunk'.
Optional attributes
- Name
file
- Type
- file
- Description
Actual video file for upload
Request
import ApiClient from '@skate85/videojungle'
const client = new ApiClient(token)
await client.videos.upload('xgQQXg3hrtjh7AvZ', {
file: 'file.mp4',
})
Response
{
}