Skip to main content

llm-gemini-youtube

PyPI Changelog Tests License

LLM plugin for agentic YouTube video understanding with Gemini.

The plugin enables agentic processing for every video. It uses the Gemini Interactions API with an API key and the GenerateContent API with Gemini Enterprise Agent Platform. Gemini can selectively inspect the frames, audio, and transcript needed to answer the prompt instead of processing the whole video at a fixed frame rate.

Project history

Installation

Install this plugin in the same environment as LLM.

llm install llm-gemini-youtube

Usage

llm -m gemini-3.7-flash-yt -a 'https://www.youtube.com/watch?v=9hE5-98ZeCg' 'Can you summarize this video?'

llm -m gemini-3.6-flash-yt -a 'https://www.youtube.com/watch?v=9hE5-98ZeCg' 'What are the examples given at 01:05 and 01:19 supposed to show us?'

llm -m gemini-3.5-flash-lite-yt -a 'https://www.youtube.com/watch?v=9hE5-98ZeCg' 'Transcribe the audio from this video, giving timestamps for salient events in the video. Also provide visual descriptions.'

Supported models are gemini-3.7-flash-yt, gemini-3.6-flash-yt, and gemini-3.5-flash-lite-yt. Configure the API key using LLM's standard key mechanism:

llm keys set gemini

Google Cloud

The Google Gen AI SDK can route requests through Gemini Enterprise Agent Platform using its standard environment variables:

export GOOGLE_GENAI_USE_ENTERPRISE=1
export GOOGLE_CLOUD_PROJECT='your-project-id'
export GOOGLE_CLOUD_LOCATION='global'
gcloud auth application-default login

When Google Cloud is enabled, LLM_GEMINI_KEY does not need to be set. The SDK uses Application Default Credentials together with the configured project and location. The plugin uses the GenerateContent API with media_processing="AGENTIC" for this configuration; API-key requests continue to use the Interactions API with processing="agentic".

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-gemini-youtube
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

python -m pip install -e '.[test]'

To run the tests:

python -m pytest

Release files for llm-gemini-youtube 0.1.1

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

Source distribution (sdist)

Source distribution for llm-gemini-youtube 0.1.1
File Size Uploaded
llm_gemini_youtube-0.1.1.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-gemini-youtube 0.1.1
File Interpreter ABI Platform
llm_gemini_youtube-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.7 kB

Release files / llm_gemini_youtube-0.1.1.tar.gz

Download URL llm_gemini_youtube-0.1.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b2bfc1968cde974f938c599d5853b2d75618570b2bbace10402abebccb456ca4
BLAKE2b-256 checksum
How to use checksums
26625051551a0a161b1d296cb1f93f37deb11be5ff454bf277d8a8e09fdaf9b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release files / llm_gemini_youtube-0.1.1-py3-none-any.whl

Download URL llm_gemini_youtube-0.1.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcbc6ec437a3753f3d0b1fe8c2a1fd3ce23f60500c3cbf8cdb544ca3ec437a9a
BLAKE2b-256 checksum
How to use checksums
20ca5f0ff7d97748b2f55ce6ca9cd4b36b1c49c46992a53cce6ce4b1fff349a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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