An intelligent text summarization API built with FastAPI and Gemini 2.5 Flash, capable of summarizing both plain text and web content.
Perfect for generating quick summaries, previews, or insights from large articles or pages.
🔹 Summarizes raw text or directly from a URL
🔹 Uses Gemini 2.5 Flash for ultra-fast and high-quality responses
🔹 Clean REST API built with FastAPI
🔹 Simple, lightweight, and deployable anywhere
| Component | Technology |
|---|---|
| LLM | Gemini 2.5 Flash |
| Framework | FastAPI |
| Language | Python |
| Optional | BeautifulSoup (for URL scraping) |
{
"text": "Artificial Intelligence is transforming industries..."
}{
"text": "https://example.com/article-about-ai"
}{
"summary": "AI is revolutionizing industries by enhancing automation and decision-making."
}pip install -r /requirement.txtCreate a .env file in your root directory and add:
API_KEY=your_api_key_hereuvicorn main:app --reloadThen open 👉 http://127.0.0.1:8000/docs
🔹 Add summarization length control (short/medium/detailed)
🔹 Add batch URL support
🔹 Deploy to Render / Railway / HuggingFace Spaces
Aashish Gupta
AI & Software Developer
LinkedIn | GitHub
🌱 “The fastest way to learn AI is to build something that scares you a little.”