AI.dly is a modular, high-utility Flask backend server designed to process data from various sources (webpages, PDFs, YouTube transcripts) and augment them using advanced language models via Together AI, along with fully free language translation.
I had made this project when the only such implementation was Sider.ai (I didn't know about GitHub at that time), and when I had to do a school research project, but ran out of commands on it. I had even used this in a Techfest, but had sadly missed out on the first prize by an inch.
- AI Chat with Session Memory: Multi-turn conversation processing using flagship serverless LLMs.
- YouTube Transcript Summarization: Extracts English audio scripts via yt-dlp tool sub-engines and builds brief topic reviews.
- Document Text Extraction: Reads uploaded PDF files dynamically using PyMuPDF (fitz).
- Web Scraping Engine: Cleans and extracts raw, script-free readable copy from public URLs.
- Free Language Translation: Auto-detects input dialects and converts text with zero API keys required.
- Cross-Origin Enabled: Integrated with flask-cors for effortless frontend connections.
- Core Framework: Python 3.12+, Flask
- AI Engine: Together AI (OpenAI-Compatible Chat Completions API)
- Scraping & Parsers: Beautiful Soup 4, PyMuPDF (fitz)
- System Utilities: yt-dlp, curl (system level dependency)
- Utilities: deep-translator, youtube-transcript-api
- Create a free account at Together AI.
- Navigate to the API Keys section in your dashboard.
- Generate a new API key.
- Copy the generated key and keep it secure for later use.
- Paste the key in the variable placeholder in the app.py as a string.
This project utilizes the command-line utility yt-dlp and system curl to extract streaming subtitles. Ensure they are installed on your host machine environment:
# Ubuntu/Debian Linux
sudo apt update && sudo apt install yt-dlp curl
# macOS
brew install yt-dlp curlgit clone https://github.com/RandomAssDude696969/Ai.dly/main
cd Ai.dly/ai.dly
python3 -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate.batpip install flask flask-cors requests pymupdf beautifulsoup4 youtube-transcript-api deep-translator togetherCreate an environment variable for your Together AI authentication key:
export TOGETHER_API_KEY="your_actual_together_api_token_here"
# On Windows Command Prompt: set TOGETHER_API_KEY="your_actual_together_api_token_here"
# On Windows PowerShell: \$env:TOGETHER_API_KEY="your_actual_together_api_token_here"If you are using this method, please make sure to update the code properly to the following:
TOGETHER_API_KEY = os.environ.get('TOGETHER_API_KEY')
You can skip this if you want to, but this is recommended for extra security.
python app.pyThe server will boot locally at http://127.0.0.
- Route: POST /chat
- Payload:
{ "prompt": "Explain Quantum Computing like I am five years old." }
- Route: POST /translate
- Payload:
{ "text": "Bonjour tout le monde", "target_lang": "en" }
- Route: POST /read_webpage
- Payload:
{ "url": "https://example.com" }
- Route: POST /read_pdf
- Type: multipart/form-data
- Body: file (Binary PDF File), session_id (Optional String)
- Route: POST /essay
- Payload:
{ "topic": "Impact of Renewable Energy in 2026" }
- Route: POST /youtube_summary
- Payload:
{ "url": "https://youtube.com" }
┌─────────────────────────────────────────────┐
│ Chrome Extension │
├─────────────────────────────────────────────┤
│ Chat UI │
│ Essay Generator │
│ PDF Upload Interface │
│ Webpage Summarizer │
│ Translation Interface │
└───────────────────┬─────────────────────────┘
│ REST API (JSON)
▼
┌─────────────────────────────────────────────┐
│ Flask Backend │
├─────────────────────────────────────────────┤
│ Routing Layer │
│ Session Memory Management │
│ Request Validation │
│ Response Formatting │
└───────┬──────────┬──────────┬──────────┬────┘
│ │ │ │
▼ ▼ ▼ ▼
┌────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐
│ TogetherAI │ │ PyMuPDF │ │ BS4 │ │ DeepTranslator│
│ LLM Engine │ │ PDF Parse│ │ Web Parse│ │ Translation │
└─────┬──────┘ └──────────┘ └──────────┘ └──────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Chat Generation │
│ Essay Generation │
│ Summarization │
│ Context-Aware Responses │
└─────────────────────────────────────────────┘
▲
│
┌─────────┴─────────┐
│ Transcript Layer │
├───────────────────┤
│ yt-dlp │
│ youtube-transcript│
└───────────────────┘
User Prompt
│
▼
Chrome Extension
│
POST /chat
│
▼
Flask Backend
│
Session Context Injection
│
▼
Together AI API
│
LLM Response
│
▼
JSON Response
│
▼
Extension UI Render