Video Jungle API Client
This is a Python client for the Video Jungle API.
Video Jungle is a generative video creator. It allows you to generate custom videos via dynamic variables.
Let's say you want to generate daily astrology readings according to your user's astrological sign, lucky number, and lucky color.
Video Jungle allows you to pass in a value for each, and generate a unique video for that specific user.
See below for an example of how to build a generative video workflow using the API.
Installation
You can install the Video Jungle API client using pip:
pip install videojungle
Usage
Here's a simple example of how to use the Video Jungle API client for the Horoscope example:
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)
# Define your video generation task, along with variables to pass on generation
prompt = vj.prompts.generate(task="a horoscope reader who wants to leave the person excited about their future",
parameters=["zodiac sign", "lucky number", "date"])
# Alternatively, create your own prompt:
# prompt = vj.prompts.create(prompt="generate a horoscope for ${ZODIAC SIGN}, with lucky number ${LUCKY NUMBER} on ${DATE}",
# parameters=["ZODIAC SIGN", "LUCKY NUMBER", "DATE"], name="Horoscope Reader", task="a horoscope generator",
# persona="A psychic squid who sees into the future")
# Print out the generated prompt
print(prompt.value)
# Optionally, list out generation methods available in your account
scripts = vj.scripts.list_options()
for script in scripts:
print(f"{script.key}: {script.description}")
# Create a project to hold generated files, using our prompt we've generated
# and prompt-to-video as the asset genneration method
project = vj.projects.create(name="First Project", description="My first project",
prompt_id=prompt.id, generation_method="prompt-to-video")
script_id = project.scripts[0].id
# Print out parameters required for generation
print(project.prompts[0]['parameters'])
# Generate a video from our created prompt with dynamic variables
video = vj.projects.generate(script_id=script_id,
project_id=project.id,
parameters={"zodiac sign": "Aries",
"lucky number": "7", # parameters are always strings
"date": "2025-05-25"})
print(video)
# Get the video file ID from the generated video
asset_id = video["asset_id"]
# Save the video file to disk, automatically waits for generation
print(f"Generating video with asset id: {asset_id}")
video_file = vj.assets.download(asset_id, "generated_horoscope.mp4")
print(f"Video generated and saved to: {video_file}")
This example lives in the examples/ folder.
Collaboration Features
You can add collaborators to video edits to share editing access:
# Add a collaborator to an edit (owner only)
client.projects.add_collaborator("project_uuid", "edit_id", "collaborator@example.com")
# List all collaborators for an edit
collaborators = client.projects.list_collaborators("project_uuid", "edit_id")
for collaborator in collaborators:
print(f"{collaborator.name} ({collaborator.email})")
# Remove a collaborator from an edit (owner only)
client.projects.remove_collaborator("project_uuid", "edit_id", "user_id")
License
This project is licensed under the MIT License.
Metadata
Release files for videojungle 0.1.80
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| videojungle-0.1.80.tar.gz | 15.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| videojungle-0.1.80-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.9 kB
Release files / videojungle-0.1.80.tar.gz
| Download URL | videojungle-0.1.80.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d988831b8883f49489964d972334cd858797eb174c36dd0e500938786de30ed4
|
|
BLAKE2b-256 checksum How to use checksums |
0de810051131aa6620ed40f99fd57933ce44fe23cf5dcb5bb9cecc4d23d0777a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Release files / videojungle-0.1.80-py3-none-any.whl
| Download URL | videojungle-0.1.80-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d02b32900c02c98aa7bc89e783d54bc375b812752909d944e7d0efaeb8988015
|
|
BLAKE2b-256 checksum How to use checksums |
7558d53ec29c877cf8c45b03bcafb9be87962435b0e50cf7a74019249159915e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|