Skip to main content

LlamaIndex Tool: iLoveVideoEditor

This tool allows LlamaIndex agents to render MP4 videos from declarative VideoJSON specifications using the iLoveVideoEditor cloud rendering API.

Features

  • 🎬 Programmatic video rendering: Turn VideoJSON specs into MP4 videos via a single tool call
  • ⏳ Wait or queue: Poll until the render finishes, or queue and check status later
  • 🤖 Agent-ready: Works directly with LlamaIndex agents via BaseToolSpec
  • 🛡️ Error handling: Graceful error handling with informative messages

Requirements

  • Python >= 3.10
  • llama-index-core >= 0.13.0
  • requests >= 2.31.0
  • An iLoveVideoEditor API key (get one from the dashboard)

Installation

pip install llama-index-tools-ilovevideoeditor

Required Environment Variables

ILOVEVIDEOEDITOR_API_KEY=vf_live_...

Usage

from llama_index.tools.ilovevideoeditor import ILoveVideoEditorTool
from llama_index.core.agent import ReActAgent

# Initialize the tool spec (reads ILOVEVIDEOEDITOR_API_KEY from the environment)
tool_spec = ILoveVideoEditorTool()

# Convert the spec to a list of FunctionTools
tools = tool_spec.to_tool_list()

# Create an agent with the rendering tools
agent = ReActAgent.from_tools(tools, verbose=True)

# The agent can now render videos from VideoJSON specs
agent.chat(
    "Render a 3-second 1080p video with the text 'Hello from LlamaIndex' "
    "using the iLoveVideoEditor tool."
)

Direct usage without an agent:

from llama_index.tools.ilovevideoeditor import ILoveVideoEditorTool

tool = ILoveVideoEditorTool()

result = tool.render_video(
    {
        "name": "hello",
        "layers": [
            {
                "type": "text",
                "settings": {
                    "startTime": 0,
                    "duration": 3,
                    "text": "Hello from LlamaIndex",
                    "fontSize": 64,
                    "color": "#ffffff",
                },
            }
        ],
    }
)
# '{"jobId": "425ba18a-...", "status": "completed", "downloadUrl": "https://..."}'

Queue without waiting, then check status later:

queued = tool.render_video(video_json, wait_for_completion=False)
# '{"jobId": "425ba18a-...", "status": "queued"}'

status = tool.get_render_status("425ba18a-...")
# '{"jobId": "425ba18a-...", "status": "completed", "downloadUrl": "https://..."}'

Configuration options

  • api_key: API key. Defaults to the ILOVEVIDEOEDITOR_API_KEY environment variable.
  • base_url: API base URL. Defaults to the ILOVEVIDEOEDITOR_API_BASE environment variable or https://api.ilovevideoeditor.com.
  • max_wait_seconds: Maximum time to poll for render completion (default 300).
  • poll_interval_seconds: Interval between status polls (default 2).

API reference

For the full VideoJSON schema and REST API reference, see the iLoveVideoEditor API docs.

Examples

See the examples directory for more usage examples.

Development

Run tests:

make test

Run linters:

make lint

Format code:

make format

Metadata

Release files for llama-index-tools-ilovevideoeditor 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-tools-ilovevideoeditor 0.1.0
File Size Uploaded
llama_index_tools_ilovevideoeditor-0.1.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-ilovevideoeditor 0.1.0
File Interpreter ABI Platform
llama_index_tools_ilovevideoeditor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / llama_index_tools_ilovevideoeditor-0.1.0.tar.gz

Download URL llama_index_tools_ilovevideoeditor-0.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2384c0471bc3f50ce1a0f54c04d2df70100d8bda34fc5e800e49e3a06a89603f
BLAKE2b-256 checksum
How to use checksums
03d852a873317b4a8e895cd271df9777d6f917716aa97160f8fdef431c469cc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / llama_index_tools_ilovevideoeditor-0.1.0-py3-none-any.whl

Download URL llama_index_tools_ilovevideoeditor-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee83e06b09ca12699a46f8c7e1d303da09d68fae0af7f9d7f7ce993231402c48
BLAKE2b-256 checksum
How to use checksums
ba1295ad769d6c4eec5fec6ce829774af22d48c80a6b567524ecea7c0dbcde1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page