Projects
As the name suggests, projects are how video generations are defined. You can incorporate asset like videos, images, and audio, and add a script for how these should be used to generate your videos.
The Project model
The project model contains all the information about your generative project, and tells video jungle how your videos should be generated.
Properties
- Name
id
- Type
- string
- Description
Unique id of a project (UUID)
- Name
name
- Type
- string
- Description
Name of the project
- Name
description
- Type
- string
- Description
Description of the generative video project
- Name
asset_count
- Type
- integer
- Description
Number of generated videos
- Name
assets
- Type
- list
- Description
A list of all the generated assets created by the project
- Name
created_at
- Type
- timestamp
- Description
Unique identifier for the conversation associated with the contact.
Get all projects
This endpoint allows you to retrieve a paginated list of all your projects. By default, a maximum of ten contacts are shown per page.
Optional attributes
- Name
limit
- Type
- integer
- Description
Limit the number of projects returned.
Request
curl -G https://api.video-jungle.com/projects \
-H "Authorization: Bearer {token}" \
-d active=true \
-d limit=10
Response
{
"id": "2ec097cd-1fff-4824-a7bf-a0e14281f4e5",
"name": "I Ching",
"description": "Claude Generated I Ching",
"data": "",
"created_at": "2024-07-16T12:13:05.899678",
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"asset_count": 11,
"assets": [
{
"id": "1d3f8b04-78d9-4ab9-ba49-16d20b35baf3",
"keyname": "694dd516-013c-4f0e-b89c-eed9a162cb60",
"url": "https://vj-video.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/2ec097cd-1fff-4824-a7bf-a0e14281f4e5/694dd516-013c-4f0e-b89c-eed9a162cb60?AWSAccessKeyId=AKIATTF3CDVL4EYACA6F&Signature=38feOHTrAGOWqmpUU7RsDzptRC0%3D&Expires=1721706007",
"download_url": "https://vj-video.s3.us-east-1.amazonaws.com/612afec9-bcb2-47ca-807b-756d6e83b4b7/2ec097cd-1fff-4824-a7bf-a0e14281f4e5/694dd516-013c-4f0e-b89c-eed9a162cb60?response-content-disposition=attachment%3B%20filename%3DClaude%20I%20Ching-2024-07-18T20%3A34%3A36.635833.mp4&AWSAccessKeyId=AKIATTF3CDVL4EYACA6F&Signature=MgXB0ODWIor%2F8SPP1Is4H66pzBw%3D&Expires=1721706007",
"asset_path": null,
"asset_type": "generated_video",
"created_at": "2024-07-18T20:34:36.635833",
"status": "uploaded",
"uploaded": true
},
// ...
],
}
Create a project
Create a new project.
Required attributes
- Name
name
- Type
- string
- Description
Name for the project.
- Name
description
- Type
- string
- Description
Description of the project.
Optional attributes
- Name
prompt_id
- Type
- string
- Description
Create a project with an existing prompt.
Request
curl https://api.videojungle.com/projects \
-H "Authorization: Bearer {token}" \
-d name="Horoscope" \
-d description="Horoscope generator" \
-d prompt_id="ffff-ffff-ffff-ffff"
Response
{
"id": "2ec097cd-1fff-4824-a7bf-a0e14281f4e5",
"name": "Horoscope",
"description": "Horoscope Generator",
"data": "",
"created_at": "2024-07-16T12:13:05.899678",
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"asset_count": 11,
}
Retrieve a project
This endpoint allows you to retrieve a project by its id. Refer to the list at the top of this page to see which properties are included with contact objects.
Request
curl https://api.video-jungle.com/projects/ffff-ffff-ffff-ffff \
-H "Authorization: Bearer {token}"
Response
{
"id": "2ec097cd-1fff-4824-a7bf-a0e14281f4e5",
"name": "Claude I Ching",
"description": "Claude Generated I Ching",
"data": "",
"created_at": "2024-07-16T12:13:05.899678",
"owner_id": "612afec9-bcb2-47ca-807b-756d6e83b4b7",
"asset_count": 11,
"assets": [
// ...
]
}
Delete a project
This endpoint allows you to delete a project.
Request
curl -X DELETE https://api.video-jungle.com/projects/:project_uuid \
-H "Authorization: Bearer {token}"
Generate a project Edit
This endpoint allows you to generate an edited video within a project. You can combine Video Files and Assets in order to generate your edit.
Request
from videojungle import ApiClient
import os
# Assumes you've set your API key as an environment variable
VJ_API_KEY = os.environ['VJ_API_KEY']
# Initialize API client
vj = ApiClient(token=VJ_API_KEY)
# Let's do a manual video edit
# Your video edit will need to have your own, appropriate video IDs
video_edit = {
"video_edit_version": "1.0",
"video_output_format": "mp4",
"video_output_resolution": "1920x1080",
"video_output_fps": 30.0,
"video_output_filename": "my_video_edit.mp4",
"video_series_sequential": [
{
"video_id": "123e4567-e89b-12d3-a456-426614174000",
"type": "videofile",
"video_start_time": "00:00:00",
"video_end_time": "00:00:10",
"audio_levels": [
{
"audio_level": 0.5,
"start_time": "00:00:00",
"end_time": "00:00:10"
}
]
},
{
"video_id": "123e4567-e89b-12d3-a456-426614174001",
"type": "videofile",
"video_start_time": "00:00:10",
"video_end_time": "00:00:20",
"audio_levels": [
{
"audio_level": 0.7,
"start_time": "00:00:10",
"end_time": "00:00:20"
}
]
}
],
"audio_overlay": [
{
"audio_id": "123e4567-e89b-12d3-a456-426614174002",
"type": "audio",
"audio_start_time": "00:00:00",
"audio_end_time": "00:00:20",
"audio_levels": [
{
"audio_level": 0.5,
"start_time": "00:00:00",
"end_time": "00:00:20"
}
]
}
]
}
# Create the video edit, must be associated with a project
project_id = "123e4567-e89b-12d3-a456-426614174003"
# Edit will be an asset, with a url we can check
edit = vj.projects.render_edit(project_id, video_edit)
# Print out the URL to the edit
print(edit.url)