Paste a YouTube link or upload a video. Get transcripts, summaries, quizzes, Q&A, and more.
Transcription runs 100% locally. Only AI generation needs an API key.
You watch a 2-hour lecture. You take notes. You miss things. You rewatch parts. You spend more time organizing notes than actually studying.
StudyLens fixes this. Paste a link, pick what you want, and get study-ready material in minutes — not hours.
|
|
YouTube URL / Video File
|
v
yt-dlp + ffmpeg Extracts audio locally
|
v
faster-whisper Transcribes on YOUR machine (no cloud)
|
v
LLM API Generates study materials
(OpenAI / Gemini / Claude) (only step that needs an API key)
|
v
SQLite Saves everything for logged-in users
No subscriptions. No monthly fees. Transcription is fully local using faster-whisper. The only cost is the LLM API call for generating summaries/quizzes — typically a few cents per video using GPT-4o-mini.
| Component | Technology | Runs Locally? |
|---|---|---|
| Transcription | faster-whisper / mlx-whisper (auto-detected) | Yes |
| Video Download | yt-dlp + ffmpeg | Yes |
| AI Generation | OpenAI gpt-4o-mini / Google gemini-2.5-flash / Anthropic claude-sonnet-4-6 |
API call |
| Backend | Python, FastAPI, Uvicorn | Yes |
| Frontend | Vanilla JavaScript, Tailwind CSS, Marked.js | Yes |
| Database | SQLite (WAL mode) | Yes |
| Auth | PBKDF2-HMAC-SHA256, secure httponly cookies | Yes |
Everything runs on your machine except the LLM API calls for generating AI content.
Transcription speed depends on your hardware. StudyLens auto-detects and uses the fastest option available:
| Hardware | Backend Used | 1-hour video |
|---|---|---|
| Apple Silicon Mac (M1/M2/M3/M4) | mlx-whisper (Metal GPU) | ~5-8 min |
| NVIDIA GPU (CUDA) | faster-whisper (GPU) | ~3-5 min |
| CPU only (Intel Mac, Docker) | faster-whisper (CPU) | ~15-20 min |
No configuration needed — the right backend is selected automatically. On Mac, run.sh installs mlx-whisper for you.
Install Docker Desktop (free), then pick your AI provider and run one command:
| Provider | Command |
|
OpenAI |
docker run -d -p 8000:8000 \
-e OPENAI_API_KEY=sk-your-key-here \
-v studylens-data:/app/data \
--restart unless-stopped \
--name studylens \
tusharkhatriofficial/studylens |
|
Google Gemini |
docker run -d -p 8000:8000 \
-e GEMINI_API_KEY=your-gemini-key-here \
-v studylens-data:/app/data \
--restart unless-stopped \
--name studylens \
tusharkhatriofficial/studylens |
|
Anthropic |
docker run -d -p 8000:8000 \
-e ANTHROPIC_API_KEY=sk-ant-your-key-here \
-v studylens-data:/app/data \
--restart unless-stopped \
--name studylens \
tusharkhatriofficial/studylens |
Open http://localhost:8000 and start studying.
You only need one key. Pick whichever provider you prefer. Google Gemini has a free tier.
The -v studylens-data:/app/data part stores your SQLite database (accounts, study history, chats) in a persistent Docker volume. Your data survives:
- Stopping the container (
docker stop studylens) - Restarting Docker Desktop
- Updating to a new version
- Even deleting and re-creating the container
The only way to lose data is explicitly deleting the volume with docker volume rm studylens-data.
| What | Command |
|---|---|
| Stop | docker stop studylens |
| Start again | docker start studylens |
| View logs | docker logs studylens |
| Update to latest | docker pull tusharkhatriofficial/studylens && docker rm -f studylens then run the original command again |
| Remove everything | docker rm -f studylens && docker volume rm studylens-data |
Docker Compose setup (alternative)
Create a docker-compose.yml file:
services:
studylens:
image: tusharkhatriofficial/studylens:latest
ports:
- "8000:8000"
environment:
- OPENAI_API_KEY=sk-your-key-here # or GEMINI_API_KEY or ANTHROPIC_API_KEY
volumes:
- studylens-data:/app/data
restart: unless-stopped
volumes:
studylens-data:Then: docker compose up -d
Manual setup without Docker (for developers)
| Requirement | Install |
|---|---|
| Python 3.10+ | python.org |
| ffmpeg | brew install ffmpeg (macOS) / apt install ffmpeg (Linux / WSL) |
| An LLM API key | See API Key Setup below |
git clone https://github.com/tusharkhatriofficial/study_lense.git
cd study_lense
cp .env.example .env # then edit .env and add your key
chmod +x run.sh
./run.shOpen http://localhost:8000.
First run creates a virtual environment, installs dependencies, and downloads the Whisper
basemodel (~150MB). One-time setup.
StudyLens needs an LLM API key only for generating AI content (summaries, quizzes, Q&A, etc.). Transcription is fully local and free.
| Provider | Model Used | Get Key |
|---|---|---|
| OpenAI | gpt-4o-mini |
platform.openai.com/api-keys |
| Google Gemini | gemini-2.5-flash |
aistudio.google.com/apikey |
| Anthropic | claude-sonnet-4-6 |
console.anthropic.com/settings/keys |
You only need one key. Pick whichever provider you prefer.
| Setup | What happens |
|---|---|
Key in .env file |
Acts as the server default. All users can use it (with rate limits). |
| Key in Settings page | Users add their own key in-app. Overrides the server default. No rate limits. |
| No key at all | Transcription still works. AI features ask the user to add a key in Settings. |
| User Type | Video Processing | AI Chat |
|---|---|---|
| Guest (no account) | 3/day | 5/day |
| Logged-in user | 20/day | 30/day |
| Using own API key | Unlimited | Unlimited |
Generate More — add output types later without re-processing
Generated only a transcript and summary? Open that session from history, and you'll see checkboxes for every output type you haven't generated yet (MCQ, Q&A, Topics, etc.). Check what you want and hit Go. StudyLens uses the saved transcript — no need to re-download or re-transcribe the video.
Chat with Notes — highlight text and ask AI about it
In any study session, highlight text in your notes. A tooltip appears letting you ask AI about the selection. The AI has full context of your transcript and all generated outputs, so answers are specific to your content.
There's also a standalone full-screen chat that can optionally reference any study session.
Merge Sessions — combine multiple videos into one guide
Select 2 or more study sessions from your history and merge them. StudyLens combines all transcripts (labeled by source) and generates new study materials from the combined content. Great for combining lecture series or related videos.
Multi-Provider AI — choose your preferred LLM
StudyLens auto-detects the provider from your API key format:
- Keys starting with
sk-→ OpenAI (gpt-4o-mini) - Keys starting with
AIza→ Google Gemini (gemini-2.5-flash) - Keys starting with
sk-ant-→ Anthropic Claude (claude-sonnet-4-6)
You can set a different key per provider in Settings and switch between them.
study_lense/
├── backend/
│ ├── main.py # FastAPI — all API endpoints, SSE progress, auth
│ ├── db.py # SQLite — users, history, chats, usage tracking
│ ├── downloader.py # yt-dlp + ffmpeg — download & extract audio
│ ├── transcriber.py # faster-whisper — local transcription
│ └── summarizer.py # Multi-provider LLM — content generation
├── static/
│ ├── index.html # Single-page app
│ ├── app.js # Frontend logic (vanilla JS)
│ └── style.css # Tailwind CSS + custom styles
├── data/ # SQLite database (gitignored)
├── .env # Your API keys (gitignored)
├── Dockerfile
├── requirements.txt
└── run.sh
Click to expand
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/process |
Process a YouTube URL or uploaded video file |
GET |
/api/status/{task_id} |
SSE stream — real-time progress updates |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/history |
List all saved study sessions |
GET |
/api/history/{id} |
Get full session (transcript, outputs, metadata) |
POST |
/api/history/{id}/generate-more |
Generate additional output types |
PATCH |
/api/history/{id} |
Rename a session |
DELETE |
/api/history/{id} |
Delete a session |
POST |
/api/merge |
Merge multiple sessions into one |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/history/{id}/chats |
List chats for a study session |
POST |
/api/history/{id}/chats |
Start a new chat (with optional text selection) |
POST |
/api/chats/{id}/message |
Send message to existing chat |
POST |
/api/standalone-chat |
Full-screen chat (optionally references a session) |
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/register |
Create account |
POST |
/api/login |
Login |
POST |
/api/logout |
Logout |
GET |
/api/me |
Get current user |
POST |
/api/keys |
Save an API key |
GET |
/api/health |
Health check (also reports if a default key is configured) |
Contributions welcome. Open an issue or submit a PR.
MIT
Built by Tushar Khatri